Skip to content

Conversation

@QuncCccccc
Copy link
Contributor

@QuncCccccc QuncCccccc commented Jun 6, 2023

Updates some of the unit tests in the packages/flutter/test/material folder so that they'll pass if ThemeData.useMaterial3 defaults to true.

The files in this PR have both M2 and M3 tests, so we don't need to update these files in step 3 of #91605. Will have another PR that only sets useMaterial3 to false and will need to be updated with a M3 version.

Also fixes some issues such as in navigation_drawer_test.dart and navigation_bar_test.dart, a ThemeData object (ThemeData.light().copyWith(useMaterial3: true)) is passed to Theme.data, but when we compare the actual value and expected value, we use another ThemeData object (ThemeData()) whose useMaterial3 is false. It might be because they are new widgets, so they can pass before.

In the switch_test.dart, we already included M3 tests, so the only thing I do here is to mark the useMaterial3 to false in M2 tests.

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.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Jun 6, 2023
@github-actions github-actions bot added f: scrolling Viewports, list views, slivers, etc. a: text input Entering text in a text field or keyboard related problems labels Jun 7, 2023
@QuncCccccc QuncCccccc force-pushed the update_material_tests branch from 08c41cf to b5de9bc Compare June 12, 2023 02:31
@QuncCccccc QuncCccccc force-pushed the update_material_tests branch from daf3e0f to 73ec599 Compare June 12, 2023 17:25
@QuncCccccc QuncCccccc changed the title [WIP] Update tests for material [WIP] Update tests in material library for Material 3 by default Jun 12, 2023
@QuncCccccc QuncCccccc force-pushed the update_material_tests branch from b72543a to 71e7fb8 Compare June 12, 2023 19:34
@github-actions github-actions bot removed the f: scrolling Viewports, list views, slivers, etc. label Jun 12, 2023
@QuncCccccc QuncCccccc changed the title [WIP] Update tests in material library for Material 3 by default Update tests in material library for Material 3 by default Jun 12, 2023
@QuncCccccc QuncCccccc marked this pull request as ready for review June 12, 2023 23:08
@QuncCccccc QuncCccccc requested a review from HansMuller June 12, 2023 23:08
Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

LGTM

@HansMuller HansMuller merged commit cea728a into master Jun 13, 2023
@HansMuller HansMuller deleted the update_material_tests branch June 13, 2023 15:58
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 14, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jun 14, 2023
Manual roll requested by [email protected]

flutter/flutter@09b7e56...95be76a

2023-06-14 [email protected] [web] Migrate framework away from dart:html and package:js (flutter/flutter#128580)
2023-06-14 [email protected] Fixed slider value indicator not disappearing after a bit on desktop platform when slider is clicked not dragged (flutter/flutter#128137)
2023-06-14 [email protected] Inline AbstractNode into SemanticsNode and Layer (flutter/flutter#128467)
2023-06-14 [email protected] Roll Flutter Engine from 727b4413fe6f to 2d8d5ecfe4a8 (5 revisions) (flutter/flutter#128842)
2023-06-14 [email protected] Roll Flutter Engine from 66a5761412f9 to 727b4413fe6f (10 revisions) (flutter/flutter#128841)
2023-06-14 [email protected] Roll Flutter Engine from b6bf3a6f1ccd to 66a5761412f9 (1 revision) (flutter/flutter#128813)
2023-06-13 [email protected] Fix syntax error in docstring (flutter/flutter#128692)
2023-06-13 [email protected] Update unit tests in material library for Material 3 (flutter/flutter#128725)
2023-06-13 [email protected] [flutter_tools] Suppress git output in flutter channel (flutter/flutter#128475)
2023-06-13 [email protected] Fix ensureVisible and default focus traversal for reversed scrollables (flutter/flutter#128756)
2023-06-13 [email protected] Roll Flutter Engine from f9a0a0dafeea to b6bf3a6f1ccd (2 revisions) (flutter/flutter#128797)
2023-06-13 [email protected] Update rest of the unit tests in material library for Material 3 (flutter/flutter#128747)
2023-06-13 [email protected] Update tests in material library for Material 3 by default (flutter/flutter#128300)
2023-06-13 [email protected] Update misc tests for Material3 (flutter/flutter#128712)

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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

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 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: text input Entering text in a text field or keyboard related problems f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants