Add basic test for creating a thread
This commit is contained in:
parent
122e279256
commit
b650a9f401
4 changed files with 95 additions and 16 deletions
|
|
@ -1,20 +1,7 @@
|
|||
import unittest, options, os
|
||||
import unittest, options, os, common
|
||||
|
||||
import webdriver
|
||||
|
||||
proc waitForLoad(session: Session, timeout=20000) =
|
||||
var waitTime = 0
|
||||
sleep(2000)
|
||||
|
||||
while true:
|
||||
let loading = session.findElement(".loading")
|
||||
if loading.isNone: return
|
||||
sleep(1000)
|
||||
waitTime += 1000
|
||||
|
||||
if waitTime > timeout:
|
||||
doAssert false, "Wait for load time exceeded"
|
||||
|
||||
proc test*(session: Session, baseUrl: string) =
|
||||
session.navigate(baseUrl)
|
||||
|
||||
|
|
@ -112,4 +99,6 @@ proc test*(session: Session, baseUrl: string) =
|
|||
"#main-navbar .menu-right div.tile-content"
|
||||
).get()
|
||||
|
||||
check profileName.getText() == "test"
|
||||
check profileName.getText() == "test"
|
||||
|
||||
logout(session)
|
||||
Loading…
Add table
Add a link
Reference in a new issue