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 11import { defineConfig , devices } from '@playwright/test' ;
22
3+ const BASE_URL = 'http://127.0.0.1' ;
4+ const PORT = 1313 ;
35export default defineConfig ( {
46 testDir : './src' ,
57 fullyParallel : true ,
@@ -8,7 +10,7 @@ export default defineConfig({
810 snapshotPathTemplate : '{testDir}/__screenshots__/{testFilePath}/{arg}{ext}' ,
911 reporter : [ [ 'html' , { outputFolder : './playwright-report' } ] ] ,
1012 use : {
11- baseURL : 'http://127.0.0.1:1314' ,
13+ baseURL : ` ${ BASE_URL } : ${ PORT } ` ,
1214 screenshots : 'only-on-failure' ,
1315 video : 'retain-on-failure' ,
1416 trace : 'on-first-retry' ,
@@ -32,9 +34,8 @@ export default defineConfig({
3234 } ,
3335 ] ,
3436 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 } ` ,
3839 stdout : 'ignore' ,
3940 } ,
4041 expect : {
You can’t perform that action at this time.
0 commit comments