Use proper sort icon in file explorer
Give the FilesHeader sort control a recognizable Material sort glyph while preserving the default overflow icon for other menus. Add focused widget coverage for sort key and direction behavior.
This commit is contained in:
@@ -93,6 +93,31 @@ void main() {
|
||||
expect(find.widgetWithText(TextButton, 'demo'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('file sorting uses a sort icon and preserves direction', (
|
||||
tester,
|
||||
) async {
|
||||
final controller = await pump(tester);
|
||||
|
||||
expect(find.byTooltip('Sort'), findsOneWidget);
|
||||
expect(find.byIcon(Icons.sort), findsOneWidget);
|
||||
expect(controller.sort.key, FilesSortKey.name);
|
||||
expect(controller.sort.ascending, isTrue);
|
||||
|
||||
await tester.tap(find.byTooltip('Sort'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('size'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(controller.sort.key, FilesSortKey.size);
|
||||
expect(controller.sort.ascending, isTrue);
|
||||
|
||||
await tester.tap(find.byTooltip('Sort'));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('size ↑'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(controller.sort.key, FilesSortKey.size);
|
||||
expect(controller.sort.ascending, isFalse);
|
||||
});
|
||||
|
||||
testWidgets('text tap opens shared viewer and fetches inline URL', (
|
||||
tester,
|
||||
) async {
|
||||
|
||||
Reference in New Issue
Block a user