Restyle release list, fix branch dropdown (#30837)
Fixes https://github.com/go-gitea/gitea/issues/30821 and restyles the release list. Desktop: <img width="1199" alt="Screenshot 2024-05-02 at 20 46 10" src="bee92423
-d4a9-4b26-8301-3a1e09eef4cd"> Mobile: <img width="443" alt="Screenshot 2024-05-02 at 20 46 21" src="42ecbae5
-bdb6-4b16-a0ee-9c64daede68d"> --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
parent
8218b6484c
commit
ed25676a9a
4 changed files with 68 additions and 45 deletions
|
@ -142,7 +142,7 @@ func TestViewReleaseListNoLogin(t *testing.T) {
|
|||
rsp := MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
htmlDoc := NewHTMLParser(t, rsp.Body)
|
||||
releases := htmlDoc.Find("#release-list li.ui.grid")
|
||||
releases := htmlDoc.Find("#release-list .release-entry")
|
||||
assert.Equal(t, 5, releases.Length())
|
||||
|
||||
links := make([]string, 0, 5)
|
||||
|
@ -198,7 +198,7 @@ func TestViewReleaseListLogin(t *testing.T) {
|
|||
rsp := session.MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
htmlDoc := NewHTMLParser(t, rsp.Body)
|
||||
releases := htmlDoc.Find("#release-list li.ui.grid")
|
||||
releases := htmlDoc.Find("#release-list .release-entry")
|
||||
assert.Equal(t, 3, releases.Length())
|
||||
|
||||
links := make([]string, 0, 5)
|
||||
|
@ -229,12 +229,12 @@ func TestViewTagsList(t *testing.T) {
|
|||
rsp := session.MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
htmlDoc := NewHTMLParser(t, rsp.Body)
|
||||
tags := htmlDoc.Find(".tag-list tr")
|
||||
tags := htmlDoc.Find(".tag-list-row-link")
|
||||
assert.Equal(t, 3, tags.Length())
|
||||
|
||||
tagNames := make([]string, 0, 5)
|
||||
tags.Each(func(i int, s *goquery.Selection) {
|
||||
tagNames = append(tagNames, s.Find(".tag a.tw-flex.tw-items-center").Text())
|
||||
tagNames = append(tagNames, s.Text())
|
||||
})
|
||||
|
||||
assert.EqualValues(t, []string{"v1.0", "delete-tag", "v1.1"}, tagNames)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue