From 07d044a32cf6aa56e6e633739f1af487f6f5fdd7 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Tue, 9 Apr 2024 16:49:05 +0200 Subject: [PATCH] Makefile: test-e2e-sqlite-firefox --- Makefile | 6 +++++- tests/e2e/e2e_test.go | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5f3bc29a81..44f4f9b925 100644 --- a/Makefile +++ b/Makefile @@ -245,7 +245,7 @@ help: @echo " - show-version-major show major release number only" @echo " - test-frontend test frontend files" @echo " - test-backend test backend files" - @echo " - test-e2e[\#TestSpecificName] test end to end using playwright" + @echo " - test-e2e-sqlite[\#name.test.e2e] test end to end using playwright and sqlite" @echo " - update update js and py dependencies" @echo " - update-js update js dependencies" @echo " - update-py update py dependencies" @@ -628,6 +628,10 @@ test-e2e-sqlite: playwright e2e.sqlite.test generate-ini-sqlite test-e2e-sqlite\#%: playwright e2e.sqlite.test generate-ini-sqlite GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test -test.run TestE2e/$* +.PHONY: test-e2e-sqlite-firefox\#% +test-e2e-sqlite-firefox\#%: playwright e2e.sqlite.test generate-ini-sqlite + GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/sqlite.ini PLAYWRIGHT_PROJECT=firefox ./e2e.sqlite.test -test.run TestE2e/$* + .PHONY: test-e2e-mysql test-e2e-mysql: playwright e2e.mysql.test generate-ini-mysql GITEA_ROOT="$(CURDIR)" GITEA_CONF=tests/mysql.ini ./e2e.mysql.test -test.run TestE2e diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 304dac0f45..b2087d4660 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -92,6 +92,9 @@ func TestE2e(t *testing.T) { if _, set := os.LookupEnv("ACCEPT_VISUAL"); set { runArgs = append(runArgs, "--update-snapshots") } + if project := os.Getenv("PLAYWRIGHT_PROJECT"); project != "" { + runArgs = append(runArgs, "--project="+project) + } // Create new test for each input file for _, path := range paths {