Skip to content

Conversation

@ValentinVignal
Copy link
Contributor

Contributes to #130459

It adds a test for

  • examples/api/lib/material/scaffold/scaffold.drawer.0.dart
  • examples/api/lib/material/scaffold/scaffold.end_drawer.0.dart

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos labels May 31, 2024
@goderbauer goderbauer requested review from TahaTesser and bleroux June 4, 2024 22:05
Copy link
Contributor

@bleroux bleroux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some formatting nits to correct.
Thanks for the contribution!

Comment on lines 22 to 26
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expect(tester.getCenter(
find.byType(Drawer)).dx,
greaterThan(400), reason: 'The drawer should be on the right side of the screen',
);
expect(
tester.getCenter(find.byType(Drawer)).dx,
greaterThan(400),
reason: 'The drawer should be on the right side of the screen',
);

Comment on lines 35 to 40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expect(tester.getCenter(
find.byType(EndDrawerButton)).dx,
greaterThan(400), reason: 'The drawer button should be on the right side of the app bar',
);
expect(
tester.getCenter(find.byType(EndDrawerButton)).dx,
greaterThan(400),
reason: 'The drawer button should be on the right side of the app bar',
);

Comment on lines 22 to 26
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expect(tester.getCenter(
find.byType(Drawer)).dx,
lessThan(400), reason: 'The drawer should be on the left side of the screen',
);
expect(
tester.getCenter(find.byType(Drawer)).dx,
lessThan(400),
reason: 'The drawer should be on the left side of the screen',
);

Comment on lines 35 to 40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expect(tester.getCenter(
find.byType(DrawerButton)).dx,
lessThan(400), reason: 'The drawer button should be on the left side of the app bar',
);
expect(
tester.getCenter(find.byType(DrawerButton)).dx,
lessThan(400),
reason: 'The drawer button should be on the left side of the app bar',
);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Closes the drawer by tapping outside the drawer
// Closes the drawer by tapping outside the drawer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Closes the drawer by tapping outside the drawer
// Closes the drawer by tapping outside the drawer.

@bleroux bleroux force-pushed the flutter/api/example/Add-tests-for-scaffold-drawer-and-end-drawer branch from 60feecf to 40ef7ab Compare June 6, 2024 07:12
);
expect(find.text('This is the Drawer'), findsOne);

// Closes the drawer by tapping the button inside the drawer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Closes the drawer by tapping the button inside the drawer.
// Close the drawer by tapping the button inside the drawer.


expect(find.byType(Drawer), findsNothing);

// Opens the drawer by tapping the drawer button in the app bar.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Opens the drawer by tapping the drawer button in the app bar.
// Open the drawer by tapping the drawer button in the app bar.

expect(find.byType(Drawer), findsOne);
expect(find.text('This is the Drawer'), findsOne);

// Closes the drawer by tapping outside the drawer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Closes the drawer by tapping outside the drawer.
// Close the drawer by tapping outside the drawer.


expect(find.byType(Drawer), findsNothing);

// Opens the drawer by tapping the button at the center of the screen.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Opens the drawer by tapping the button at the center of the screen.
// Open the drawer by tapping the button at the center of the screen.

);
expect(find.text('This is the Drawer'), findsOne);

// Closes the drawer by tapping the button inside the drawer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Closes the drawer by tapping the button inside the drawer.
// Close the drawer by tapping the button inside the drawer.


expect(find.byType(Drawer), findsNothing);

// Opens the drawer by tapping the drawer button in the app bar.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Opens the drawer by tapping the drawer button in the app bar.
// Open the drawer by tapping the drawer button in the app bar.

expect(find.byType(Drawer), findsOne);
expect(find.text('This is the Drawer'), findsOne);

// Closes the drawer by tapping outside the drawer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Closes the drawer by tapping outside the drawer.
// Close the drawer by tapping outside the drawer.

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #149383 at sha 40ef7ab

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Jun 6, 2024
Copy link
Member

@TahaTesser TahaTesser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bleroux bleroux added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 11, 2024
@auto-submit auto-submit bot merged commit aad70e5 into flutter:master Jun 11, 2024
yaakovschectman added a commit that referenced this pull request Jun 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 11, 2024
yaakovschectman added a commit that referenced this pull request Jun 11, 2024
Reverts #149383 as it caused failure for mac
framework_tests_impeller.
@bleroux
Copy link
Contributor

bleroux commented Jun 11, 2024

@ValentinVignal This was reverted due to an infra failure.
Nothing wrong with your PR, but there is a bad infra failure since last week.
Thank you to file this PR again and, before landing it, we will wait for #149851 to be fixed.

@ValentinVignal
Copy link
Contributor Author

Sure, I'll do that

@ValentinVignal
Copy link
Contributor Author

Here it is @bleroux #150047

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 11, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jun 11, 2024
flutter/flutter@32081aa...14df7be

2024-06-11 [email protected] Revert "Add tests for scaffold drawer and end drawer" (flutter/flutter#150045)
2024-06-11 [email protected] Add tests for scaffold drawer and end drawer (flutter/flutter#149383)
2024-06-11 [email protected] Add high-contrast theme (flutter/flutter#149779)
2024-06-11 [email protected] Manual Pub Roll (flutter/flutter#150025)
2024-06-10 [email protected] [docs] Per-platform desktop triage instructions (flutter/flutter#150019)
2024-06-10 [email protected] Fix copy-paste-o in MethodChannel.invokeListMethod doc (flutter/flutter#149976)
2024-06-10 [email protected] Unpin `camera_android` and remove its only usage (flutter/flutter#150017)
2024-06-10 [email protected] Fixes a bug where NavigatorState.pop does not consider any possible sâ�¦ (flutter/flutter#150014)
2024-06-10 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reland: [CupertinoActionSheet] Match colors to native (#149568) (#150015)" (flutter/flutter#150021)
2024-06-10 [email protected] Reland: [CupertinoActionSheet] Match colors to native (#149568) (flutter/flutter#150015)
2024-06-10 [email protected] Temporarily run Mac_arm64 framework_tests_misc on only Mac-13 (flutter/flutter#150009)
2024-06-10 [email protected] Fixes TextField hinttext in a11y_assessment (flutter/flutter#150007)
2024-06-10 [email protected] Use const bool.fromEnvironment("dart.tool.dart2wasm") to detect dart2wasm (flutter/flutter#149996)
2024-06-10 [email protected] Roll Packages from 8a2c4e4 to e95fe4a (3 revisions) (flutter/flutter#149997)
2024-06-10 [email protected] [web] Notify engine of handled PointerScrollEvents. (flutter/flutter#145500)
2024-06-10 [email protected] Cut no-longer-accurate microtask reference in finalizeTree doc (flutter/flutter#149941)
2024-06-10 [email protected] Update hasTrailingSpaces (flutter/flutter#149698)
2024-06-10 [email protected] [web] Change `--web-renderer` default from `auto` to `canvaskit` (flutter/flutter#149773)
2024-06-10 [email protected] Retain the toString method for subclasses of Key in profile/release mode (flutter/flutter#149926)
2024-06-10 [email protected] Remove package:platform from issue template (flutter/flutter#149995)
2024-06-10 [email protected] Revert "[CupertinoActionSheet] Match colors to native (#149568)" (flutter/flutter#149998)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App d: api docs Issues with https://api.flutter.dev/ d: examples Sample code and demos framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants