1
Fork 0

Playwright testing for commit diffs

includes:

- easier repo declaration for playwright tests by @Gusted
- full backend build for pushing Git repos by @Gusted
- playwright testing (which fails with the current diff algorithm, but
  passes with the new)
- disable eslint rule for conditional expect, because it defeats the
  purpose (working around it would result in much more complex test code
  in our cases)
This commit is contained in:
Otto Richter 2024-08-25 14:52:21 +02:00
parent 190b5a3859
commit d97e36f6d7
7 changed files with 121 additions and 7 deletions

View file

@ -37,7 +37,7 @@ func TestMain(m *testing.M) {
graceful.InitManager(managerCtx)
defer cancel()
tests.InitTest(false)
tests.InitTest(true)
testE2eWebRoutes = routers.NormalRoutes()
os.Unsetenv("GIT_AUTHOR_NAME")
@ -102,7 +102,8 @@ func TestE2e(t *testing.T) {
t.Run(testname, func(t *testing.T) {
// Default 2 minute timeout
onGiteaRun(t, func(*testing.T, *url.URL) {
onForgejoRun(t, func(*testing.T, *url.URL) {
defer DeclareGitRepos(t)()
thisTest := runArgs
thisTest = append(thisTest, path)
cmd := exec.Command(runArgs[0], thisTest...)