scenarioDeclarationSink top-level property
A scenario: a widget test with per-step screenshots.
scenario is testWidgets plus a ScenarioTester — so every scenario is
an ordinary widget test, runnable by a bare flutter test with no daemon
and no GUI.
scenario('Onboarding', (s) async {
await s.pumpWidget(MyApp());
await s.tap('NEXT');
await s.enterText('Email', 'x@example.com', shot: Shot('Filled form'));
await s.screen('Home');
expect(find.text('Done'), findsOneWidget);
});
Collects the names scenario() declares, while the harness declares one
file.
The harness runs every declared test in the group it walks, and a
test/scenarios/ folder may hold ordinary testWidgets too — which
produce no steps, cannot be opened in the panel, and were being run
invisibly. Knowing which tests are scenarios cannot be done by looking at
the built group (a test is a test), and reading it off the source would
mean the runner and the syntactic scan disagreeing about non-literal
names. Recording it as it is declared is the one answer that is true by
construction.
Null outside the harness, where nothing is collecting.
Implementation
List<String>? scenarioDeclarationSink;