mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-15 15:03:32 +02:00
feat: adjust tests to new templates
This commit is contained in:
parent
e71fc6ca63
commit
9006c70cf0
@ -192,5 +192,4 @@
|
||||
</overflow-menu>
|
||||
</div>
|
||||
<div class="ui tabs divider"></div>
|
||||
{{template "repo/watch_options_modal" $}}
|
||||
</div>
|
||||
|
||||
@ -28,3 +28,4 @@
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{template "repo/watch_options_modal" $}}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
</h2>
|
||||
{{template "base/alert" .}}
|
||||
|
||||
<form class="ui form" action="{{.Link}}" method="post" data-global-init="initReleaseEditForm"
|
||||
<form class="ui form" action="{{.Link}}" id="new-release" method="post" data-global-init="initReleaseEditForm"
|
||||
data-existing-tags="{{JsonUtils.EncodeToString .Tags}}"
|
||||
data-tag-helper="{{ctx.Locale.Tr "repo.release.tag_helper"}}"
|
||||
data-tag-helper-new="{{ctx.Locale.Tr "repo.release.tag_helper_new"}}"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="header">{{ctx.Locale.Tr "notifications"}}</div>
|
||||
<div class="content">
|
||||
<p>{{ctx.Locale.Tr "repo.watch.options.desc"}}</p>
|
||||
<form class="ui form form-fetch-action" method="post">
|
||||
<form class="ui form" method="post">
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input name="pull_requests" type="checkbox"><label>{{ctx.Locale.Tr "repo.watch.options.pull_requests"}}</label>
|
||||
|
||||
@ -65,7 +65,6 @@
|
||||
>
|
||||
{{svg "octicon-gear"}}
|
||||
</a>
|
||||
{{template "repo/watch_options_modal"}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
@ -88,4 +87,5 @@
|
||||
{{ctx.Locale.Tr "search.no_results"}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{template "repo/watch_options_modal"}}
|
||||
</div>
|
||||
|
||||
@ -127,7 +127,7 @@ func testNewIssue(t *testing.T, session *TestSession, user, repo, title, content
|
||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
link, exists := htmlDoc.doc.Find("form.ui.form").Attr("action")
|
||||
link, exists := htmlDoc.doc.Find("form#new-issue").Attr("action")
|
||||
assert.True(t, exists, "The template has changed")
|
||||
req = NewRequestWithValues(t, "POST", link, map[string]string{
|
||||
"title": title,
|
||||
|
||||
@ -55,7 +55,7 @@ func testPullCreate(t *testing.T, session *TestSession, user, repo string, toSel
|
||||
|
||||
// Submit the form for creating the pull
|
||||
htmlDoc = NewHTMLParser(t, resp.Body)
|
||||
link, exists = htmlDoc.doc.Find("form.ui.form").Attr("action")
|
||||
link, exists = htmlDoc.doc.Find("form#new-issue").Attr("action")
|
||||
assert.True(t, exists, "The template has changed")
|
||||
req = NewRequestWithValues(t, "POST", link, map[string]string{
|
||||
"title": title,
|
||||
@ -98,7 +98,7 @@ func testPullCreateDirectly(t *testing.T, session *TestSession, opts createPullR
|
||||
|
||||
// Submit the form for creating the pull
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
link, exists := htmlDoc.doc.Find("form.ui.form").Attr("action")
|
||||
link, exists := htmlDoc.doc.Find("form#new-issue").Attr("action")
|
||||
assert.True(t, exists, "The template has changed")
|
||||
params := map[string]string{
|
||||
"title": opts.Title,
|
||||
@ -125,7 +125,7 @@ func testPullCreateFailure(t *testing.T, session *TestSession, baseRepoOwner, ba
|
||||
|
||||
// Submit the form for creating the pull
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
link, exists := htmlDoc.doc.Find("form.ui.form").Attr("action")
|
||||
link, exists := htmlDoc.doc.Find("form#new-issue").Attr("action")
|
||||
assert.True(t, exists, "The template has changed")
|
||||
req = NewRequestWithValues(t, "POST", link, map[string]string{
|
||||
"title": title,
|
||||
|
||||
@ -24,7 +24,7 @@ func createNewRelease(t *testing.T, session *TestSession, repoURL, tag, title st
|
||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
|
||||
link, exists := htmlDoc.doc.Find("form.ui.form").Attr("action")
|
||||
link, exists := htmlDoc.doc.Find("form#new-release").Attr("action")
|
||||
assert.True(t, exists, "The template has changed")
|
||||
|
||||
postData := map[string]string{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user