Remove JS globals related to timetracking and due date (#13921)
Refactor to avoid these globals. Should work exactly as before.
This commit is contained in:
parent
bc1cf6e5d3
commit
1cb1fb8a2e
3 changed files with 42 additions and 37 deletions
|
@ -40,8 +40,8 @@ func testViewTimetrackingControls(t *testing.T, session *TestSession, user, repo
|
|||
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
|
||||
htmlDoc.AssertElement(t, ".timetrack .start-add .start", canTrackTime)
|
||||
htmlDoc.AssertElement(t, ".timetrack .start-add .add-time", canTrackTime)
|
||||
htmlDoc.AssertElement(t, ".timetrack .issue-start-time", canTrackTime)
|
||||
htmlDoc.AssertElement(t, ".timetrack .issue-add-time", canTrackTime)
|
||||
|
||||
req = NewRequestWithValues(t, "POST", path.Join(user, repo, "issues", issue, "times", "stopwatch", "toggle"), map[string]string{
|
||||
"_csrf": htmlDoc.GetCSRF(),
|
||||
|
@ -56,8 +56,8 @@ func testViewTimetrackingControls(t *testing.T, session *TestSession, user, repo
|
|||
events := htmlDoc.doc.Find(".event > span.text")
|
||||
assert.Contains(t, events.Last().Text(), "started working")
|
||||
|
||||
htmlDoc.AssertElement(t, ".timetrack .stop-cancel .stop", true)
|
||||
htmlDoc.AssertElement(t, ".timetrack .stop-cancel .cancel", true)
|
||||
htmlDoc.AssertElement(t, ".timetrack .issue-stop-time", true)
|
||||
htmlDoc.AssertElement(t, ".timetrack .issue-cancel-time", true)
|
||||
|
||||
// Sleep for 1 second to not get wrong order for stopping timer
|
||||
time.Sleep(time.Second)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue