feat(app): an open pipeline, run or chat fills a phone screen; Back steps up one level; stage tabs end with Session
This commit is contained in:
@@ -21,12 +21,12 @@ 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.
|
||||
// Four tabs: Summary, Artifacts, Changes, Session.
|
||||
expect(shownVisitSections, [
|
||||
RunVisitSection.summary,
|
||||
RunVisitSection.artifacts,
|
||||
RunVisitSection.changes,
|
||||
RunVisitSection.more,
|
||||
RunVisitSection.session,
|
||||
]);
|
||||
// Summary holds both Input and Output.
|
||||
expect(find.text('Input'), findsOneWidget);
|
||||
@@ -73,9 +73,8 @@ void main() {
|
||||
expect(find.text('sess-1'), findsOneWidget);
|
||||
expect(find.text('Open session.html'), findsOneWidget);
|
||||
|
||||
await openVisitTab(tester, RunVisitSection.definition);
|
||||
expect(find.byType(StageDefinitionView), findsOneWidget);
|
||||
expect(find.text('Draft the plan.'), findsOneWidget);
|
||||
// The stage's definition belongs to the pipeline, not to a visit.
|
||||
expect(find.byType(StageDefinitionView), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('${platform.name} artifacts tab reports the capture state', (
|
||||
@@ -178,21 +177,6 @@ void main() {
|
||||
expect(find.byType(ArtifactGalleryPage), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('${platform.name} missing definition uses exact wording', (
|
||||
tester,
|
||||
) async {
|
||||
await openVisit(
|
||||
tester,
|
||||
platform,
|
||||
run: visitRunFixture(declareStage: false),
|
||||
);
|
||||
await openVisitTab(tester, RunVisitSection.definition);
|
||||
|
||||
expect(find.byType(StageDefinitionView), findsNothing);
|
||||
expect(find.text(unknownStageDefinition), findsOneWidget);
|
||||
expect(find.text('Draft the plan.'), findsNothing);
|
||||
});
|
||||
|
||||
testWidgets('${platform.name} visit sections at 320 with 2x dark text', (
|
||||
tester,
|
||||
) async {
|
||||
|
||||
@@ -115,8 +115,7 @@ Future<void> openVisit(
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
|
||||
/// Opens the tab showing [section]: Input and Output are on Summary, Session
|
||||
/// and Definition behind More's switch.
|
||||
/// Opens the tab showing [section]: Input and Output are on Summary.
|
||||
Future<void> openVisitTab(WidgetTester tester, RunVisitSection section) async {
|
||||
final shown = visitTabFor(section);
|
||||
final tab = find.byKey(ValueKey('run-visit-tab-${shown.name}'));
|
||||
@@ -124,15 +123,4 @@ Future<void> openVisitTab(WidgetTester tester, RunVisitSection section) async {
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user