mirror of
https://github.com/go-gitea/gitea
synced 2025-07-28 05:08:37 +00:00
@@ -163,10 +163,10 @@ func TestPullCreate_TitleEscape(t *testing.T) {
|
||||
req = NewRequest(t, "GET", url)
|
||||
resp = session.MakeRequest(t, req, http.StatusOK)
|
||||
htmlDoc = NewHTMLParser(t, resp.Body)
|
||||
titleHTML, err := htmlDoc.doc.Find(".comment-list .timeline-item.event .text b").First().Html()
|
||||
titleHTML, err := htmlDoc.doc.Find(".comment-list .timeline-item.event .comment-text-line b").First().Html()
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "<strike><i>XSS PR</i></strike>", titleHTML)
|
||||
titleHTML, err = htmlDoc.doc.Find(".comment-list .timeline-item.event .text b").Next().Html()
|
||||
titleHTML, err = htmlDoc.doc.Find(".comment-list .timeline-item.event .comment-text-line b").Next().Html()
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "<u>XSS PR</u>", titleHTML)
|
||||
})
|
||||
|
@@ -56,7 +56,7 @@ func testViewTimetrackingControls(t *testing.T, session *TestSession, user, repo
|
||||
resp = session.MakeRequest(t, req, http.StatusOK)
|
||||
htmlDoc = NewHTMLParser(t, resp.Body)
|
||||
|
||||
events := htmlDoc.doc.Find(".event > span.text")
|
||||
events := htmlDoc.doc.Find(".event > .comment-text-line")
|
||||
assert.Contains(t, events.Last().Text(), "started working")
|
||||
|
||||
AssertHTMLElement(t, htmlDoc, ".issue-stop-time", true)
|
||||
@@ -74,7 +74,7 @@ func testViewTimetrackingControls(t *testing.T, session *TestSession, user, repo
|
||||
resp = session.MakeRequest(t, req, http.StatusOK)
|
||||
htmlDoc = NewHTMLParser(t, resp.Body)
|
||||
|
||||
events = htmlDoc.doc.Find(".event > span.text")
|
||||
events = htmlDoc.doc.Find(".event > .comment-text-line")
|
||||
assert.Contains(t, events.Last().Text(), "worked for ")
|
||||
} else {
|
||||
session.MakeRequest(t, reqStart, http.StatusNotFound)
|
||||
|
Reference in New Issue
Block a user