Skip to content

Commit 4a08a54

Browse files
[material_ui] Unskip web tests that pass on CanvasKit and Skwasm: app_bar_theme_test, input_decorator_test, paginated_data_table_test, spell_check_suggestions_toolbar_test (#13352)
Removes web skips (`skip: kIsWeb` / `skip: isBrowser`) from tests in `packages/material_ui/test` that now pass on Chrome with both CI web renderers, CanvasKit (dart2js) and Skwasm (dart2wasm). Leaving them skipped hides web regressions. - `app_bar_theme_test.dart`: the `AppBarThemeData implements debugFillProperties` test. Doubles now print the same on web as on other platforms. Also removes the comment that explained the old skip. - `input_decorator_test.dart`: 8 tests: the `OutlineInputBorder` paint/path tests (skipped for #55317) and the `textWidthBasis` clip tests (skipped for #44020). - `paginated_data_table_test.dart`: the large text test (skipped for #43433). It no longer times out. - `spell_check_suggestions_toolbar_test.dart`: `more than three suggestions throws an error`. Also removes the `package:flutter/foundation.dart` import, which is unused now. None of the unskipped tests use goldens. Fixes flutter/flutter#43433 Fixes flutter/flutter#44020 Fixes flutter/flutter#55317 Related issues: - flutter/flutter#87364 This PR changes tests only, 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 1383427 commit 4a08a54

4 files changed

Lines changed: 26 additions & 37 deletions

File tree

‎packages/material_ui/test/app_bar_theme_test.dart‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,13 +1204,7 @@ void main() {
12041204
'actionsPadding: EdgeInsets(8.0, 0.0, 8.0, 0.0)',
12051205
]),
12061206
);
1207-
1208-
// On the web, Dart doubles and ints are backed by the same kind of object because
1209-
// JavaScript does not support integers. So, the Dart double "4.0" is identical
1210-
// to "4", which results in the web evaluating to the value "4" regardless of which
1211-
// one is used. This results in a difference for doubles in debugFillProperties between
1212-
// the web and the rest of Flutter's target platforms.
1213-
}, skip: kIsWeb); // https://github.com/flutter/flutter/issues/87364
1207+
});
12141208

12151209
testWidgets('Local AppBarTheme overrides defaults', (WidgetTester tester) async {
12161210
const Color backgroundColor = Colors.blueAccent;

‎packages/material_ui/test/input_decorator_test.dart‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,7 +1747,7 @@ void main() {
17471747
)
17481748
..restore(),
17491749
);
1750-
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/55317
1750+
});
17511751

17521752
testWidgets('rounded OutlineInputBorder with zero padding just wraps the label', (
17531753
WidgetTester tester,
@@ -1786,7 +1786,7 @@ void main() {
17861786
)
17871787
..restore(),
17881788
);
1789-
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/55317
1789+
});
17901790

17911791
testWidgets('OutlineInputBorder with BorderRadius.zero should draw a rectangular border', (
17921792
WidgetTester tester,
@@ -1850,7 +1850,7 @@ void main() {
18501850
)
18511851
..restore(),
18521852
);
1853-
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/55317
1853+
});
18541854

18551855
testWidgets('InputDecorator OutlineInputBorder fillColor is clipped by border', (
18561856
WidgetTester tester,
@@ -3217,7 +3217,7 @@ void main() {
32173217
return true;
32183218
}),
32193219
);
3220-
}, skip: isBrowser); // TODO(yjbanov): https://github.com/flutter/flutter/issues/44020
3220+
});
32213221

32223222
testWidgets('InputDecorator floating label Y coordinate', (WidgetTester tester) async {
32233223
// Regression test for https://github.com/flutter/flutter/issues/54028
@@ -15056,7 +15056,7 @@ void main() {
1505615056
)
1505715057
..restore(),
1505815058
);
15059-
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/55317
15059+
});
1506015060

1506115061
testWidgets('rounded OutlineInputBorder with zero padding just wraps the label', (
1506215062
WidgetTester tester,
@@ -15101,7 +15101,7 @@ void main() {
1510115101
)
1510215102
..restore(),
1510315103
);
15104-
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/55317
15104+
});
1510515105

1510615106
testWidgets('OutlineInputBorder with BorderRadius.zero should draw a rectangular border', (
1510715107
WidgetTester tester,
@@ -15172,7 +15172,7 @@ void main() {
1517215172
)
1517315173
..restore(),
1517415174
);
15175-
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/55317
15175+
});
1517615176

1517715177
testWidgets('uses alphabetic baseline for CJK layout', (WidgetTester tester) async {
1517815178
await tester.binding.setLocale('zh', 'CN');
@@ -15329,7 +15329,7 @@ void main() {
1532915329
return true;
1533015330
}),
1533115331
);
15332-
}, skip: isBrowser); // TODO(yjbanov): https://github.com/flutter/flutter/issues/44020
15332+
});
1533315333

1533415334
testWidgets('textAlignVertical can be updated', (WidgetTester tester) async {
1533515335
// Regression test for https://github.com/flutter/flutter/issues/56933

‎packages/material_ui/test/paginated_data_table_test.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ void main() {
577577
tester.getTopRight(find.text('501')).dx,
578578
greaterThanOrEqualTo(tester.getTopRight(find.text('Rows per page:')).dx + 40.0),
579579
);
580-
}, skip: isBrowser); // https://github.com/flutter/flutter/issues/43433
580+
});
581581

582582
testWidgets('PaginatedDataTable footer scrolls', (WidgetTester tester) async {
583583
await tester.pumpWidget(

‎packages/material_ui/test/spell_check_suggestions_toolbar_test.dart‎

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import 'package:flutter/foundation.dart';
65
import 'package:flutter/services.dart';
76
import 'package:flutter_test/flutter_test.dart';
87
import 'package:material_ui/material_ui.dart';
@@ -76,29 +75,25 @@ void main() {
7675
},
7776
);
7877

79-
testWidgets(
80-
'more than three suggestions throws an error',
81-
(WidgetTester tester) async {
82-
Future<void> pumpToolbar(List<String> suggestions) async {
83-
await tester.pumpWidget(
84-
MaterialApp(
85-
home: Scaffold(
86-
body: SpellCheckSuggestionsToolbar(
87-
anchor: const Offset(0.0, _kAnchor - _kTestToolbarOverlap),
88-
buttonItems: buildSuggestionButtons(suggestions),
89-
),
78+
testWidgets('more than three suggestions throws an error', (WidgetTester tester) async {
79+
Future<void> pumpToolbar(List<String> suggestions) async {
80+
await tester.pumpWidget(
81+
MaterialApp(
82+
home: Scaffold(
83+
body: SpellCheckSuggestionsToolbar(
84+
anchor: const Offset(0.0, _kAnchor - _kTestToolbarOverlap),
85+
buttonItems: buildSuggestionButtons(suggestions),
9086
),
9187
),
92-
);
93-
}
88+
),
89+
);
90+
}
9491

95-
await pumpToolbar(<String>['hello', 'yellow', 'yell']);
96-
expect(() async {
97-
await pumpToolbar(<String>['hello', 'yellow', 'yell', 'yeller']);
98-
}, throwsAssertionError);
99-
},
100-
skip: kIsWeb, // [intended]
101-
);
92+
await pumpToolbar(<String>['hello', 'yellow', 'yell']);
93+
expect(() async {
94+
await pumpToolbar(<String>['hello', 'yellow', 'yell', 'yeller']);
95+
}, throwsAssertionError);
96+
});
10297

10398
test('buildSuggestionButtons only considers the first three suggestions', () {
10499
final editableTextState = _FakeEditableTextState(

0 commit comments

Comments
 (0)