Skip to content

Commit 3fd2ab5

Browse files
authored
[material_ui] Reduce the material_ui non-wasm web test suite (#12763)
Work towards flutter/flutter#192308 Introduce new `--package-tags` flag that can be used to specify which flags to filter a package's tests with. In the case of the `web_dart_unit_tests`, we specify that `material_ui` should filter on the new `reduced_web_test_set` tag. ## Pre-Review Checklist **changelog exemption:** only test/CI changes **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed. [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
1 parent c5d9cc8 commit 3fd2ab5

57 files changed

Lines changed: 513 additions & 280 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.ci/targets/web_dart_unit_tests.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ tasks:
77
args: [
88
"dart-test",
99
"--platform=chrome",
10+
"--package-tags=script/configs/web_dart_unit_test_tags.yaml",
1011
"--exclude=script/configs/dart_unit_tests_exceptions.yaml"
1112
]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tags:
2+
reduced-web-test-set:
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tags:
2+
reduced-web-test-set:

‎packages/material_ui/example/test/context_menu/editable_text_toolbar_builder.2_test.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,6 @@ void main() {
9595
expect(find.text('Paste'), findsNothing);
9696
expect(find.text('Select all'), findsNothing);
9797
},
98+
tags: 'reduced-web-test-set',
9899
);
99100
}

‎packages/material_ui/example/test/context_menu/selectable_region_toolbar_builder.0_test.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,5 @@ void main() {
6868
await tester.pumpAndSettle();
6969

7070
expect(find.byType(AdaptiveTextSelectionToolbar), findsNothing);
71-
});
71+
}, tags: 'reduced-web-test-set');
7272
}

‎packages/material_ui/example/test/selection_area/selection_area.2_test.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,5 +298,6 @@ void main() {
298298
isNull,
299299
);
300300
},
301+
tags: 'reduced-web-test-set',
301302
);
302303
}

‎packages/material_ui/example/test/text_form_field/text_form_field.1_test.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,5 @@ void main() {
6565
} else {
6666
expect(getFocuses(), const <bool>[true, false, false, false, false]);
6767
}
68-
});
68+
}, tags: 'reduced-web-test-set');
6969
}

‎packages/material_ui/test/action_chip_test.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ void main() {
527527
RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1),
528528
kIsWeb ? SystemMouseCursors.click : SystemMouseCursors.basic,
529529
);
530-
});
530+
}, tags: 'reduced-web-test-set');
531531

532532
testWidgets('ActionChip mouse cursor behavior', (WidgetTester tester) async {
533533
const SystemMouseCursor customCursor = SystemMouseCursors.grab;

‎packages/material_ui/test/back_button_test.dart‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void main() {
122122
expect(macOSIcon.icon == androidIcon.icon, kIsWeb ? isTrue : isFalse);
123123
expect(macOSIcon.icon == iOSIcon.icon, isTrue);
124124
expect(windowsIcon.icon == androidIcon.icon, isTrue);
125-
});
125+
}, tags: 'reduced-web-test-set');
126126

127127
testWidgets('BackButton color', (WidgetTester tester) async {
128128
await tester.pumpWidget(
@@ -399,7 +399,7 @@ void main() {
399399
RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1),
400400
kIsWeb ? SystemMouseCursors.click : SystemMouseCursors.basic,
401401
);
402-
});
402+
}, tags: 'reduced-web-test-set');
403403

404404
testWidgets('CloseButton has expected default mouse cursor on hover', (
405405
WidgetTester tester,
@@ -421,7 +421,7 @@ void main() {
421421
RendererBinding.instance.mouseTracker.debugDeviceActiveCursor(1),
422422
kIsWeb ? SystemMouseCursors.click : SystemMouseCursors.basic,
423423
);
424-
});
424+
}, tags: 'reduced-web-test-set');
425425

426426
testWidgets('BackButton has expected mouse cursor when explicitly configured', (
427427
WidgetTester tester,

‎packages/material_ui/test/checkbox_list_tile_test.dart‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ void main() {
650650
);
651651

652652
await tester.pumpAndSettle();
653-
});
653+
}, tags: 'reduced-web-test-set');
654654

655655
testWidgets('CheckboxListTile respects fillColor in enabled/disabled states', (
656656
WidgetTester tester,
@@ -1039,6 +1039,7 @@ void main() {
10391039
await gesture4.up();
10401040
await tester.pumpAndSettle();
10411041
},
1042+
tags: 'reduced-web-test-set',
10421043
);
10431044

10441045
testWidgets('CheckboxListTile respects splashRadius', (WidgetTester tester) async {

0 commit comments

Comments
 (0)