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:
parent
616c6eb100
commit
5a4f44b4ee
7 changed files with 40 additions and 83 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue