refactor(desktop): reorganize workspace panels and navigation
This commit is contained in:
1 parent
826745b407
commit
1f73765745
92 files changed
+5811
-2650
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import 'package:cutdex/shared/widgets/error_notification_host.dart';
|
||||
import 'package:cutdex/features/media/media_browser_feedback.dart';
|
||||
import 'package:cutdex/l10n/app_localizations.dart';
|
||||
import 'package:cutdex/workspace/external_media_import.dart';
|
||||
@@ -15,6 +16,7 @@ void main() {
|
||||
late StateSetter changeVisibility;
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
builder: (context, child) => ErrorNotificationHost(child: child!),
|
||||
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||
supportedLocales: AppLocalizations.supportedLocales,
|
||||
home: Scaffold(
|
||||
@@ -42,26 +44,32 @@ void main() {
|
||||
feedback.recordFailure();
|
||||
await tester.pumpAndSettle();
|
||||
expect(feedback.hasPending, isTrue);
|
||||
expect(find.byType(SnackBar), findsNothing);
|
||||
expect(find.byKey(const Key('global-error-notification')), findsNothing);
|
||||
changeVisibility(() => visible = true);
|
||||
await tester.pumpAndSettle();
|
||||
expect(feedback.hasPending, isFalse);
|
||||
expect(find.byType(SnackBar), findsOneWidget);
|
||||
final messenger = ScaffoldMessenger.of(
|
||||
expect(
|
||||
find.byKey(const Key('global-error-notification')),
|
||||
findsOneWidget,
|
||||
);
|
||||
final messenger = ErrorNotificationHost.of(
|
||||
tester.element(find.text('Browser')),
|
||||
);
|
||||
messenger.clearSnackBars();
|
||||
messenger.removeCurrentSnackBar();
|
||||
messenger.clear();
|
||||
|
||||
await tester.pumpAndSettle();
|
||||
changeVisibility(() => visible = false);
|
||||
await tester.pumpAndSettle();
|
||||
changeVisibility(() => visible = true);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byType(SnackBar), findsNothing);
|
||||
expect(find.byKey(const Key('global-error-notification')), findsNothing);
|
||||
feedback.recordFailure();
|
||||
await tester.pumpAndSettle();
|
||||
expect(feedback.hasPending, isFalse);
|
||||
expect(find.byType(SnackBar), findsOneWidget);
|
||||
expect(
|
||||
find.byKey(const Key('global-error-notification')),
|
||||
findsOneWidget,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user