fix(app): use native selected affordance in runs sort sheet
This commit is contained in:
@@ -150,6 +150,35 @@ void main() {
|
||||
expect(controller.sort, 'newest_first');
|
||||
});
|
||||
|
||||
testWidgets('Cupertino sort sheet marks the selected order with an icon', (
|
||||
tester,
|
||||
) async {
|
||||
await mount(tester, cupertino: true);
|
||||
await tester.tap(find.byKey(const ValueKey('runs.sort')));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('✓ Newest first'), findsNothing);
|
||||
final newestFirst = find.widgetWithText(
|
||||
CupertinoActionSheetAction,
|
||||
'Newest first',
|
||||
);
|
||||
expect(newestFirst, findsOneWidget);
|
||||
expect(
|
||||
find.descendant(
|
||||
of: newestFirst,
|
||||
matching: find.byIcon(CupertinoIcons.checkmark),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
final selected = find.descendant(
|
||||
of: newestFirst,
|
||||
matching: find.byWidgetPredicate(
|
||||
(widget) => widget is Semantics && widget.properties.selected == true,
|
||||
),
|
||||
);
|
||||
expect(selected, findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('the usage page is honest when nothing was reported', (
|
||||
tester,
|
||||
) async {
|
||||
|
||||
Reference in New Issue
Block a user