From 23bda88b29f7cfdc09f755b90d477bcc13d11e03 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sat, 5 Jul 2025 22:19:44 -0400 Subject: [PATCH] Had to make the tests pass for the new page gen. --- Makefile | 18 ++++++++---------- tests/base_test.go | 8 ++++---- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 719b106..3acc740 100644 --- a/Makefile +++ b/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 diff --git a/tests/base_test.go b/tests/base_test.go index 649db3a..efecb4f 100644 --- a/tests/base_test.go +++ b/tests/base_test.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")