feat(app): artifact viewer actions are bottom icons; swipe pages; native download, share and open in browser
This commit is contained in:
@@ -223,7 +223,11 @@ void main() {
|
||||
stage: 'review',
|
||||
visit: 1,
|
||||
artifacts: <JsonMap>[
|
||||
artifact('report.zip', contentType: 'application/zip', sizeBytes: 3),
|
||||
artifact(
|
||||
'report.zip',
|
||||
contentType: 'application/zip',
|
||||
sizeBytes: 3,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
@@ -262,6 +266,14 @@ void main() {
|
||||
artifact: _record,
|
||||
resolved: resolveArtifactUrl(_endpoint, _record.url)!,
|
||||
fetch: _fetch,
|
||||
bridge: const ArtifactFileBridge(
|
||||
downloadSupported: false,
|
||||
shareSupported: false,
|
||||
downloadUnsupportedMessage:
|
||||
'Downloading files is not supported on this platform yet.',
|
||||
shareUnsupportedMessage:
|
||||
'File sharing is not supported on this platform yet.',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -374,8 +386,8 @@ void main() {
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Download'), findsOneWidget);
|
||||
expect(find.text('Share'), findsOneWidget);
|
||||
expect(find.byKey(const Key('artifact-download')), findsOneWidget);
|
||||
expect(find.byKey(const Key('artifact-share')), findsOneWidget);
|
||||
|
||||
final externalGroup = visitGroup(artifacts: <ArtifactRecord>[external]);
|
||||
await tester.pumpWidget(
|
||||
@@ -395,9 +407,9 @@ void main() {
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(find.text('Download'), findsNothing);
|
||||
expect(find.text('Share'), findsNothing);
|
||||
expect(find.text('Open'), findsOneWidget);
|
||||
expect(find.byKey(const Key('artifact-download')), findsNothing);
|
||||
expect(find.byKey(const Key('artifact-share')), findsNothing);
|
||||
expect(find.byKey(const Key('artifact-open')), findsOneWidget);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user