aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/timetracking_test.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-09-12 13:54:45 +0300
committerGitHub <noreply@github.com>2017-09-12 13:54:45 +0300
commit8c3a2e817be8a365abf167893e1d73ae79382cb6 (patch)
tree9a173372ff2b8448057bbd642ea545ad07050ed1 /integrations/timetracking_test.go
parent9bdbfbf6f3289f4df0df5aae9998a08483f22218 (diff)
downloadgitea-8c3a2e817be8a365abf167893e1d73ae79382cb6.tar.gz
gitea-8c3a2e817be8a365abf167893e1d73ae79382cb6.zip
Add missing fixture to clean gpg_key table (#2494)
* Add missing fixture to clean gpg_key table * Fix possible too fast request execution in timetracker start/stop test
Diffstat (limited to 'integrations/timetracking_test.go')
-rw-r--r--integrations/timetracking_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/integrations/timetracking_test.go b/integrations/timetracking_test.go
index e92cb95a89..534bb4d613 100644
--- a/integrations/timetracking_test.go
+++ b/integrations/timetracking_test.go
@@ -8,6 +8,7 @@ import (
"net/http"
"path"
"testing"
+ "time"
"github.com/stretchr/testify/assert"
)
@@ -56,6 +57,9 @@ func testViewTimetrackingControls(t *testing.T, session *TestSession, user, repo
htmlDoc.AssertElement(t, ".timetrack .stop-cancel .stop", true)
htmlDoc.AssertElement(t, ".timetrack .stop-cancel .cancel", true)
+ // Sleep for 1 second to not get wrong order for stopping timer
+ time.Sleep(time.Second)
+
req = NewRequestWithValues(t, "POST", path.Join(user, repo, "issues", issue, "times", "stopwatch", "toggle"), map[string]string{
"_csrf": htmlDoc.GetCSRF(),
})