Fixed Issue of Review Menu Shown Behind (#32631)
Fixed #31144 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
703be6bf30
commit
25cacaf0aa
6 changed files with 38 additions and 26 deletions
|
@ -97,7 +97,7 @@ func TestPullCompare_EnableAllowEditsFromMaintainer(t *testing.T) {
|
|||
user2Session := loginUser(t, "user2")
|
||||
resp = user2Session.MakeRequest(t, NewRequest(t, "GET", fmt.Sprintf("%s/files", prURL)), http.StatusOK)
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
nodes := htmlDoc.doc.Find(".diff-file-box[data-new-filename=\"README.md\"] .diff-file-header-actions .dropdown .menu a")
|
||||
nodes := htmlDoc.doc.Find(".diff-file-box[data-new-filename=\"README.md\"] .diff-file-header-actions .tippy-target a")
|
||||
if assert.Equal(t, 1, nodes.Length()) {
|
||||
// there is only "View File" button, no "Edit File" button
|
||||
assert.Equal(t, "View File", nodes.First().Text())
|
||||
|
@ -121,7 +121,7 @@ func TestPullCompare_EnableAllowEditsFromMaintainer(t *testing.T) {
|
|||
// user2 (admin of repo3) goes to the PR files page again
|
||||
resp = user2Session.MakeRequest(t, NewRequest(t, "GET", fmt.Sprintf("%s/files", prURL)), http.StatusOK)
|
||||
htmlDoc = NewHTMLParser(t, resp.Body)
|
||||
nodes = htmlDoc.doc.Find(".diff-file-box[data-new-filename=\"README.md\"] .diff-file-header-actions .dropdown .menu a")
|
||||
nodes = htmlDoc.doc.Find(".diff-file-box[data-new-filename=\"README.md\"] .diff-file-header-actions .tippy-target a")
|
||||
if assert.Equal(t, 2, nodes.Length()) {
|
||||
// there are "View File" button and "Edit File" button
|
||||
assert.Equal(t, "View File", nodes.First().Text())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue