Skip to content

Commit

Permalink
Navigate to previous artefact version by clicking on previous test re…
Browse files Browse the repository at this point in the history
…sult
  • Loading branch information
omar-selo committed Sep 10, 2024
1 parent db8b944 commit 63d2c2f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions frontend/lib/models/test_result.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Object?> json) =>
Expand Down
10 changes: 7 additions & 3 deletions frontend/lib/ui/artefact_page/test_result_expandable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 63d2c2f

Please sign in to comment.