mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Refactor pull-request compare&create page (#33071)
The old code is unnecessarily complex.
This commit is contained in:
@@ -27,7 +27,7 @@ func TestCompareTag(t *testing.T) {
|
||||
req := NewRequest(t, "GET", "/user2/repo1/compare/v1.1...master")
|
||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
selection := htmlDoc.doc.Find(".choose.branch .filter.dropdown")
|
||||
selection := htmlDoc.doc.Find(".ui.dropdown.select-branch")
|
||||
// A dropdown for both base and head.
|
||||
assert.Lenf(t, selection.Nodes, 2, "The template has changed")
|
||||
|
||||
@@ -44,7 +44,7 @@ func TestCompareDefault(t *testing.T) {
|
||||
req := NewRequest(t, "GET", "/user2/repo1/compare/v1.1")
|
||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
selection := htmlDoc.doc.Find(".choose.branch .filter.dropdown")
|
||||
selection := htmlDoc.doc.Find(".ui.dropdown.select-branch")
|
||||
assert.Lenf(t, selection.Nodes, 2, "The template has changed")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user