File tree Expand file tree Collapse file tree 6 files changed +42
-11
lines changed Expand file tree Collapse file tree 6 files changed +42
-11
lines changed Original file line number Diff line number Diff line change 1
1
name : 🧪 Playwright End To End (e2e) Tests Workflow
2
2
3
3
on :
4
-
4
+ # Runs on pushes targeting the default branch
5
+ push :
6
+ branches :
7
+ - main
5
8
6
- # Allows you to run this workflow manually from the Actions tab
9
+ # Allows you to run this workflow manually from the Actions tab
7
10
workflow_dispatch :
8
11
9
12
jobs :
10
13
tests_e2e :
11
- name : Run end-to-end tests
14
+ name : Run end-to-end tests for live website
12
15
runs-on : ubuntu-latest
16
+ env :
17
+ BASE_URL_TESTING : ${{ vars.BASE_URL_TESTING }}
13
18
steps :
14
19
- uses : actions/checkout@v3
15
20
- uses : actions/setup-node@v3
Original file line number Diff line number Diff line change 8
8
/playwright-report /
9
9
/blob-report /
10
10
/playwright /.cache /
11
+ .env
12
+ .venv
Original file line number Diff line number Diff line change 70
70
" bi-circle-half" ,
71
71
" bi-moon" ,
72
72
" bi-save" ,
73
+ " blockquote" ,
74
+ " blockquote-alert" ,
75
+ " blockquote-alert-caution" ,
76
+ " blockquote-alert-heading" ,
77
+ " blockquote-alert-important" ,
78
+ " blockquote-alert-note" ,
73
79
" border" ,
74
80
" border-0" ,
75
81
" border-1" ,
178
184
" fa-calendar" ,
179
185
" fa-calendar-day" ,
180
186
" fa-check-to-slot" ,
187
+ " fa-circle-info" ,
181
188
" fa-code" ,
182
189
" fa-ellipsis" ,
190
+ " fa-exclamation" ,
183
191
" fa-face-frown" ,
184
192
" fa-fw" ,
185
193
" fa-github" ,
186
194
" fa-globe" ,
195
+ " fa-hand" ,
187
196
" fa-laptop-medical" ,
188
197
" fa-link" ,
189
198
" fa-linkedin" ,
336
345
" shadow" ,
337
346
" show" ,
338
347
" slide" ,
339
- " small" ,
340
348
" start-0" ,
341
349
" start-50" ,
342
350
" sticky-top" ,
679
687
" externalcosts-property" ,
680
688
" fa-calendar" ,
681
689
" fa-face-frown" ,
690
+ " fa-hand" ,
682
691
" fab-blogger" ,
683
692
" fab-github" ,
684
693
" fab-linkedin" ,
692
701
" fas-book" ,
693
702
" fas-calendar-day" ,
694
703
" fas-check-to-slot" ,
704
+ " fas-circle-info" ,
695
705
" fas-code" ,
696
706
" fas-ellipsis" ,
707
+ " fas-exclamation" ,
697
708
" fas-globe" ,
698
709
" fas-laptop-medical" ,
699
710
" fas-link" ,
Original file line number Diff line number Diff line change 72
72
"autoprefixer" : " ^10.4.20" ,
73
73
"cssnano" : " ^7.0.5" ,
74
74
"cssnano-preset-advanced" : " ^7.0.5" ,
75
+ "dotenv" : " ^16.4.5" ,
75
76
"hugo-bin" : " 0.131.0" ,
76
77
"purgecss-whitelister" : " ^2.4.0"
77
78
},
Original file line number Diff line number Diff line change 1
1
// @ts -check
2
2
const { defineConfig, devices } = require ( '@playwright/test' ) ;
3
+ import dotenv from 'dotenv' ;
4
+ import path from 'path' ;
3
5
4
- /**
5
- * Read environment variables from file.
6
- * https://github.com/motdotla/dotenv
7
- */
8
- // require('dotenv').config({ path: path.resolve(__dirname, '.env') });
6
+ // Read from ".env" file.
7
+ dotenv . config ( { path : path . resolve ( __dirname , '.env' ) } ) ;
9
8
10
- const port = 1313 ;
11
- const baseURL = `http://localhost: ${ port } ` ;
9
+ // Use the environment variable for the base URL
10
+ const baseURL = process . env . BASE_URL_TESTING ;
12
11
13
12
/**
14
13
* @see https://playwright.dev/docs/test-configuration
You can’t perform that action at this time.
0 commit comments