Files
dimgigov 570d53f391
CI / test_stable_and_devel (stable) (push) Has been cancelled
CI / test_stable_and_devel (stable, devel) (push) Has been cancelled
CI / test_stable_and_devel (stable, stable) (push) Has been cancelled
Initial commit: nimforum with BaraDB backend
- Replaced SQLite with BaraDB via TCP wire protocol
- Added baradb_client.nim and baradb_sqlite.nim adapter
- Renamed SQL keywords: status->usrStatus, key->sessionKey, like->postLike
- Added NOW() support for datetime defaults
- Switched Jester to asynchttpserver (-d:useStdLib) to avoid thread/GC issues
- Frontend built and favicon added
2026-05-15 17:24:24 +03:00

44 lines
964 B
Nim

import unittest, common
import webdriver
proc test*(session: Session, baseUrl: string) =
session.navigate(baseUrl)
# Sanity checks
test "shows sign up":
session.checkText("#signup-btn", "Sign up")
test "shows log in":
session.checkText("#login-btn", "Log in")
test "is empty":
session.checkIsNone("tr > td.thread-title")
# Logging in
test "can login/logout":
with session:
login("admin", "admin")
# Check whether we can log out.
logout()
# Verify we have logged out by looking for the log in button.
ensureExists "#login-btn"
test "can register":
with session:
register("test", "test")
logout()
test "can't register same username with different case":
with session:
register "test1", "test1", verify = false
logout()
navigate baseUrl
register "TEst1", "test1", verify = false
ensureExists "#signup-form .has-error"
navigate baseUrl