Open HugoHeneault opened 2 years ago
Love the feedback!
Visual testing is definitely on our roadmap. We can't wait to start working on it. We think Monarch can drastically improve the golden test experience.
For now, if you are using golden_toolkit, then you can call your stories from your golden tests. Something like this should work:
// my_stories.dart
Widget primaryButton() => ...;
Widget secondaryButton() => ...;
// my_golden_tests.dart
testGoldens('my buttons', (tester) async {
await tester.pumpWidgetBuilder(
Center(
child: (GoldenBuilder.column()
..addScenario('primary button',
primaryButton())
..addScenario('secondary button',
secondaryButton())
.build()),
surfaceSize: ...,
);
await screenMatchesGolden(...);
});
Hi there!
Monarch looks awesome. I haven't seen anything about creating images of stories, then testing they don't change later. I'm using https://pub.dev/packages/golden_toolkit which is great to avoid unwanted design changes/regressions.
It would be awesome to create goldens from monarch then test it: great design, then great tests!
Thanks for your cool work here!