From 3324f37faa31512f8a5a29e453379f1ba7e5fadd Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Mon, 16 Jul 2018 21:09:55 +0900 Subject: [PATCH] Cleanup in scenario1 --- tests/browsertests/scenario1.nim | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tests/browsertests/scenario1.nim b/tests/browsertests/scenario1.nim index 1674130..d5c2fe5 100644 --- a/tests/browsertests/scenario1.nim +++ b/tests/browsertests/scenario1.nim @@ -9,16 +9,13 @@ proc test*(session: Session, baseUrl: string) = # Sanity checks test "shows sign up": - with session: - checkText "#signup-btn", "Sign up" + session.checkText("#signup-btn", "Sign up") test "shows log in": - with session: - checkText "#login-btn", "Log in" + session.checkText("#login-btn", "Log in") test "is empty": - with session: - check "tr > td.thread-title", isNone + session.check("tr > td.thread-title", isNone) # Logging in test "can login/logout": @@ -29,7 +26,7 @@ proc test*(session: Session, baseUrl: string) = sendKeys "#login-form input[name='password']", "admin" sendKeys "#login-form input[name='password']", Key.Enter - wait(5000) + wait 5000 # Verify that the user menu has been initialised properly. click "#profile-btn" @@ -49,7 +46,7 @@ proc test*(session: Session, baseUrl: string) = sendKeys "#signup-form input[name='password']", "test" click "#signup-modal .create-account-btn" - wait(5000) + wait 5000 # Verify that the user menu has been initialised properly. click "#profile-btn"