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

Fix dirty paint state in golden tests #43

Merged
merged 1 commit into from
May 1, 2024
Merged

Conversation

angelosilvestre
Copy link
Collaborator

Fix dirty paint stat in golden tests

The same issue that happened in #41 now is happening in super_editor in some Android golden tests:

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test:
'package:flutter_test/src/_matchers_io.dart': Failed assertion: line 29 pos 10:
'!renderObject.debugNeedsPaint': is not true.

When the exception was thrown, this was the stack:
#2      captureImage (package:flutter_test/src/_matchers_io.dart:29:10)
#3      MatchesGoldenFile.matchAsync (package:flutter_test/src/_matchers_io.dart:96:21)
#4      _expect (package:matcher/src/expect/expect.dart:109:26)
#5      expectLater (package:matcher/src/expect/expect.dart:73:5)
#6      expectLater (package:flutter_test/src/widget_tester.dart:511:25)
#7      compareWithGolden (package:golden_toolkit/src/testing_tools.dart:296:9)

This is a test only issue.

To fix that, this PR changes the workaround added in #40 to run on all platforms.

@angelosilvestre angelosilvestre changed the title Fix dirty paint stat in golden tests Fix dirty paint state in golden tests Apr 27, 2024
Copy link
Collaborator

@matthew-carroll matthew-carroll left a comment

Choose a reason for hiding this comment

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

LGTM - Remind me to cut a new release on our next call

@matthew-carroll matthew-carroll merged commit c7781a6 into main May 1, 2024
2 checks passed
@matthew-carroll matthew-carroll deleted the golden_fix branch May 1, 2024 04:45
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.

2 participants