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:
@@ -270,6 +270,10 @@ void main() {
|
||||
],
|
||||
);
|
||||
await replyVisitDetail(tester, channel, 77);
|
||||
// The visit opens as its own page once the detail has drawn.
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 400));
|
||||
await tester.pump(const Duration(milliseconds: 400));
|
||||
|
||||
// The query reached the detail: visit 0 is the earlier plan visit (seq 1),
|
||||
// not the latest one the pane would show without a visit.
|
||||
@@ -287,6 +291,8 @@ void main() {
|
||||
await provider.didPushRouteInformation(RouteInformation(uri: restored));
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
await tester.pump(const Duration(milliseconds: 400));
|
||||
await tester.pump(const Duration(milliseconds: 400));
|
||||
expect(find.text('plan · visit 5'), findsOneWidget);
|
||||
expect(provider.value.uri.path, '/runs/77/stage/plan');
|
||||
expect(provider.value.uri.query, 'visit=1');
|
||||
|
||||
@@ -494,9 +494,18 @@ void main() {
|
||||
expect(provider.value.uri.path, '/runs/7');
|
||||
expect(find.byType(SearchScreen), findsNothing);
|
||||
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
|
||||
expect(find.text('build · visit 2'), findsOneWidget);
|
||||
expect(
|
||||
find.descendant(
|
||||
of: find.byKey(const Key('run-visit-pane')),
|
||||
matching: find.text('build · visit 2'),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
|
||||
// A retired field hit replaces that open visit with the plain Summary.
|
||||
// Leave the visit page (it covers the shell), then a retired field hit
|
||||
// opens the plain Summary with no visit.
|
||||
await tester.tap(find.byKey(const Key('run-visit-back')));
|
||||
await tester.pumpAndSettle();
|
||||
await sendSearch(query: 'retired', index: 1, hit: retiredFieldHit());
|
||||
await tester.tap(
|
||||
find.byKey(const ValueKey('search.result.run:7:5:evidence')),
|
||||
@@ -602,7 +611,13 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
|
||||
expect(find.text('build · visit 2'), findsOneWidget);
|
||||
expect(
|
||||
find.descendant(
|
||||
of: find.byKey(const Key('run-visit-pane')),
|
||||
matching: find.text('build · visit 2'),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
|
||||
await tester.pumpWidget(const SizedBox.shrink());
|
||||
await tester.pump();
|
||||
@@ -694,6 +709,8 @@ void main() {
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byKey(const Key('run-visit-pane')), findsOneWidget);
|
||||
|
||||
await tester.tap(find.byKey(const Key('run-visit-back')));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.text('Back to list'));
|
||||
await tester.pump();
|
||||
await tester.pump();
|
||||
|
||||
Reference in New Issue
Block a user