WIP: search artifact hit opens the viewer (run #231)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/features/artifacts/domain/artifact_document.dart';
|
||||
import 'package:pipelines_app/features/artifacts/domain/artifact_groups.dart';
|
||||
import 'package:pipelines_app/features/artifacts/domain/artifact_record.dart';
|
||||
import 'package:pipelines_app/features/artifacts/domain/gallery_navigation.dart';
|
||||
@@ -171,6 +172,38 @@ void main() {
|
||||
expect(pagedArtifacts(groups), isEmpty);
|
||||
expect(viewerIndexByUrl(groups), isEmpty);
|
||||
});
|
||||
|
||||
test('search navigation can include an external-only session export', () {
|
||||
final groups = <ArtifactGroup>[
|
||||
ArtifactGroup(
|
||||
stageKey: 'a',
|
||||
visit: 1,
|
||||
artifacts: const <ArtifactRecord>[],
|
||||
documents: <ArtifactDocument>[
|
||||
ArtifactDocument(
|
||||
name: 'session.html',
|
||||
record: ArtifactRecord(
|
||||
name: 'session.html',
|
||||
url: '/artifacts/1/session.html',
|
||||
contentType: 'text/html',
|
||||
sizeBytes: 1,
|
||||
raw: <String, dynamic>{},
|
||||
),
|
||||
absence: '',
|
||||
),
|
||||
],
|
||||
),
|
||||
];
|
||||
|
||||
expect(pagedArtifacts(groups), isEmpty);
|
||||
expect(
|
||||
pagedArtifacts(
|
||||
groups,
|
||||
includeExternalDocuments: true,
|
||||
).single.artifact.name,
|
||||
'session.html',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
group('paging', () {
|
||||
|
||||
Reference in New Issue
Block a user