forked from forgejo/forgejo
Add links to toggle WIP status (#14677)
* Add links to toggle PR WIP status * Allow PR author to toggle WIP status * refactors and restyling, remove links from translations Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
parent
6d6a65cf5c
commit
c9480c5f60
6 changed files with 59 additions and 25 deletions
|
@ -197,10 +197,8 @@ func TestCantMergeWorkInProgress(t *testing.T) {
|
|||
text := strings.TrimSpace(htmlDoc.doc.Find(".merge-section > .item").Last().Text())
|
||||
assert.NotEmpty(t, text, "Can't find WIP text")
|
||||
|
||||
// remove <strong /> from lang
|
||||
expected := i18n.Tr("en", "repo.pulls.cannot_merge_work_in_progress", "[wip]")
|
||||
replacer := strings.NewReplacer("<strong>", "", "</strong>", "")
|
||||
assert.Equal(t, replacer.Replace(expected), text, "Unable to find WIP text")
|
||||
assert.Contains(t, text, i18n.Tr("en", "repo.pulls.cannot_merge_work_in_progress"), "Unable to find WIP text")
|
||||
assert.Contains(t, text, "[wip]", "Unable to find WIP text")
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue