|
|
@ -142,7 +142,7 @@ func TestViewReleaseListNoLogin(t *testing.T) {
|
|
|
|
rsp := MakeRequest(t, req, http.StatusOK)
|
|
|
|
rsp := MakeRequest(t, req, http.StatusOK)
|
|
|
|
|
|
|
|
|
|
|
|
htmlDoc := NewHTMLParser(t, rsp.Body)
|
|
|
|
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())
|
|
|
|
assert.Equal(t, 5, releases.Length())
|
|
|
|
|
|
|
|
|
|
|
|
links := make([]string, 0, 5)
|
|
|
|
links := make([]string, 0, 5)
|
|
|
@ -198,7 +198,7 @@ func TestViewReleaseListLogin(t *testing.T) {
|
|
|
|
rsp := session.MakeRequest(t, req, http.StatusOK)
|
|
|
|
rsp := session.MakeRequest(t, req, http.StatusOK)
|
|
|
|
|
|
|
|
|
|
|
|
htmlDoc := NewHTMLParser(t, rsp.Body)
|
|
|
|
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())
|
|
|
|
assert.Equal(t, 3, releases.Length())
|
|
|
|
|
|
|
|
|
|
|
|
links := make([]string, 0, 5)
|
|
|
|
links := make([]string, 0, 5)
|
|
|
@ -229,12 +229,12 @@ func TestViewTagsList(t *testing.T) {
|
|
|
|
rsp := session.MakeRequest(t, req, http.StatusOK)
|
|
|
|
rsp := session.MakeRequest(t, req, http.StatusOK)
|
|
|
|
|
|
|
|
|
|
|
|
htmlDoc := NewHTMLParser(t, rsp.Body)
|
|
|
|
htmlDoc := NewHTMLParser(t, rsp.Body)
|
|
|
|
tags := htmlDoc.Find(".tag-list tr")
|
|
|
|
tags := htmlDoc.Find(".tag-list-row-link")
|
|
|
|
assert.Equal(t, 3, tags.Length())
|
|
|
|
assert.Equal(t, 3, tags.Length())
|
|
|
|
|
|
|
|
|
|
|
|
tagNames := make([]string, 0, 5)
|
|
|
|
tagNames := make([]string, 0, 5)
|
|
|
|
tags.Each(func(i int, s *goquery.Selection) {
|
|
|
|
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)
|
|
|
|
assert.EqualValues(t, []string{"v1.0", "delete-tag", "v1.1"}, tagNames)
|
|
|
|