diff options
author | Earl Warren <earl-warren@noreply.codeberg.org> | 2024-03-04 10:56:43 +0100 |
---|---|---|
committer | Earl Warren <earl-warren@noreply.codeberg.org> | 2024-03-04 10:56:43 +0100 |
commit | c510b7a4a150d795213c1bfef19be7c583ef9441 (patch) | |
tree | 79a123fed31c8b1165272c6800b4f771d89ac36c /tests | |
parent | [I18N] Translations update from Weblate (#2521) (diff) | |
parent | A release title should always be a link (diff) | |
download | forgejo-c510b7a4a150d795213c1bfef19be7c583ef9441.tar.xz forgejo-c510b7a4a150d795213c1bfef19be7c583ef9441.zip |
Merge pull request 'Display tag name as title for a tag with no release [gitea]' (#2547) from algernon/forgejo:gitea/port/tag-name-as-title-if-no-release into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2547
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration/repo_tag_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/integration/repo_tag_test.go b/tests/integration/repo_tag_test.go index 60c73ae63e..3fa3454343 100644 --- a/tests/integration/repo_tag_test.go +++ b/tests/integration/repo_tag_test.go @@ -7,6 +7,7 @@ package integration import ( "net/http" "net/url" + "strings" "testing" "code.gitea.io/gitea/models" @@ -56,6 +57,13 @@ func TestTagViewWithoutRelease(t *testing.T) { // Test that the release sub-menu isn't active releaseLink := htmlDoc.Find(".small-menu-items .item[href*='/releases']") assert.False(t, releaseLink.HasClass("active")) + + // Test that the title is displayed + releaseTitle := strings.TrimSpace(htmlDoc.Find("h4.release-list-title > a").Text()) + assert.Equal(t, "no-release", releaseTitle) + + // Test that there is no "Stable" link + htmlDoc.AssertElement(t, "h4.release-list-title > span.ui.green.label", false) } func TestCreateNewTagProtected(t *testing.T) { |