Had to make the tests pass for the new page gen.
This commit is contained in:
parent
c64874cb51
commit
23bda88b29
2 changed files with 12 additions and 14 deletions
18
Makefile
18
Makefile
|
@ -5,24 +5,25 @@ ifeq '$(OS)' 'Windows_NT'
|
|||
endif
|
||||
|
||||
|
||||
build:
|
||||
build: site
|
||||
go build .
|
||||
|
||||
site:
|
||||
go run tools/cmd/sitebuild/main.go
|
||||
|
||||
test: site
|
||||
go test zedshaw.games/webapp/tests -c -o runtests$(GO_IS_STUPID_EXE)
|
||||
./runtests$(GO_IS_STUPID_EXE)
|
||||
|
||||
migrate_up:
|
||||
go tool goose sqlite3 db.sqlite3 -dir migrations up
|
||||
|
||||
migrate_down:
|
||||
go tool goose sqlite3 db.sqlite3 -dir migrations down
|
||||
|
||||
html:
|
||||
go tool qtc -dir templates
|
||||
|
||||
docs:
|
||||
go tool pkgsite --open
|
||||
|
||||
test:
|
||||
go test zedshaw.games/webapp/tests -c -o runtests$(GO_IS_STUPID_EXE)
|
||||
./runtests$(GO_IS_STUPID_EXE)
|
||||
|
||||
dev:
|
||||
go tool air -build.stop_on_error "true"
|
||||
|
@ -37,6 +38,3 @@ cover_report:
|
|||
go tool cover -func=coverage.txt
|
||||
go tool cover -html=coverage.txt -o coverage.html
|
||||
open coverage.html
|
||||
|
||||
site:
|
||||
go run tools/cmd/sitebuild/main.go
|
||||
|
|
|
@ -22,23 +22,23 @@ func TestLogin(t *testing.T) {
|
|||
Run(assert, ctx,
|
||||
browser.Navigate(`http://127.0.0.1:5002/register/`),
|
||||
browser.WaitVisible(`body > footer`),
|
||||
browser.WaitVisible(`[data-testid="register-page"]`),
|
||||
browser.WaitVisible(`[data-testid="register-index-page"]`),
|
||||
browser.SendKeys(`#username`, `testerzed`),
|
||||
browser.SendKeys(`#email`, `zed@test.com`),
|
||||
browser.SendKeys(`#password`, `iamdumb`),
|
||||
browser.Click(`#register-submit`, browser.NodeVisible),
|
||||
browser.WaitVisible(`body > footer`),
|
||||
browser.WaitVisible(`[data-testid="login-page"]`))
|
||||
browser.WaitVisible(`[data-testid="login-index-page"]`))
|
||||
|
||||
Run(assert, ctx,
|
||||
browser.Navigate(`http://127.0.0.1:5002/login/`),
|
||||
browser.WaitVisible(`body > footer`),
|
||||
browser.WaitVisible(`[data-testid="login-page"]`),
|
||||
browser.WaitVisible(`[data-testid="login-index-page"]`),
|
||||
browser.SendKeys(`#username`, `testerzed`),
|
||||
browser.SendKeys(`#password`, `iamdumb`),
|
||||
browser.Click(`#login-submit`, browser.NodeVisible),
|
||||
browser.WaitVisible(`body > footer`),
|
||||
browser.WaitVisible(`[data-testid="home-page"]`))
|
||||
browser.WaitVisible(`[data-testid="index-page"]`))
|
||||
|
||||
/// delete the user here
|
||||
deleteTestUser("testerzed")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue