Skip to content

Commit 8615faf

Browse files
[material_ui] Unskip web tests that pass on CanvasKit and Skwasm: time_picker_test (flutter#13471)
Removes the `@TestOn('!chrome')` annotation from `packages/material_ui/test/time_picker_test.dart` so that its tests run on the web. All 190 tests in the file now pass on Chrome under both CI web renderers (CanvasKit with dart2js and Skwasm with dart2wasm). The time picker state restoration group still does not work on the web, so it is now skipped individually with `skip: kIsWeb` instead of skipping the whole file. Part of flutter#33615 (the state restoration group remains skipped on web pending that issue). This is a test-only change, so it is exempt from version and CHANGELOG updates. ## Pre-Review Checklist **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 ccbe75f commit 8615faf

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎packages/material_ui/test/time_picker_test.dart‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// This file is run as part of a reduced test set in CI on Mac and Windows
66
// machines.
77
@Tags(<String>['reduced-test-set'])
8-
@TestOn('!chrome')
98
library;
109

1110
import 'dart:async';
@@ -2354,6 +2353,10 @@ void main() {
23542353
);
23552354
});
23562355

2356+
// Skipped on the web because routes pushed with Navigator.restorablePush
2357+
// (used by _TimePickerLauncher) are not restorable there: the framework
2358+
// can't serialize the route builder without PluginUtilities, so the
2359+
// picker dialog is gone after restartAndRestore.
23572360
group('Time picker - Restoration (${materialType.name})', () {
23582361
testWidgets('Time Picker state restoration test - dial mode', (WidgetTester tester) async {
23592362
TimeOfDay? result;
@@ -2461,7 +2464,7 @@ void main() {
24612464
await finishPicker(tester);
24622465
expect(result, equals(const TimeOfDay(hour: 6, minute: 45)));
24632466
});
2464-
});
2467+
}, skip: kIsWeb); // [intended] PluginUtilities is not supported on the web.
24652468

24662469
group('Time picker - emptyInitialInput (${materialType.name})', () {
24672470
testWidgets('Fields are empty and show correct hints when emptyInitialInput is true', (

0 commit comments

Comments
 (0)