File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,13 @@ func TestE2e(t *testing.T) {
7878 t .Fatal (fmt .Errorf ("No e2e tests found in %s" , searchGlob ))
7979 }
8080
81+ runArgs := []string {"npx" , "playwright" , "test" }
82+
83+ // To update snapshot outputs
84+ if _ , set := os .LookupEnv ("ACCEPT_VISUAL" ); set {
85+ runArgs = append (runArgs , "--update-snapshots" )
86+ }
87+
8188 // Create new test for each input file
8289 for _ , path := range paths {
8390 _ , filename := filepath .Split (path )
@@ -86,7 +93,7 @@ func TestE2e(t *testing.T) {
8693 t .Run (testname , func (t * testing.T ) {
8794 // Default 2 minute timeout
8895 onGiteaRun (t , func (* testing.T , * url.URL ) {
89- cmd := exec .Command ("npx" , "playwright" , "test" )
96+ cmd := exec .Command (runArgs [ 0 ], runArgs ... )
9097 cmd .Env = os .Environ ()
9198 cmd .Env = append (cmd .Env , fmt .Sprintf ("GITEA_URL=%s" , setting .AppURL ))
9299 var out bytes.Buffer
You can’t perform that action at this time.
0 commit comments