Polish adaptive app chrome
This commit is contained in:
@@ -206,5 +206,45 @@ void main() {
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
testWidgets('Cupertino mode is icon-only below 600px', (tester) async {
|
||||
if (!cupertino) return;
|
||||
final semantics = tester.ensureSemantics();
|
||||
_size(tester, const Size(560, 800));
|
||||
await _pump(
|
||||
tester,
|
||||
cupertino: true,
|
||||
messages: 1,
|
||||
session: const {
|
||||
'id': 's',
|
||||
'backend': 'opencode',
|
||||
'model': 'p/sonnet-4-5',
|
||||
'mode': 'default',
|
||||
'mode_name': 'Ask for permission',
|
||||
},
|
||||
);
|
||||
|
||||
final mode = find.byKey(const Key('chat-mode'));
|
||||
expect(mode, findsOneWidget);
|
||||
expect(
|
||||
find.descendant(of: mode, matching: find.text('Ask for permission')),
|
||||
findsNothing,
|
||||
);
|
||||
expect(
|
||||
tester.getSemantics(mode).label,
|
||||
contains('Change mode, currently Ask for permission'),
|
||||
);
|
||||
await tester.tap(mode);
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byKey(const Key('chat-mode-sheet')), findsOneWidget);
|
||||
// The fixture has no chat_modes catalog, but the recorded session mode
|
||||
// remains visible in the sheet.
|
||||
expect(
|
||||
find.byKey(const ValueKey('chat-mode-option-default')),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(find.text('Ask for permission'), findsOneWidget);
|
||||
semantics.dispose();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user