mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 19:11:58 +01:00
Test that tags without a release display properly
Update the `TestTagViewWithoutRelease` test case with another assert: one that checks that the release title is properly displayed. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
parent
c41b2c73ef
commit
19ff532d42
1 changed files with 8 additions and 0 deletions
|
@ -7,6 +7,7 @@ package integration
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.gitea.io/gitea/models"
|
"code.gitea.io/gitea/models"
|
||||||
|
@ -56,6 +57,13 @@ func TestTagViewWithoutRelease(t *testing.T) {
|
||||||
// Test that the release sub-menu isn't active
|
// Test that the release sub-menu isn't active
|
||||||
releaseLink := htmlDoc.Find(".small-menu-items .item[href*='/releases']")
|
releaseLink := htmlDoc.Find(".small-menu-items .item[href*='/releases']")
|
||||||
assert.False(t, releaseLink.HasClass("active"))
|
assert.False(t, releaseLink.HasClass("active"))
|
||||||
|
|
||||||
|
// Test that the title is displayed
|
||||||
|
releaseTitle := strings.TrimSpace(htmlDoc.Find("h4.release-list-title").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) {
|
func TestCreateNewTagProtected(t *testing.T) {
|
||||||
|
|
Loading…
Reference in a new issue