add user delete thread test

This commit is contained in:
hlaaftana 2020-05-10 17:54:32 +03:00 • committed by GitHub
commit 16abee0596
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,6 +40,18 @@ proc userTests(session: Session, baseUrl: string) =
checkText "#thread-title .title-text", userTitleStr
checkText ".original-post div.post-content", userContentStr
test "can delete thread":
with session:
click userTitleStr, LinkTextSelector
click ".post-buttons .delete-button"
# click delete confirmation
click "#delete-modal .delete-btn"
# Make sure the forum post is gone
checkIsNone userTitleStr, LinkTextSelector
session.logout()
proc anonymousTests(session: Session, baseUrl: string) =
@ -158,4 +170,4 @@ proc test*(session: Session, baseUrl: string) =
unBanUser(session, baseUrl)
session.navigate(baseUrl)
session.navigate(baseUrl)