From 0e0094d7245d3176cd6930ea72e2595e4e21964e Mon Sep 17 00:00:00 2001 From: Ivan Lausuch Date: Tue, 29 Jun 2021 09:34:11 +0000 Subject: [PATCH] Add link to /test/overview from a parent job group Provides link to /tests/overview of latest builds of all job groups within a parent job group https://progress.opensuse.org/issues/94732 --- t/22-dashboard.t | 7 +++++++ templates/webapi/main/parent_group_overview.html.ep | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/t/22-dashboard.t b/t/22-dashboard.t index 780e93b4811..04864519210 100644 --- a/t/22-dashboard.t +++ b/t/22-dashboard.t @@ -194,6 +194,13 @@ for my $url (@urls) { # parent group overview $t->get_ok('/parent_group_overview/' . $test_parent->id)->status_is(200); check_test_parent('expanded'); +$t->element_exists('#test_result_overview_link'); +my $tests_overview = $t->tx->res->dom->find("#test_result_overview_link")->first; +is( + $tests_overview->attr("href"), + "/tests/overview?todo=1&groupid=1001&groupid=1002", + "The 'test result overview' anchor href points to /test/overview and includes all the groupids" +); # add tags (99901 is user ID of arthur) my $tag_for_0092_comment = $opensuse_group->comments->create({text => 'tag:0092:important:some_tag', user_id => 99901}); diff --git a/templates/webapi/main/parent_group_overview.html.ep b/templates/webapi/main/parent_group_overview.html.ep index 9f16ab5ffee..b2b1022c0b8 100644 --- a/templates/webapi/main/parent_group_overview.html.ep +++ b/templates/webapi/main/parent_group_overview.html.ep @@ -21,6 +21,15 @@ Last Builds for <%= $group->{name} %> +

+ + Test result overview + +

+ %= include 'main/pinned_comments'