Keep turn documents out of the artifact viewer unless Debug is on
Opening a stage artifact paged through every visit's turn documents too, although the list hides them; the viewer now pages through what the list shows.
This commit is contained in:
@@ -196,6 +196,31 @@ void main() {
|
||||
]);
|
||||
});
|
||||
|
||||
testWidgets('${platform.name}: a stage artifact pages only through stage '
|
||||
'artifacts while Debug is off', (tester) async {
|
||||
await _pump(tester, platform);
|
||||
|
||||
// report.csv (visit 1) and notes.md (visit 2) are the only stage
|
||||
// artifacts; the visits' turn documents stay out of the viewer.
|
||||
await tester.tap(find.text('report.csv'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byType(ArtifactViewerPage), findsOneWidget);
|
||||
expect(find.text('1 of 2 · text/csv'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('${platform.name}: with Debug on, a stage artifact pages '
|
||||
'through turn documents too', (tester) async {
|
||||
await _pump(tester, platform);
|
||||
await _showTurnDocuments(tester);
|
||||
|
||||
await tester.tap(find.text('report.csv'));
|
||||
await tester.pumpAndSettle();
|
||||
expect(find.byType(ArtifactViewerPage), findsOneWidget);
|
||||
// Both stage artifacts plus the recorded viewer documents
|
||||
// (session.html opens externally only).
|
||||
expect(find.text('1 of 6 · text/csv'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets('${platform.name}: documents do not count as artifacts and '
|
||||
'viewer paging stays within documents', (tester) async {
|
||||
await _pump(
|
||||
|
||||
Reference in New Issue
Block a user