0 purchases
storybook toolkit tester
Storybook Toolkit Tester #
Setup: #
Import storybook_toolkit_tester package:
dev_dependencies:
storybook_toolkit_tester: ^1.2.0
copied to clipboard
Create test file, e.g. storybook_test.dart.
Add the following content there:
void main() => testStorybook(
storybook,
devices: { Devices.ios.iPhoneSE, Devices.android.pixel4, Devices.ios.iPadAir4 },
filterStories: (Story story) {
final skipStories = [];
return !skipStories.contains(story.name);
},
);
final storybook = Storybook(
stories: [
Story(
name: 'Button',
builder: (context) => ElevatedButton(
onPressed: () {},
child: const Text('Button'),
),
),
Story(
name: 'CounterPage',
builder: (context) => const CounterPage(),
),
],
);
copied to clipboard
Generate golden images by running: flutter test --update-goldens --tags=storybook.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.