Update DataTable
test when data row is pressed for Material 3 (#137230)
This updates one of them M3 test to use golden test from https://github.com/flutter/flutter/pull/135901 Keeping it consistent with this [update](https://github.com/flutter/flutter/pull/136809#discussion_r1365053630)
This commit is contained in:
parent
008a10f158
commit
64f31b2f1a
@ -2,6 +2,9 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
|
// This file is run as part of a reduced test set in CI on Mac and Windows
|
||||||
|
// machines.
|
||||||
|
@Tags(<String>['reduced-test-set'])
|
||||||
@TestOn('!chrome')
|
@TestOn('!chrome')
|
||||||
library;
|
library;
|
||||||
|
|
||||||
@ -1725,16 +1728,11 @@ void main() {
|
|||||||
));
|
));
|
||||||
|
|
||||||
final TestGesture gesture = await tester.startGesture(tester.getCenter(find.text('Content1')));
|
final TestGesture gesture = await tester.startGesture(tester.getCenter(find.text('Content1')));
|
||||||
await tester.pump(const Duration(milliseconds: 200)); // splash is well underway
|
await tester.pump(); // start the splash animation
|
||||||
final RenderBox box = Material.of(tester.element(find.byType(InkWell)))as RenderBox;
|
await tester.pump(const Duration(milliseconds: 100)); // splash is underway
|
||||||
// Material 3 uses the InkSparkle which uses a shader, so we can't capture
|
// Material 3 uses the InkSparkle which uses a shader, so we can't capture
|
||||||
// the effect with paint methods.
|
// the effect with paint methods. Use a golden test instead.
|
||||||
expect(
|
await expectLater(find.byType(InkWell), matchesGoldenFile('data_table_test.data_row_pressed.png'));
|
||||||
box,
|
|
||||||
paints
|
|
||||||
..rect()
|
|
||||||
..rect(rect: const Rect.fromLTRB(0.0, 56.0, 800.0, 104.0), color: pressedColor.withOpacity(0.0)),
|
|
||||||
);
|
|
||||||
await gesture.up();
|
await gesture.up();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -2033,7 +2031,7 @@ void main() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Go without crashes.
|
// Go without crashes.
|
||||||
|
expect(tester.takeException(), isNull);
|
||||||
});
|
});
|
||||||
|
|
||||||
testWidgetsWithLeakTracking('DataTable clip behavior', (WidgetTester tester) async {
|
testWidgetsWithLeakTracking('DataTable clip behavior', (WidgetTester tester) async {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user