feat(ground-suite): redesign observability console
This commit is contained in:
1 parent
c67d553076
commit
153b0bf262
12 files changed
+1145
-507
No files matched your search
@@ -3,7 +3,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:ground_suite/app/app.dart';
|
||||
import 'package:ground_suite/app/app_shell.dart';
|
||||
import 'package:ground_suite/shared/widgets/glass_panel.dart';
|
||||
import 'package:ground_suite/shared/widgets/surfaces.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('replay workspace keeps diagnostics distinct and read-only', (
|
||||
@@ -16,12 +16,12 @@ void main() {
|
||||
expect(app.themeMode, ThemeMode.system);
|
||||
expect(app.theme?.brightness, Brightness.light);
|
||||
expect(app.darkTheme?.brightness, Brightness.dark);
|
||||
expect(find.byType(GlassPanel), findsAtLeastNWidgets(1));
|
||||
expect(find.text('Observation only'), findsOneWidget);
|
||||
expect(find.byType(FrostedChrome), findsAtLeastNWidgets(1));
|
||||
expect(find.text('OBSERVATION ONLY'), findsOneWidget);
|
||||
expect(find.text('Replay fixture'), findsAtLeastNWidgets(1));
|
||||
expect(find.text('Vehicle identity'), findsOneWidget);
|
||||
expect(find.text('LAST REPORTED HEARTBEAT'), findsOneWidget);
|
||||
|
||||
await tester.tap(find.byTooltip('Choose theme'));
|
||||
await tester.tap(find.byTooltip('Appearance: System default'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Dark'));
|
||||
await tester.pumpAndSettle();
|
||||
@@ -31,21 +31,21 @@ void main() {
|
||||
ThemeMode.dark,
|
||||
);
|
||||
|
||||
await tester.tap(find.byIcon(Icons.receipt_long_outlined));
|
||||
await tester.tap(find.byIcon(Icons.segment_outlined));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Diagnostics'), findsAtLeastNWidgets(1));
|
||||
await tester.tap(find.text('Errors'));
|
||||
expect(find.text('Event timeline'), findsOneWidget);
|
||||
await tester.tap(find.text('Errors 1'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(
|
||||
find.text('kaptan_drivers::lidar_lite_v3::error::Error::TransferFault'),
|
||||
findsOneWidget,
|
||||
);
|
||||
|
||||
await tester.tap(find.text('Shutdowns'));
|
||||
await tester.tap(find.text('Shutdown reports 1'));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Orderly shutdown observed'), findsOneWidget);
|
||||
expect(find.text('Orderly shutdown report'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
@@ -57,7 +57,7 @@ void main() {
|
||||
await tester.pumpWidget(const ProviderScope(child: GroundSuiteApp()));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byType(NavigationBar), findsOneWidget);
|
||||
expect(find.byKey(const Key('compact-navigation')), findsOneWidget);
|
||||
expect(tester.takeException(), isNull);
|
||||
},
|
||||
);
|
||||
@@ -75,4 +75,22 @@ void main() {
|
||||
final context = tester.element(find.byType(AppShell));
|
||||
expect(Theme.of(context).brightness, Brightness.dark);
|
||||
});
|
||||
|
||||
testWidgets('large desktop text uses the compact session strip', (
|
||||
tester,
|
||||
) async {
|
||||
await tester.binding.setSurfaceSize(const Size(1280, 900));
|
||||
tester.binding.platformDispatcher.textScaleFactorTestValue = 2;
|
||||
addTearDown(() {
|
||||
tester.binding.setSurfaceSize(null);
|
||||
tester.binding.platformDispatcher.clearTextScaleFactorTestValue();
|
||||
});
|
||||
|
||||
await tester.pumpWidget(const ProviderScope(child: GroundSuiteApp()));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('OBSERVATION ONLY'), findsOneWidget);
|
||||
expect(find.text('Replay ended 12:00:06Z'), findsNothing);
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user