Cleanup test imports
This commit is contained in:
parent
f3396777fb
commit
6c70713afb
3 changed files with 3 additions and 9 deletions
|
|
@ -1,14 +1,12 @@
|
||||||
import unittest, options, os, common
|
import unittest, options, common
|
||||||
|
|
||||||
import webdriver
|
import webdriver
|
||||||
|
|
||||||
proc selectCategory(session: Session, name: string) =
|
proc selectCategory(session: Session, name: string) =
|
||||||
with session:
|
with session:
|
||||||
click "#category-selection .dropdown-toggle"
|
click "#category-selection .dropdown-toggle"
|
||||||
|
|
||||||
click "#category-selection ." & name
|
click "#category-selection ." & name
|
||||||
|
|
||||||
|
|
||||||
proc categoriesUserTests(session: Session, baseUrl: string) =
|
proc categoriesUserTests(session: Session, baseUrl: string) =
|
||||||
let
|
let
|
||||||
title = "Category Test"
|
title = "Category Test"
|
||||||
|
|
@ -33,15 +31,12 @@ proc categoriesUserTests(session: Session, baseUrl: string) =
|
||||||
test "can create category thread":
|
test "can create category thread":
|
||||||
with session:
|
with session:
|
||||||
click "#new-thread-btn"
|
click "#new-thread-btn"
|
||||||
|
|
||||||
sendKeys "#thread-title", title
|
sendKeys "#thread-title", title
|
||||||
|
|
||||||
selectCategory "fun"
|
selectCategory "fun"
|
||||||
|
|
||||||
sendKeys "#reply-textarea", content
|
sendKeys "#reply-textarea", content
|
||||||
|
|
||||||
click "#create-thread-btn"
|
click "#create-thread-btn"
|
||||||
|
|
||||||
checkText "#thread-title .category", "Fun"
|
checkText "#thread-title .category", "Fun"
|
||||||
|
|
||||||
navigate baseUrl
|
navigate baseUrl
|
||||||
|
|
@ -73,7 +68,6 @@ proc categoriesAdminTests(session: Session, baseUrl: string) =
|
||||||
clear "#add-category input[name='color']"
|
clear "#add-category input[name='color']"
|
||||||
clear "#add-category input[name='description']"
|
clear "#add-category input[name='description']"
|
||||||
|
|
||||||
|
|
||||||
sendKeys "#add-category input[name='name']", name
|
sendKeys "#add-category input[name='name']", name
|
||||||
sendKeys "#add-category input[name='color']", color
|
sendKeys "#add-category input[name='color']", color
|
||||||
sendKeys "#add-category input[name='description']", description
|
sendKeys "#add-category input[name='description']", description
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import unittest, options, os, common
|
import unittest, options, common
|
||||||
|
|
||||||
import webdriver
|
import webdriver
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import unittest, options, os, common
|
import unittest, options, common
|
||||||
|
|
||||||
import webdriver
|
import webdriver
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue