feat(app): a run's stage visit opens as its own page, from the graph, the timeline or a link

This commit is contained in:
2026-10-23 17:35:33 +01:00
parent e96d1b5ca8
commit 925f04e300
5 changed files with 124 additions and 30 deletions
@@ -138,8 +138,12 @@ void main() {
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
expect(find.text('plan · visit 1'), findsOneWidget);
expect(find.text('plan · visit 5'), findsNothing);
// The visit is its own page over the Timeline tab.
expect(
find.byKey(const Key('run-detail-tab-body-timeline')),
find.byKey(
const Key('run-detail-tab-body-timeline'),
skipOffstage: false,
),
findsWidgets,
);
});
@@ -48,14 +48,22 @@ void main() {
await tapGraphNode(tester, 'plan');
await tester.pumpAndSettle();
// The Graph reports the stage and the detail moves to Timeline, where the
// exact recorded visit is open.
// The Graph reports the stage; the exact recorded visit opens as its
// own page over the Timeline tab.
expect(find.byType(RunGraphView), findsNothing);
expect(
find.byKey(const Key('run-detail-tab-body-timeline')),
find.byKey(
const Key('run-detail-tab-body-timeline'),
skipOffstage: false,
),
findsOneWidget,
);
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
// On its own page: the timeline list is covered, not swapped in place.
expect(
find.byKey(const Key('run-detail-tab-body-timeline')),
findsNothing,
);
expect(find.byKey(const Key('run-visit-title')), findsOneWidget);
expect(find.text('plan · visit 1'), findsOneWidget);
expect(find.textContaining('Status:'), findsOneWidget);
@@ -90,8 +98,10 @@ void main() {
await tapGraphNode(tester, 'plan');
await tester.pumpAndSettle();
// At 320/2x the strip scrolls. A Graph-driven switch must scroll the
// selected Timeline segment into view, not leave Summary/Graph showing.
// Leaving the visit page lands on Timeline. At 320/2x the strip
// scrolls; the selected Timeline segment must be in view.
await tester.tap(find.byKey(const Key('run-visit-back')));
await tester.pumpAndSettle();
final timeline = tester.getRect(runDetailTab(RunDetailTab.timeline));
expect(timeline.left, greaterThanOrEqualTo(0));
expect(timeline.right, lessThanOrEqualTo(320));