-
Notifications
You must be signed in to change notification settings - Fork 39
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: Could not override GoldenTestTheme #127
fix: Could not override GoldenTestTheme #127
Conversation
We use AlchemistConfig.runWithConfig() for our tests. The background colour is applied with the changes. But at the time when the TableBorder is to be coloured, Zone.current[currentConfigKey] is suddenly null, which is why our colour is not applied. |
@@ -30,6 +30,7 @@ abstract class GoldenTestRunner { | |||
required Widget widget, | |||
required ThemeData? globalConfigTheme, | |||
required ThemeData? variantConfigTheme, | |||
required GoldenTestTheme? goldenTestTheme, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting that I didn't get a lint warning me that I had added a parameter to an overridden method that wasn't present in the paren't method 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the inconvenience, thanks for catching this.
domain lgtm
platform lgtm
@Brainyoo it looks like there are a couple tests that need to be updated for these changes! |
@Brainyoo am I correct in saying that this would still exist after your PR lands, i.e this PR does not address this bug? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering about the Theme Extension and whether we're expecting consumers to leverage that meaningfully or if we just want copyWith which we can hand roll as we have elsewhere. I don't see lerp being used meaningfully which made me wonder.
See next comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah OK, I got back on computer (was on mobile before) and now see how ThemeExtension
is being used 👍
domain lgtm
platform lgtm
@Brainyoo looks like just one failing test for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
domain lgtm
platform lgtm
Thank you @Brainyoo! |
Description
All our tests failed because the default GoldenTestTheme changed the background colour. The GoldenTestTheme cannot be overwritten as it is not exported via the barrel file.
Type of Change