mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-26 18:20:57 +00:00
[GITEA] Make pagination test more robust (squash)
- Backport #1882
- Be more specific of which element we want and also don't include the
href into the selector, so if the value changes, it will show the value
that was rendered.
- Ensure stable order of passed repository IDs.
- Resolves codeberg.org/forgejo/forgejo/issues/1880
(cherry picked from commit 79bc4cffe5
)
This commit is contained in:
parent
1263d0d416
commit
114f18f105
2 changed files with 20 additions and 19 deletions
|
@ -295,6 +295,10 @@ func Milestones(ctx *context.Context) {
|
|||
return !showRepoIds.Contains(v)
|
||||
})
|
||||
|
||||
// This is to ensure that testing the expected pagination link is stable.
|
||||
// As there's no guarantee of order.
|
||||
slices.Sort(repoIDs)
|
||||
|
||||
var pagerCount int
|
||||
if isShowClosed {
|
||||
ctx.Data["State"] = "closed"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue