File tree Expand file tree Collapse file tree 7 files changed +412
-14
lines changed Expand file tree Collapse file tree 7 files changed +412
-14
lines changed Original file line number Diff line number Diff line change 1+ name : Playwright Tests
2+ on : [pull_request, workflow_dispatch]
3+ jobs :
4+ test :
5+ timeout-minutes : 60
6+ runs-on : ubuntu-latest
7+ steps :
8+ - uses : actions/checkout@v4
9+ - uses : actions/setup-node@v4
10+ with :
11+ node-version : lts/*
12+ - name : Install dependencies
13+ run : npm ci
14+ - name : Install Playwright Browsers
15+ run : npx playwright install --with-deps
16+ - name : Run Playwright tests
17+ run : npx playwright test
18+ env :
19+ PASSWORD : ${{ secrets.PASSWORD }}
20+ - uses : actions/upload-artifact@v4
21+ if : ${{ !cancelled() }}
22+ with :
23+ name : playwright-report
24+ path : playwright-report/
25+ retention-days : 30
Original file line number Diff line number Diff line change 11.DS_Store
2- cypress.env.json
2+
33node_modules /
4+
5+ cypress.env.json
46cypress /downloads /
57cypress /screenshots /
68cypress /videos /
9+
10+ test-results /
11+ playwright-report /
12+ blob-report /
13+ playwright /.cache /
Original file line number Diff line number Diff line change 88 "cy:open:prod" : " cypress open --env environment=prod" ,
99 "test" : " cypress run --record false --browser chrome" ,
1010 "test:prod" : " cypress run --record false --browser chrome --env environment=prod" ,
11- "test:prod:cloud" : " cypress run --browser chrome --record --tag 'prod' --env environment=prod"
11+ "test:prod:cloud" : " cypress run --browser chrome --record --tag 'prod' --env environment=prod" ,
12+ "pw:open" : " PASSWORD='53cR37P@55w0rD' playwright test --ui"
1213 },
1314 "keywords" : [
1415 " Cypress Playground" ,
2021 "author" : " Walmyr <wlsf82@gmail.com> (https://walmyr.dev/)" ,
2122 "license" : " MIT" ,
2223 "devDependencies" : {
24+ "@playwright/test" : " ^1.49.1" ,
25+ "@types/node" : " ^22.10.2" ,
2326 "axe-core" : " ^4.10.2" ,
2427 "cypress" : " ^13.17.0" ,
25- "cypress-axe" : " ^1.5.0"
28+ "cypress-axe" : " ^1.5.0" ,
29+ "lodash" : " ^4.17.21"
2630 }
2731}
Original file line number Diff line number Diff line change 1+ // @ts -check
2+ const { defineConfig, devices } = require ( '@playwright/test' )
3+
4+ /**
5+ * Read environment variables from file.
6+ * https://github.com/motdotla/dotenv
7+ */
8+ // require('dotenv').config({ path: path.resolve(__dirname, '.env') })
9+
10+ /**
11+ * @see https://playwright.dev/docs/test-configuration
12+ */
13+ module . exports = defineConfig ( {
14+ testDir : './tests' ,
15+ /* Run tests in files in parallel */
16+ fullyParallel : true ,
17+ /* Fail the build on CI if you accidentally left test.only in the source code. */
18+ forbidOnly : ! ! process . env . CI ,
19+ /* Retry on CI only */
20+ retries : process . env . CI ? 2 : 0 ,
21+ /* Opt out of parallel tests on CI. */
22+ workers : process . env . CI ? 1 : undefined ,
23+ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
24+ reporter : 'html' ,
25+ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
26+ use : {
27+ /* Base URL to use in actions like `await page.goto('/')`. */
28+ // baseURL: 'http://127.0.0.1:3000',
29+
30+ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
31+ trace : 'on-first-retry' ,
32+ } ,
33+
34+ /* Configure projects for major browsers */
35+ projects : [
36+ {
37+ name : 'chromium' ,
38+ use : { ...devices [ 'Desktop Chrome' ] } ,
39+ } ,
40+ ] ,
41+ } )
42+
Original file line number Diff line number Diff line change 1+ Hello, World!
You can’t perform that action at this time.
0 commit comments