File tree Expand file tree Collapse file tree 2 files changed +27
-4
lines changed Expand file tree Collapse file tree 2 files changed +27
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : Testing for visual regression on old theme
2
+
3
+ # Run the workflow when code is pushed or when a pull request is created
4
+ on :
5
+ push :
6
+ branches :
7
+ - ' **'
8
+ pull_request :
9
+ branches :
10
+ - main
11
+
12
+ jobs :
13
+ playwright :
14
+ name : Run Playwright
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ # Checkout the repository so the workflow has access to the code
18
+ - name : Checkout code
19
+ uses : actions/checkout@v3
20
+ - name : Run tests
21
+ run : |
22
+ make tests
Original file line number Diff line number Diff line change 1
1
import { defineConfig , devices } from '@playwright/test' ;
2
2
3
+ const BASE_URL = 'http://127.0.0.1' ;
4
+ const PORT = 1313 ;
3
5
export default defineConfig ( {
4
6
testDir : './src' ,
5
7
fullyParallel : true ,
@@ -8,7 +10,7 @@ export default defineConfig({
8
10
snapshotPathTemplate : '{testDir}/__screenshots__/{testFilePath}/{arg}{ext}' ,
9
11
reporter : [ [ 'html' , { outputFolder : './playwright-report' } ] ] ,
10
12
use : {
11
- baseURL : 'http://127.0.0.1:1314' ,
13
+ baseURL : ` ${ BASE_URL } : ${ PORT } ` ,
12
14
screenshots : 'only-on-failure' ,
13
15
video : 'retain-on-failure' ,
14
16
trace : 'on-first-retry' ,
@@ -32,9 +34,8 @@ export default defineConfig({
32
34
} ,
33
35
] ,
34
36
webServer : {
35
- command :
36
- 'cd ../exampleSite && hugo mod get && hugo --gc -e production && hugo serve --port 1314' ,
37
- url : 'http://127.0.0.1:1314' ,
37
+ command : `cd ../exampleSite && hugo mod get && hugo --gc -e production && hugo serve --port ${ PORT } ` ,
38
+ url : `${ BASE_URL } :${ PORT } ` ,
38
39
stdout : 'ignore' ,
39
40
} ,
40
41
expect : {
You can’t perform that action at this time.
0 commit comments