Skip to content

Commit eba149f

Browse files
authored
Revert "Update DataTable test when data row is pressed for Material 3 (flutter#137230)" (flutter#137407)
This reverts commit 64f31b2. *Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.* *List which issues are fixed by this PR. You must list at least one issue.* *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* ## Pre-launch Checklist - [ ] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [ ] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [ ] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [ ] I signed the [CLA]. - [ ] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [ ] I added new tests to check the change I am making, or this PR is [test-exempt]. - [ ] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [Features we expect every widget to implement]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
1 parent a0e8b6a commit eba149f

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

packages/flutter/test/material/data_table_test.dart

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +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-
// This file is run as part of a reduced test set in CI on Mac and Windows
6-
// machines.
7-
@Tags(<String>['reduced-test-set'])
85
@TestOn('!chrome')
96
library;
107

@@ -1728,11 +1725,16 @@ void main() {
17281725
));
17291726

17301727
final TestGesture gesture = await tester.startGesture(tester.getCenter(find.text('Content1')));
1731-
await tester.pump(); // start the splash animation
1732-
await tester.pump(const Duration(milliseconds: 100)); // splash is underway
1728+
await tester.pump(const Duration(milliseconds: 200)); // splash is well underway
1729+
final RenderBox box = Material.of(tester.element(find.byType(InkWell)))as RenderBox;
17331730
// Material 3 uses the InkSparkle which uses a shader, so we can't capture
1734-
// the effect with paint methods. Use a golden test instead.
1735-
await expectLater(find.byType(InkWell), matchesGoldenFile('data_table_test.data_row_pressed.png'));
1731+
// the effect with paint methods.
1732+
expect(
1733+
box,
1734+
paints
1735+
..rect()
1736+
..rect(rect: const Rect.fromLTRB(0.0, 56.0, 800.0, 104.0), color: pressedColor.withOpacity(0.0)),
1737+
);
17361738
await gesture.up();
17371739
});
17381740

@@ -2031,7 +2033,7 @@ void main() {
20312033
);
20322034

20332035
// Go without crashes.
2034-
expect(tester.takeException(), isNull);
2036+
20352037
});
20362038

20372039
testWidgetsWithLeakTracking('DataTable clip behavior', (WidgetTester tester) async {

0 commit comments

Comments
 (0)