[ Widget Previews ] Add widget_preview_scaffold.shard to test the widget_preview_scaffold template contents (#166358)

Adds a new `widget_preview_scaffold.shard` directory which contains a
hydrated `widget_preview_scaffold` template. This will allow for us to
write widget tests against the widgets defined in the templates.

This PR doesn't add any widget tests and is only adding the ability to
run these tests in follow up changes.

Fixes https://github.com/flutter/flutter/issues/166416
This commit is contained in:
Ben Konyi
2025-04-04 14:43:52 -04:00
committed by GitHub
parent a400e79ce6
commit d6c0d6fee7
23 changed files with 984 additions and 14 deletions

View File

@@ -236,10 +236,17 @@ Future<void> _runIntegrationToolTests() async {
);
}
Future<void> _runWidgetPreviewScaffoldToolTests() async {
await runFlutterTest(
path.join(_toolsPath, 'test', 'widget_preview_scaffold.shard', 'widget_preview_scaffold'),
);
}
Future<void> _runToolTests() async {
await selectSubshard(<String, ShardRunner>{
'general': _runGeneralToolTests,
'commands': _runCommandsToolTests,
'widget_preview_scaffold': _runWidgetPreviewScaffoldToolTests,
});
}