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)
|
||||
|
||||
test "can see banned posts":
|
||||
with session:
|
||||
register("issue181", "issue181")
|
||||
|
|
@ -19,7 +17,6 @@ proc test*(session: Session, baseUrl: string) =
|
|||
|
||||
login("issue181", "issue181")
|
||||
navigate(baseUrl)
|
||||
wait()
|
||||
|
||||
const title = "Testing issue 181."
|
||||
createThread(title, "Test for issue #181")
|
||||
|
|
@ -33,7 +30,6 @@ proc test*(session: Session, baseUrl: string) =
|
|||
|
||||
# Make sure the banned user's thread is still visible.
|
||||
navigate(baseUrl)
|
||||
wait()
|
||||
ensureExists("tr.banned")
|
||||
checkText("tr.banned .thread-title > a", title)
|
||||
logout()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue