diff --git a/packages/playbook_snapshot/lib/src/snapshot.dart b/packages/playbook_snapshot/lib/src/snapshot.dart index d9f019e..95d013f 100644 --- a/packages/playbook_snapshot/lib/src/snapshot.dart +++ b/packages/playbook_snapshot/lib/src/snapshot.dart @@ -46,6 +46,7 @@ class Snapshot implements TestTool { Playbook playbook, WidgetTester tester, PlaybookBuilder builder, { + ScenarioWidgetBuilder? scenarioWidgetBuilder, Future Function(WidgetTester tester)? setUpEachTest, }) async { await tester.runAsync(() async { @@ -80,6 +81,7 @@ class Snapshot implements TestTool { checkeredColor: checkeredColor, checkeredRectSize: checkeredRectSize, useMaterial: useMaterial, + builder: scenarioWidgetBuilder, scenario: scenario, ), device, diff --git a/packages/playbook_snapshot/lib/src/test_tool.dart b/packages/playbook_snapshot/lib/src/test_tool.dart index 6ec720d..e467762 100644 --- a/packages/playbook_snapshot/lib/src/test_tool.dart +++ b/packages/playbook_snapshot/lib/src/test_tool.dart @@ -10,6 +10,7 @@ abstract class TestTool { Playbook playbook, WidgetTester tester, PlaybookBuilder builder, { + ScenarioWidgetBuilder? scenarioWidgetBuilder, Future Function(WidgetTester tester)? setUpEachTest, }); } @@ -19,12 +20,14 @@ extension PlaybookExt on Playbook { TestTool test, WidgetTester tester, PlaybookBuilder builder, { + ScenarioWidgetBuilder? scenarioWidgetBuilder, Future Function(WidgetTester tester)? setUpEachTest, }) async { await test.run( this, tester, builder, + scenarioWidgetBuilder: scenarioWidgetBuilder, setUpEachTest: setUpEachTest, ); }