diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-05-12 21:39:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-12 21:39:02 +0800 |
commit | 368baf9e77606e5de8bbcda8b0348f1a6fba6d73 (patch) | |
tree | e6358627708f2d695fc48b4967b9c1fe803450b8 /integrations | |
parent | d985dcc922892ffd2cc1af427d330f98e9dc2f80 (diff) | |
download | gitea-368baf9e77606e5de8bbcda8b0348f1a6fba6d73.tar.gz gitea-368baf9e77606e5de8bbcda8b0348f1a6fba6d73.zip |
Use Vue to refactor pull merge UI (#19650)
* Use Vue to refactor pull merge UI
* add comments
* fix comments
* small fine tune
* fix tests
* adopt new pull default messages
* clean up
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'integrations')
-rw-r--r-- | integrations/pull_merge_test.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/integrations/pull_merge_test.go b/integrations/pull_merge_test.go index c50913383c..cfe8b4afed 100644 --- a/integrations/pull_merge_test.go +++ b/integrations/pull_merge_test.go @@ -37,10 +37,8 @@ func testPullMerge(t *testing.T, session *TestSession, user, repo, pullnum strin req := NewRequest(t, "GET", path.Join(user, repo, "pulls", pullnum)) resp := session.MakeRequest(t, req, http.StatusOK) - // Click the little green button to create a pull htmlDoc := NewHTMLParser(t, resp.Body) - link, exists := htmlDoc.doc.Find(".ui.form." + string(mergeStyle) + "-fields > form").Attr("action") - assert.True(t, exists, "The template has changed") + link := path.Join(user, repo, "pulls", pullnum, "merge") req = NewRequestWithValues(t, "POST", link, map[string]string{ "_csrf": htmlDoc.GetCSRF(), "do": string(mergeStyle), @@ -57,7 +55,7 @@ func testPullCleanUp(t *testing.T, session *TestSession, user, repo, pullnum str // Click the little green button to create a pull htmlDoc := NewHTMLParser(t, resp.Body) link, exists := htmlDoc.doc.Find(".timeline-item .delete-button").Attr("data-url") - assert.True(t, exists, "The template has changed") + assert.True(t, exists, "The template has changed, can not find delete button url") req = NewRequestWithValues(t, "POST", link, map[string]string{ "_csrf": htmlDoc.GetCSRF(), }) |