summaryrefslogtreecommitdiffstats
path: root/integrations/pull_merge_test.go
diff options
context:
space:
mode:
authorJimmy Praet <jimmy.praet@telenet.be>2021-05-27 22:02:04 +0200
committerGitHub <noreply@github.com>2021-05-27 22:02:04 +0200
commitc9480c5f606e1e83f8f9c373052c0ba758bf300b (patch)
treead1897aefa7a8b727c673f9f742dbfe26d05edd9 /integrations/pull_merge_test.go
parent6d6a65cf5cc13deddd96bb76b773667d068823d4 (diff)
downloadgitea-c9480c5f606e1e83f8f9c373052c0ba758bf300b.tar.gz
gitea-c9480c5f606e1e83f8f9c373052c0ba758bf300b.zip
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>
Diffstat (limited to 'integrations/pull_merge_test.go')
-rw-r--r--integrations/pull_merge_test.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/integrations/pull_merge_test.go b/integrations/pull_merge_test.go
index 79f62c32c1..b4a3397a45 100644
--- a/integrations/pull_merge_test.go
+++ b/integrations/pull_merge_test.go
@@ -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")
})
}