MM-62954 E2E/Playwright shared library (#30177)

* feat: Add package.json for Playwright library with dependencies

* feat: Add explicit exports for test.config in playwright-lib package

* feat: Add initialization setup for Mattermost E2E testing with admin and user client

* fix: Update package dependencies and resolve TypeScript build errors

* feat: Update package exports for test.config to support both CommonJS and ESM

* playwright shared library

* add README, fix pipeline

* keep file structures, move report up to playwright

* minimize API, use the prerelease versions of client and types

* bump version

* update package*.json

* resolve merge conflict

* update depedencies and merge conflicts

* update readme and fix ci

* remove unnecessary export and list all external packages

* fix import for Client4
Этот коммит содержится в:
Saturnino Abril
2025-04-01 08:52:56 +08:00
коммит произвёл GitHub
родитель ce9632cca3
Коммит a47269cfe2
163 изменённых файлов: 7203 добавлений и 5048 удалений

Просмотреть файл

@@ -1,42 +1,34 @@
{
"scripts": {
"test": "cross-env PW_SNAPSHOT_ENABLE=true playwright test",
"test:update-snapshots": "cross-env PW_SNAPSHOT_ENABLE=true playwright test --update-snapshots",
"percy": "cross-env PERCY_TOKEN=$PERCY_TOKEN PW_PERCY_ENABLE=true percy exec -- playwright test --project=chrome --project=ipad",
"tsc": "tsc -b",
"lint": "eslint .",
"prettier": "prettier . --check",
"prettier:fix": "prettier --write .",
"check": "npm run tsc && npm run lint && npm run prettier",
"codegen": "cross-env playwright codegen $PW_BASE_URL",
"playwright-ui": "cross-env playwright test --ui",
"test-slomo": "cross-env PW_SNAPSHOT_ENABLE=true PW_SLOWMO=1000 playwright test",
"show-report": "npx playwright show-report",
"postinstall": "script/post_install.sh"
},
"dependencies": {
"@axe-core/playwright": "4.10.1",
"@percy/cli": "1.30.6",
"@percy/playwright": "1.0.7",
"@playwright/test": "1.49.1",
"async-wait-until": "2.0.18",
"axe-core": "4.10.2",
"chalk": "4.1.2",
"dayjs": "1.11.13",
"deepmerge": "4.3.1",
"dotenv": "16.4.7",
"form-data-encoder": "4.0.2",
"formdata-node": "6.0.3",
"uuid": "11.0.5",
"zod": "3.24.1"
},
"devDependencies": {
"@types/uuid": "10.0.0",
"@typescript-eslint/eslint-plugin": "8.20.0",
"@typescript-eslint/parser": "8.20.0",
"cross-env": "7.0.3",
"eslint": "9.18.0",
"prettier": "3.4.2",
"typescript": "5.7.3"
}
"name": "mattermost-playwright",
"private": true,
"workspaces": [
"lib",
"test"
],
"scripts": {
"postinstall": "npm run build",
"build": "npm run build --workspaces --if-present",
"build:watch": "npm run build:watch --workspaces --if-present",
"clean": "rm -rf node_modules logs results test-results && npm run clean --workspaces --if-present",
"tsc": "npm run tsc --workspaces --if-present",
"lint": "eslint .",
"prettier": "prettier . --check",
"prettier:fix": "prettier --write .",
"check": "npm run lint && npm run prettier && npm run tsc",
"test": "npm run test --workspace=test",
"test:ci": "npm run test:ci --workspace=test"
},
"dependencies": {
"dayjs": "1.11.13",
"@playwright/test": "1.51.1"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "8.28.0",
"eslint": "9.23.0",
"eslint-import-resolver-typescript": "4.2.7",
"eslint-plugin-header": "3.1.1",
"eslint-plugin-import": "2.31.0",
"prettier": "3.5.3",
"typescript": "5.7.3"
}
}