diff --git a/templates/repo/release_tag_header.tmpl b/templates/repo/release_tag_header.tmpl index f474fb89ea..6f3d28e7ad 100644 --- a/templates/repo/release_tag_header.tmpl +++ b/templates/repo/release_tag_header.tmpl @@ -5,9 +5,9 @@
diff --git a/tests/integration/repo_tag_test.go b/tests/integration/repo_tag_test.go index d2c4160602..60c73ae63e 100644 --- a/tests/integration/repo_tag_test.go +++ b/tests/integration/repo_tag_test.go @@ -47,7 +47,15 @@ func TestTagViewWithoutRelease(t *testing.T) { // Test that the page loads req := NewRequestf(t, "GET", "/%s/releases/tag/no-release", repo.FullName()) - MakeRequest(t, req, http.StatusOK) + resp := MakeRequest(t, req, http.StatusOK) + + // Test that the tags sub-menu is active + htmlDoc := NewHTMLParser(t, resp.Body) + htmlDoc.AssertElement(t, ".small-menu-items .active.item[href*='/tags']", true) + + // Test that the release sub-menu isn't active + releaseLink := htmlDoc.Find(".small-menu-items .item[href*='/releases']") + assert.False(t, releaseLink.HasClass("active")) } func TestCreateNewTagProtected(t *testing.T) {