fix(app): wide Cupertino sidebar, compact run tabs, web-like chat bubbles
This commit is contained in:
@@ -38,16 +38,42 @@ void main() {
|
||||
);
|
||||
}
|
||||
|
||||
testWidgets('Cupertino shell uses native navigation controls', (
|
||||
testWidgets('Cupertino shell uses a tab bar on a narrow window', (
|
||||
tester,
|
||||
) async {
|
||||
tester.view.physicalSize = const Size(390, 844);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.resetPhysicalSize);
|
||||
addTearDown(tester.view.resetDevicePixelRatio);
|
||||
await tester.pumpWidget(const MyApp(cupertino: true));
|
||||
expect(find.byType(CupertinoNavigationBar), findsOneWidget);
|
||||
expect(find.byType(CupertinoTabBar), findsOneWidget);
|
||||
expect(find.text('Pipelines — Not implemented'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('Cupertino shell uses a sidebar on a wide window', (
|
||||
tester,
|
||||
) async {
|
||||
tester.view.physicalSize = const Size(1280, 900);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.resetPhysicalSize);
|
||||
addTearDown(tester.view.resetDevicePixelRatio);
|
||||
await tester.pumpWidget(const MyApp(cupertino: true));
|
||||
expect(find.byType(CupertinoTabBar), findsNothing);
|
||||
expect(
|
||||
find.byKey(const ValueKey('shell.destination.pipelines')),
|
||||
findsOneWidget,
|
||||
);
|
||||
await tester.tap(find.byKey(const ValueKey('shell.destination.runs')));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.text('Runs — Not implemented'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('Cupertino content stays inside safe area', (tester) async {
|
||||
tester.view.physicalSize = const Size(390, 844);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.resetPhysicalSize);
|
||||
addTearDown(tester.view.resetDevicePixelRatio);
|
||||
tester.view.padding = const FakeViewPadding(top: 36, bottom: 28);
|
||||
addTearDown(tester.view.resetPadding);
|
||||
await tester.pumpWidget(const MyApp(cupertino: true));
|
||||
|
||||
Reference in New Issue
Block a user