Add test for category change
This commit is contained in:
parent
4821746c5d
commit
9739c34abd
1 changed files with 23 additions and 0 deletions
|
|
@ -69,6 +69,29 @@ proc categoriesUserTests(session: Session, baseUrl: string) =
|
||||||
|
|
||||||
ensureExists title, LinkTextSelector
|
ensureExists title, LinkTextSelector
|
||||||
|
|
||||||
|
test "can create category thread and change category":
|
||||||
|
with session:
|
||||||
|
let newTitle = title & " Selection"
|
||||||
|
click "#new-thread-btn"
|
||||||
|
sendKeys "#thread-title", newTitle
|
||||||
|
|
||||||
|
selectCategory "fun"
|
||||||
|
sendKeys "#reply-textarea", content
|
||||||
|
|
||||||
|
click "#create-thread-btn"
|
||||||
|
checkText "#thread-title .category", "Fun"
|
||||||
|
|
||||||
|
selectCategory "announcements"
|
||||||
|
|
||||||
|
checkText "#thread-title .category", "Announcements"
|
||||||
|
|
||||||
|
# Make sure there is no error
|
||||||
|
checkIsNone "#thread-title .text-error"
|
||||||
|
|
||||||
|
navigate baseUrl
|
||||||
|
|
||||||
|
ensureExists newTitle, LinkTextSelector
|
||||||
|
|
||||||
test "can navigate to categories page":
|
test "can navigate to categories page":
|
||||||
with session:
|
with session:
|
||||||
click "#categories-btn"
|
click "#categories-btn"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue