feat(app): a stage visit's sections are bottom tabs, its input and output read as values, and the page bar holds the only Back
This commit is contained in:
@@ -11,13 +11,29 @@ import 'run_detail_visit_support.dart';
|
||||
|
||||
void main() {
|
||||
for (final platform in RunDetailTestPlatform.values) {
|
||||
testWidgets('${platform.name} stage tabs sit at the bottom with one Back', (
|
||||
tester,
|
||||
) async {
|
||||
await openVisit(tester, platform, size: const Size(390, 844));
|
||||
final tabs = tester.getRect(find.byKey(const Key('run-visit-tabs')));
|
||||
expect(tabs.bottom, greaterThan(844 - 90));
|
||||
expect(find.text('Back to timeline'), findsNothing);
|
||||
expect(find.text('Back'), findsNothing);
|
||||
// The page bar's own Back is the only one.
|
||||
expect(find.byKey(const Key('run-visit-back')), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('${platform.name} tabs show recorded values and exact empty '
|
||||
'wording', (tester) async {
|
||||
await openVisit(tester, platform);
|
||||
|
||||
expect(find.textContaining('"prompt": "Ship it."'), findsOneWidget);
|
||||
// Each field by name with its value, never raw JSON.
|
||||
expect(find.text('prompt'), findsOneWidget);
|
||||
expect(find.text('Ship it.'), findsOneWidget);
|
||||
expect(find.textContaining('"prompt"'), findsNothing);
|
||||
await openVisitTab(tester, RunVisitSection.output);
|
||||
expect(find.textContaining('"result": "ok"'), findsOneWidget);
|
||||
expect(find.text('result'), findsOneWidget);
|
||||
expect(find.text('ok'), findsOneWidget);
|
||||
|
||||
await openVisitTab(tester, RunVisitSection.artifacts);
|
||||
expect(find.text('plan.csv'), findsOneWidget);
|
||||
|
||||
Reference in New Issue
Block a user