mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 06:25:31 +00:00
fix: regression from #4125
This commit is contained in:
parent
6f7aee2b3e
commit
1d961495f3
|
@ -13,8 +13,10 @@
|
|||
{{svg "octicon-check" 16 "tw-mr-2"}}
|
||||
{{ctx.Locale.PrettyNumber .ClosedCount}} {{ctx.Locale.Tr "repo.issues.closed_title"}}
|
||||
</a>
|
||||
<a class="{{if eq .State "all"}}active {{end}}item" href="{{.AllStatesLink}}" data-test-name="all-issue-count">
|
||||
{{svg "octicon-eye" 16 "tw-mr-2"}}
|
||||
{{ctx.Locale.PrettyNumber (.AllCount)}} {{ctx.Locale.Tr "repo.issues.all_title"}}
|
||||
</a>
|
||||
{{if not .PageIsMilestones}}
|
||||
<a class="{{if eq .State "all"}}active {{end}}item" href="{{.AllStatesLink}}" data-test-name="all-issue-count">
|
||||
{{svg "octicon-eye" 16 "tw-mr-2"}}
|
||||
{{ctx.Locale.PrettyNumber (.AllCount)}} {{ctx.Locale.Tr "repo.issues.all_title"}}
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
|
@ -23,3 +23,20 @@ func TestViewMilestones(t *testing.T) {
|
|||
placeholder, _ := search.Attr("placeholder")
|
||||
assert.Equal(t, "Search milestones...", placeholder)
|
||||
}
|
||||
|
||||
func TestMilestonesCount(t *testing.T) {
|
||||
defer tests.PrepareTestEnv(t)()
|
||||
|
||||
req := NewRequest(t, "GET", "/user2/repo1/milestones")
|
||||
resp := MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
|
||||
openCount := htmlDoc.doc.Find("a[data-test-name='open-issue-count']").Text()
|
||||
assert.Contains(t, openCount, "2\u00a0Open")
|
||||
|
||||
closedCount := htmlDoc.doc.Find("a[data-test-name='closed-issue-count']").Text()
|
||||
assert.Contains(t, closedCount, "1\u00a0Closed")
|
||||
|
||||
assert.Len(t, htmlDoc.doc.Find("a[data-test-name='closed-issue-count']").Nodes, 0)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue