Speedup and simplify tests

This drastically speeds up tests and simplifies test writing by making
it so that no explicit calls for waiting are needed. Elements that are
queried for now implicitly waits for them to be available.

On my machine, tests used to take 3-4 minutes to complete. Now they take
~1 minute to complete.
This commit is contained in:
Joey Yakimowich-Payne 2020-02-16 19:19:21 -07:00 • committed by Andreas Rumpf
commit 5a4f44b4ee
7 changed files with 40 additions and 83 deletions

View file

@ -5,8 +5,6 @@ import webdriver
proc test*(session: Session, baseUrl: string) =
session.navigate(baseUrl)
waitForLoad(session)
# Sanity checks
test "shows sign up":
session.checkText("#signup-btn", "Sign up")
@ -38,10 +36,8 @@ proc test*(session: Session, baseUrl: string) =
logout()
navigate baseUrl
wait()
register "TEst1", "test1", verify = false
ensureExists "#signup-form .has-error"
navigate baseUrl
wait()
navigate baseUrl