mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-19 18:18:27 -05:00
chore: reorganise playwright config (#53884)
This commit is contained in:
committed by
GitHub
parent
e03b78666b
commit
074af6effb
2
.github/workflows/e2e-playwright.yml
vendored
2
.github/workflows/e2e-playwright.yml
vendored
@@ -137,7 +137,6 @@ jobs:
|
||||
|
||||
- name: Install playwright dependencies
|
||||
run: |
|
||||
cd ./e2e
|
||||
npx playwright install
|
||||
npx playwright install-deps
|
||||
|
||||
@@ -145,5 +144,4 @@ jobs:
|
||||
run: |
|
||||
pnpm run start-ci &
|
||||
sleep 10
|
||||
cd ./e2e
|
||||
npx playwright test --project=${{ matrix.browsers }}
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -213,3 +213,6 @@ curriculum/build
|
||||
### UI Components ###
|
||||
tools/ui-components/dist
|
||||
|
||||
### Playwright ###
|
||||
|
||||
/playwright
|
||||
|
||||
@@ -10,7 +10,7 @@ curriculum-server/data/curriculum.json
|
||||
curriculum/challenges/_meta/*/*
|
||||
curriculum/challenges/**/*
|
||||
docs/**/*.md
|
||||
e2e/playwright/.auth
|
||||
/playwright
|
||||
pnpm-lock.yaml
|
||||
shared/config/*.js
|
||||
shared/config/curriculum.json
|
||||
|
||||
4
e2e/.gitignore
vendored
4
e2e/.gitignore
vendored
@@ -1,4 +0,0 @@
|
||||
/test-results
|
||||
/playwright-report
|
||||
/playwright/.cache/
|
||||
/playwright/.auth
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"name": "@freecodecamp/e2e",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "npx playwright test"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.36.2",
|
||||
"@types/node": "^20.4.9"
|
||||
}
|
||||
}
|
||||
@@ -106,6 +106,7 @@
|
||||
"@babel/preset-env": "7.23.7",
|
||||
"@babel/preset-react": "7.23.3",
|
||||
"@babel/preset-typescript": "7.23.3",
|
||||
"@playwright/test": "^1.41.2",
|
||||
"@testing-library/cypress": "9.0.0",
|
||||
"@testing-library/dom": "8.20.1",
|
||||
"@testing-library/jest-dom": "5.17.0",
|
||||
|
||||
@@ -6,13 +6,13 @@ import { defineConfig, devices } from '@playwright/test';
|
||||
* Read environment variables from file.
|
||||
* https://github.com/motdotla/dotenv
|
||||
*/
|
||||
const envPath = path.resolve(__dirname, '..', '.env');
|
||||
const envPath = path.resolve(__dirname, '.env');
|
||||
dotenvConfig({ path: envPath });
|
||||
/**
|
||||
* See https://playwright.dev/docs/test-configuration.
|
||||
*/
|
||||
export default defineConfig({
|
||||
testDir: './',
|
||||
testDir: 'e2e',
|
||||
testMatch: '*.spec.ts',
|
||||
/* Run tests in files in parallel */
|
||||
fullyParallel: false,
|
||||
@@ -23,9 +23,10 @@ export default defineConfig({
|
||||
/* Opt out of parallel tests on CI. */
|
||||
workers: 1,
|
||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||
reporter: 'html',
|
||||
reporter: [['html', { outputFolder: 'playwright/reporter' }]],
|
||||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||
timeout: 15 * 1000,
|
||||
outputDir: 'playwright/test-results',
|
||||
|
||||
use: {
|
||||
/* Base URL to use in actions like `await page.goto('/')`. */
|
||||
1828
pnpm-lock.yaml
generated
1828
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,6 @@ packages:
|
||||
- 'client'
|
||||
- 'curriculum'
|
||||
- 'shared'
|
||||
- 'e2e'
|
||||
- 'tools/challenge-editor/api'
|
||||
- 'tools/challenge-editor/client'
|
||||
- 'tools/challenge-helper-scripts'
|
||||
|
||||
Reference in New Issue
Block a user