diff --git a/frontend/lib/models/test_result.dart b/frontend/lib/models/test_result.dart index 98a8d099..ba6d2e6c 100644 --- a/frontend/lib/models/test_result.dart +++ b/frontend/lib/models/test_result.dart @@ -12,6 +12,7 @@ class PreviousTestResult with _$PreviousTestResult { const factory PreviousTestResult({ required TestResultStatus status, required String version, + @JsonKey(name: 'artefact_id') required int artefactId, }) = _PreviousTestResult; factory PreviousTestResult.fromJson(Map json) => diff --git a/frontend/lib/ui/artefact_page/test_result_expandable.dart b/frontend/lib/ui/artefact_page/test_result_expandable.dart index a6518bd3..2d25f186 100644 --- a/frontend/lib/ui/artefact_page/test_result_expandable.dart +++ b/frontend/lib/ui/artefact_page/test_result_expandable.dart @@ -4,6 +4,7 @@ import 'package:yaru/widgets.dart'; import '../../models/test_result.dart'; import '../../providers/test_result_issues.dart'; +import '../../routing.dart'; import '../expandable.dart'; import 'test_issues/test_issues_expandable.dart'; @@ -82,9 +83,12 @@ class PreviousTestResultsWidget extends StatelessWidget { return Row( children: previousResults .map( - (e) => Tooltip( - message: 'Version: ${e.version}', - child: e.status.icon, + (e) => InkWell( + onTap: () => navigateToArtefactPage(context, e.artefactId), + child: Tooltip( + message: 'Version: ${e.version}', + child: e.status.icon, + ), ), ) .toList(),