Skip to content

test: Update game_widget_lifecycle_test for material_ui 1.8.0 - #4125

Merged
spydon merged 3 commits into
flame-engine:mainfrom
mdebbar:fix-game-widget-lifecycle-test
Oct 21, 2026
Merged

spydon merged 3 commits into
flame-engine:mainfrom
mdebbar:fix-game-widget-lifecycle-test

Conversation

@mdebbar

@mdebbar mdebbar commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

material_ui 1.8.0 (flutter/packages#13161) enabled route-transition raster snapshotting (allowSnapshotting = true) in FadeForwardsPageTransitionsBuilder on Android, matching ZoomPageTransitionsBuilder.

In game_widget_lifecycle_test.dart, when tester.tap(find.text('Play')) pumps a second frame 16ms into the /game route transition, SnapshotWidget reuses the raster snapshot captured on the first transition frame instead of calling GameRenderBox.paint a second time.

Example CI failures:

This disables route-transition snapshotting via FadeForwardsPageTransitionsBuilder(allowSnapshotting: false) in _MyApp so the game continues rendering live during the transition.

Part of flutter/flutter#194883

auto-submit Bot pushed a commit to flutter/tests that referenced this pull request Oct 20, 2026
`material_ui` 1.8.0 (flutter/packages#13161) enabled route-transition raster snapshotting ([`allowSnapshotting = true`](https://github.com/flutter/packages/blob/623479c2ee9209316460eafb3f3cff61367127a0/packages/material_ui/lib/src/page_transitions_theme.dart#L590-L607)) in `FadeForwardsPageTransitionsBuilder`, causing `game_widget_lifecycle_test.dart` in `flame.test` to fail because `SnapshotWidget` reuses the cached route raster instead of calling `GameRenderBox.paint` a second time during the transition.

Example CI failures:
- https://ci.chromium.org/b/8667404745333857041
- https://ci.chromium.org/b/8667406041351366033

This temporarily disables `flame.test` to unblock the `flutter/flutter` tree while flame-engine/flame#4125 lands.

Part of flutter/flutter#194883

@justinmc justinmc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me as the author of flutter/packages#13161. Another option would be to manually disable snapshotting (FadeForwardsTransitionsBuilder.allowSnapshotting = false) if that works better for Flame. Any animations running in the route will freeze during the transition if snapshotting is enabled.

@spydon

spydon commented Oct 21, 2026

Copy link
Copy Markdown
Member

Looks good to me as the author of flutter/packages#13161. Another option would be to manually disable snapshotting (FadeForwardsTransitionsBuilder.allowSnapshotting = false) if that works better for Flame. Any animations running in the route will freeze during the transition if snapshotting is enabled.

@mdebbar this sounds like a better option.

@spydon
spydon enabled auto-merge (squash) October 21, 2026 08:14
@spydon
spydon merged commit 69b0968 into flame-engine:main Oct 21, 2026
8 checks passed
auto-submit Bot pushed a commit to flutter/tests that referenced this pull request Oct 21, 2026
Follow-up to #508.

flame-engine/flame#4125 (`69b0968f97e3fdc07b3f19a44ba0df5a01a53d04`) updated `game_widget_lifecycle_test.dart` in `flame-engine/flame` to disable route-transition snapshotting (`FadeForwardsPageTransitionsBuilder(allowSnapshotting: false)`) for `material_ui` 1.8.0.

This re-enables `registry/flame.test` and updates the pinned `flame` revision to `69b0968f97e3fdc07b3f19a44ba0df5a01a53d04`.

Part of flutter/flutter#194883
opensource-fork-sync Bot pushed a commit to cla7aye15I4nd/opensource-flutter__flutter that referenced this pull request Oct 21, 2026
Follow-up to flutter#194886.

flame-engine/flame#4125
(`69b0968f97e3fdc07b3f19a44ba0df5a01a53d04`) updated
`game_widget_lifecycle_test.dart` in `flame-engine/flame` for
`material_ui` 1.8.0, and flutter/tests#509
(`39874535bcc16e86286fa634e0479c0ec85ce1ae`) re-enabled
`registry/flame.test` in `flutter/tests`.

This rolls `dev/customer_testing/tests.version` to
`39874535bcc16e86286fa634e0479c0ec85ce1ae`.

Fixes flutter#194883
LongCatIsLooong pushed a commit to LongCatIsLooong/flutter that referenced this pull request Oct 22, 2026
Follow-up to flutter#194886.

flame-engine/flame#4125
(`69b0968f97e3fdc07b3f19a44ba0df5a01a53d04`) updated
`game_widget_lifecycle_test.dart` in `flame-engine/flame` for
`material_ui` 1.8.0, and flutter/tests#509
(`39874535bcc16e86286fa634e0479c0ec85ce1ae`) re-enabled
`registry/flame.test` in `flutter/tests`.

This rolls `dev/customer_testing/tests.version` to
`39874535bcc16e86286fa634e0479c0ec85ce1ae`.

Fixes flutter#194883
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
Follow-up to flutter#194886.

flame-engine/flame#4125
(`69b0968f97e3fdc07b3f19a44ba0df5a01a53d04`) updated
`game_widget_lifecycle_test.dart` in `flame-engine/flame` for
`material_ui` 1.8.0, and flutter/tests#509
(`39874535bcc16e86286fa634e0479c0ec85ce1ae`) re-enabled
`registry/flame.test` in `flutter/tests`.

This rolls `dev/customer_testing/tests.version` to
`39874535bcc16e86286fa634e0479c0ec85ce1ae`.

Fixes flutter#194883
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants