[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reland: [CupertinoActionSheet] Add sliding tap gesture #150219

Merged
merged 4 commits into from
Jun 17, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change the test a bit to refresh golden file
  • Loading branch information
dkwingsmt committed Jun 13, 2024
commit f0b19018d42b71a0bfe7187049cb0197ccc086c4
9 changes: 5 additions & 4 deletions packages/flutter/test/cupertino/action_sheet_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -685,18 +685,18 @@ void main() {
await tester.pumpAndSettle();
expect(pressed, null);

final TestGesture gesture = await tester.startGesture(tester.getCenter(find.text('One')));
final TestGesture gesture = await tester.startGesture(tester.getCenter(find.text('Two')));
await tester.pumpAndSettle();

await gesture.moveTo(tester.getCenter(find.text('Two')));
await gesture.moveTo(tester.getCenter(find.text('One')));
await tester.pumpAndSettle();
await expectLater(
find.byType(CupertinoActionSheet),
matchesGoldenFile('cupertinoActionSheet.press-drag.png'),
);

await gesture.up();
expect(pressed, 2);
expect(pressed, 1);
await tester.pumpAndSettle();
expect(find.text('One'), findsNothing);
});
Expand Down Expand Up @@ -1317,7 +1317,8 @@ void main() {
await tester.tap(find.text('Go'));
await tester.pumpAndSettle();

final TestGesture pointer = await tester.startGesture(tester.getCenter(find.text('One')));
final TestGesture pointer = await tester.startGesture(tester.getCenter(find.text('Two')));
// Just `pump`, not `pumpAndSettle`, as we want to verify the very next frame.
await tester.pump();
await expectLater(
find.byType(CupertinoActionSheet),
Expand Down