feat(app): stage tabs are Summary (input and output), Artifacts, Changes and More (session and definition)

This commit is contained in:
2026-10-23 19:23:01 +01:00
parent 65c9b71cae
commit 1ce3613b1d
4 changed files with 152 additions and 6 deletions
@@ -21,8 +21,18 @@ void main() {
expect(find.text('Back'), findsNothing);
// The page bar's own Back is the only one.
expect(find.byKey(const Key('run-visit-back')), findsOneWidget);
// Four tabs: Summary, Artifacts, Changes, More.
expect(shownVisitSections, [
RunVisitSection.summary,
RunVisitSection.artifacts,
RunVisitSection.changes,
RunVisitSection.more,
]);
// Summary holds both Input and Output.
expect(find.text('Input'), findsOneWidget);
expect(find.text('Output'), findsOneWidget);
// Every tab shows its glyph above its name.
for (final section in RunVisitSection.values) {
for (final section in shownVisitSections) {
final tab = find.byKey(ValueKey('run-visit-tab-${section.name}'));
expect(
find.descendant(
@@ -115,10 +115,24 @@ Future<void> openVisit(
await tester.pumpAndSettle();
}
/// Opens the tab showing [section]: Input and Output are on Summary, Session
/// and Definition behind More's switch.
Future<void> openVisitTab(WidgetTester tester, RunVisitSection section) async {
final tab = find.byKey(ValueKey('run-visit-tab-${section.name}'));
final shown = visitTabFor(section);
final tab = find.byKey(ValueKey('run-visit-tab-${shown.name}'));
await tester.ensureVisible(tab);
await tester.pumpAndSettle();
await tester.tap(tab);
await tester.pumpAndSettle();
if (section == RunVisitSection.session ||
section == RunVisitSection.definition) {
final choice = find.descendant(
of: find.byKey(const Key('run-visit-more-switch')),
matching: find.text(
section == RunVisitSection.session ? 'Session' : 'Definition',
),
);
await tester.tap(choice);
await tester.pumpAndSettle();
}
}