aboutsummaryrefslogtreecommitdiffstats
path: root/tests/integration/timetracking_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/timetracking_test.go')
-rw-r--r--tests/integration/timetracking_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/integration/timetracking_test.go b/tests/integration/timetracking_test.go
index 8985dfdbce..ebe084ccdc 100644
--- a/tests/integration/timetracking_test.go
+++ b/tests/integration/timetracking_test.go
@@ -46,17 +46,17 @@ func testViewTimetrackingControls(t *testing.T, session *TestSession, user, repo
AssertHTMLElement(t, htmlDoc, ".issue-add-time", canTrackTime)
issueLink := path.Join(user, repo, "issues", issue)
- req = NewRequestWithValues(t, "POST", path.Join(issueLink, "times", "stopwatch", "toggle"), map[string]string{
+ reqStart := NewRequestWithValues(t, "POST", path.Join(issueLink, "times", "stopwatch", "start"), map[string]string{
"_csrf": htmlDoc.GetCSRF(),
})
if canTrackTime {
- session.MakeRequest(t, req, http.StatusOK)
+ session.MakeRequest(t, reqStart, http.StatusOK)
req = NewRequest(t, "GET", issueLink)
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)
@@ -65,18 +65,18 @@ func testViewTimetrackingControls(t *testing.T, session *TestSession, user, repo
// Sleep for 1 second to not get wrong order for stopping timer
time.Sleep(time.Second)
- req = NewRequestWithValues(t, "POST", path.Join(issueLink, "times", "stopwatch", "toggle"), map[string]string{
+ reqStop := NewRequestWithValues(t, "POST", path.Join(issueLink, "times", "stopwatch", "stop"), map[string]string{
"_csrf": htmlDoc.GetCSRF(),
})
- session.MakeRequest(t, req, http.StatusOK)
+ session.MakeRequest(t, reqStop, http.StatusOK)
req = NewRequest(t, "GET", issueLink)
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, req, http.StatusNotFound)
+ session.MakeRequest(t, reqStart, http.StatusNotFound)
}
}