Skip to content

widgetbook/widgetbook_test_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golden Testing with Widgetbook

This repo provides a very initial design of how should Golden Testing be supported in Widgetbook. We currently discussing creating a new package called widgetbook_test that will provide the necessary utilities and code generation to support Golden Testing.

Warning

The code in this repository is highly hypothetical, and DOES NOT WORK.
It is only meant to show the syntax and the outcome of code generation.

Files

File Description
foo_widget.dart The widget file
foo_widget.usecase.dart Contains functions annotated with @UseCase(...)
widgetbook.scenarios.g.dart WidgetbookTestScenario For each @UseCase element
golden_test.dart A normal golden test file using alchemist

Flow

stateDiagram-v2
    Widget --> @UseCase
    @UseCase --> widgetbook.directories.g.dart: WidgetbookUseCase
    widgetbook.directories.g.dart --> widgetbook.dart: Used in
    @UseCase --> widgetbook.scenarios.g.dart: WidgetbookTestScenario
    widgetbook.scenarios.g.dart --> golden_test.dart: Used in
Loading

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published