diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 54ebce92e..2cddf55fa 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -4,11 +4,11 @@ on: push: paths: - "apps/pwabuilder/**" - branches: [ main, dev ] + branches: [ tests-final, staging, main ] pull_request: paths: - "apps/pwabuilder/**" - branches: [ main, dev ] + branches: [ tests-final, staging, main ] jobs: test: timeout-minutes: 60 @@ -20,13 +20,17 @@ jobs: node-version: 16 - name: Install dependencies run: npm ci + - name: Install Playwright Test Globally + run: npm install -g @playwright/test - name: Install Playwright Browsers run: npx playwright install --with-deps + - name: Install Playwright Test Locally + run: npm install @playwright/test --save-dev - name: Run Playwright tests - run: npx playwright test + run: npx playwright test tests/basic.spec.ts tests/packaging.spec.ts tests/report-card.spec.ts - uses: actions/upload-artifact@v3 if: always() with: name: playwright-report path: playwright-report/ - retention-days: 30 \ No newline at end of file + retention-days: 30 diff --git a/apps/pwabuilder/package-lock.json b/apps/pwabuilder/package-lock.json index bbe70a145..50885e8d1 100644 --- a/apps/pwabuilder/package-lock.json +++ b/apps/pwabuilder/package-lock.json @@ -27,7 +27,7 @@ "devDependencies": { "@azure/msal-browser": "^2.37.0", "@istanbuljs/nyc-config-typescript": "^1.0.1", - "@playwright/test": "^1.32.3", + "@playwright/test": "^1.37.1", "@types/chai": "^4.2.21", "@types/lodash-es": "^4.17.4", "@types/mocha": "^8.2.3", @@ -1115,34 +1115,34 @@ "dev": true }, "node_modules/@playwright/test": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.33.0.tgz", - "integrity": "sha512-YunBa2mE7Hq4CfPkGzQRK916a4tuZoVx/EpLjeWlTVOnD4S2+fdaQZE0LJkbfhN5FTSKNLdcl7MoT5XB37bTkg==", + "version": "1.37.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.37.1.tgz", + "integrity": "sha512-bq9zTli3vWJo8S3LwB91U0qDNQDpEXnw7knhxLM0nwDvexQAwx9tO8iKDZSqqneVq+URd/WIoz+BALMqUTgdSg==", "dev": true, "dependencies": { "@types/node": "*", - "playwright-core": "1.33.0" + "playwright-core": "1.37.1" }, "bin": { "playwright": "cli.js" }, "engines": { - "node": ">=14" + "node": ">=16" }, "optionalDependencies": { "fsevents": "2.3.2" } }, "node_modules/@playwright/test/node_modules/playwright-core": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.33.0.tgz", - "integrity": "sha512-aizyPE1Cj62vAECdph1iaMILpT0WUDCq3E6rW6I+dleSbBoGbktvJtzS6VHkZ4DKNEOG9qJpiom/ZxO+S15LAw==", + "version": "1.37.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.37.1.tgz", + "integrity": "sha512-17EuQxlSIYCmEMwzMqusJ2ztDgJePjrbttaefgdsiqeLWidjYz9BxXaTaZWxH1J95SHGk6tjE+dwgWILJoUZfA==", "dev": true, "bin": { - "playwright": "cli.js" + "playwright-core": "cli.js" }, "engines": { - "node": ">=14" + "node": ">=16" } }, "node_modules/@pwabuilder/code-editor": { @@ -12587,20 +12587,20 @@ "dev": true }, "@playwright/test": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.33.0.tgz", - "integrity": "sha512-YunBa2mE7Hq4CfPkGzQRK916a4tuZoVx/EpLjeWlTVOnD4S2+fdaQZE0LJkbfhN5FTSKNLdcl7MoT5XB37bTkg==", + "version": "1.37.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.37.1.tgz", + "integrity": "sha512-bq9zTli3vWJo8S3LwB91U0qDNQDpEXnw7knhxLM0nwDvexQAwx9tO8iKDZSqqneVq+URd/WIoz+BALMqUTgdSg==", "dev": true, "requires": { "@types/node": "*", "fsevents": "2.3.2", - "playwright-core": "1.33.0" + "playwright-core": "1.37.1" }, "dependencies": { "playwright-core": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.33.0.tgz", - "integrity": "sha512-aizyPE1Cj62vAECdph1iaMILpT0WUDCq3E6rW6I+dleSbBoGbktvJtzS6VHkZ4DKNEOG9qJpiom/ZxO+S15LAw==", + "version": "1.37.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.37.1.tgz", + "integrity": "sha512-17EuQxlSIYCmEMwzMqusJ2ztDgJePjrbttaefgdsiqeLWidjYz9BxXaTaZWxH1J95SHGk6tjE+dwgWILJoUZfA==", "dev": true } } diff --git a/apps/pwabuilder/package.json b/apps/pwabuilder/package.json index eaa22b2e7..36fcae8fa 100644 --- a/apps/pwabuilder/package.json +++ b/apps/pwabuilder/package.json @@ -14,8 +14,7 @@ "start-remote": "vite --host", "postinstall": "npm run copy-sl-assets", "copy-sl-assets": "mkdirp ./public/assets/sl-icons/assets/icons && ncp ./node_modules/@shoelace-style/shoelace/dist/assets/icons ./public/assets/sl-icons/assets/icons", - "test": "npx nyc@latest playwright test", - "coverage": "cd coverage/lcov-report && npx http-server -p 3001" + "test": "playwright test" }, "author": "", "license": "ISC", @@ -37,7 +36,7 @@ "devDependencies": { "@azure/msal-browser": "^2.37.0", "@istanbuljs/nyc-config-typescript": "^1.0.1", - "@playwright/test": "^1.32.3", + "@playwright/test": "^1.37.1", "@types/chai": "^4.2.21", "@types/lodash-es": "^4.17.4", "@types/mocha": "^8.2.3", diff --git a/apps/pwabuilder/playwright-report/index.html b/apps/pwabuilder/playwright-report/index.html index 8baac694b..bb75c067e 100644 --- a/apps/pwabuilder/playwright-report/index.html +++ b/apps/pwabuilder/playwright-report/index.html @@ -7,7 +7,7 @@