Skip to content

Commit 326b83d

Browse files
lunnyjeffliu27
authored andcommitted
fix pull view ui merge section (go-gitea#7335)
* fix pull view ui merge section * fix tests * fix tests
1 parent 60222f6 commit 326b83d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

integrations/pull_merge_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func TestCantMergeWorkInProgress(t *testing.T) {
159159
req := NewRequest(t, "GET", resp.Header().Get("Location"))
160160
resp = session.MakeRequest(t, req, http.StatusOK)
161161
htmlDoc := NewHTMLParser(t, resp.Body)
162-
text := strings.TrimSpace(htmlDoc.doc.Find(".merge-section.segment > .text.grey").Text())
162+
text := strings.TrimSpace(htmlDoc.doc.Find(".attached.header > .text.grey").Last().Text())
163163
assert.NotEmpty(t, text, "Can't find WIP text")
164164

165165
// remove <strong /> from lang

templates/repo/issue/view_content/pull.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
{{else}}red{{end}}"><span class="mega-octicon octicon-git-merge"></span></a>
4747
<div class="content">
4848
{{template "repo/pulls/status" .}}
49-
<div class="ui attached merge-section segment">
49+
<div class="ui {{if not $.LatestCommitStatus}}top attached header{{else}}attached merge-section segment{{end}}">
5050
{{if .Issue.PullRequest.HasMerged}}
5151
<div class="item text purple">
5252
{{$.i18n.Tr "repo.pulls.has_merged"}}

0 commit comments

Comments
 (0)