mirror of
https://github.com/mattermost/mattermost.git
synced 2026-08-26 13:17:29 -05:00
* add testcontainers to playwright-lib * include retry mechanism for transient failures * - Introduced a new command `testcontainers:up` in package.json to run Playwright tests with Testcontainers. - Created a standalone Playwright configuration file `playwright.testcontainers-up.config.ts` for managing Testcontainers. - Added a no-op test `testcontainers_up.spec.ts` to ensure the Testcontainers stack is up during the test run. - Implemented a global setup script `testcontainers_up_global_setup.ts` to start and stop the Testcontainers stack. - Updated dependencies in package.json, including adding `chalk` for logging. * fix package-lock * fix tsc and restore waiting for all migrations to complete --------- Co-authored-by: Mattermost Build <build@mattermost.com>
67 lines
3.5 KiB
JSON
67 lines
3.5 KiB
JSON
{
|
|
"name": "mattermost-playwright",
|
|
"workspaces": [
|
|
"lib"
|
|
],
|
|
"scripts": {
|
|
"postinstall": "script/post_install.sh && npm run build",
|
|
"build": "npm run build --workspaces",
|
|
"build:watch": "npm run build:watch --workspaces",
|
|
"tsc": "npm run tsc --workspaces && tsc -b",
|
|
"lint": "eslint .",
|
|
"lint:test-docs": "node script/lint-test-docs.js",
|
|
"prettier": "prettier . --check",
|
|
"prettier:fix": "prettier --write .",
|
|
"check": "npm run lint && npm run prettier && npm run tsc && npm run lint:test-docs",
|
|
"test": "npm run build && cross-env PW_SNAPSHOT_ENABLE=true playwright test",
|
|
"test:smoke": "npm run build && playwright test --grep @smoke --project=chrome --retries=1",
|
|
"test:ci": "npm run build && cross-env PW_SNAPSHOT_ENABLE=true playwright test --grep-invert @visual --project=chrome",
|
|
"test:a11y-update-snapshots": "npm run build && cross-env PW_SNAPSHOT_ENABLE=true playwright test specs/accessibility --project=chrome --grep @snapshots --update-snapshots --update-source-method=overwrite",
|
|
"test:visual": "npm run build && cross-env PW_SNAPSHOT_ENABLE=true playwright test --grep @visual",
|
|
"test:visual-update-snapshots": "npm run build && cross-env PW_SNAPSHOT_ENABLE=true playwright test specs/visual --grep @visual --update-snapshots",
|
|
"test:update-snapshots": "npm run build && cross-env PW_SNAPSHOT_ENABLE=true playwright test --project=chrome --grep @snapshots --update-snapshots --update-source-method=overwrite",
|
|
"test:slomo": "npm run build && cross-env PW_SNAPSHOT_ENABLE=true PW_SLOWMO=1000 playwright test",
|
|
"test:full": "npm run build && cross-env PW_USE_TESTCONTAINERS=true PW_SNAPSHOT_ENABLE=true playwright test",
|
|
"testcontainers:up": "npm run build && cross-env PW_USE_TESTCONTAINERS=true playwright test --config=playwright.testcontainers-up.config.ts",
|
|
"testcontainers:down": "node script/testcontainers_down.mjs",
|
|
"percy:docker": "npm run build && cross-env PW_PERCY_ENABLE=true PERCY_BROWSER_EXECUTABLE='/ms-playwright/chromium-1169/chrome-linux/chrome' percy exec -- playwright test specs/visual --grep @visual --project=chrome --project=ipad",
|
|
"codegen": "npm run build && cross-env playwright codegen $PW_BASE_URL",
|
|
"playwright-ui": "npm run build && cross-env playwright test --ui",
|
|
"show-report": "npm run build && npx playwright show-report results/reporter",
|
|
"start:libretranslate-mock": "node mock_libre_translate.js",
|
|
"clean": "rm -rf dist node_modules package-lock.json *.tsbuildinfo logs results storage_state test-results && npm run clean --workspaces"
|
|
},
|
|
"dependencies": {
|
|
"@mattermost/client": "file:../../webapp/platform/client",
|
|
"@mattermost/playwright-lib": "*",
|
|
"@mattermost/types": "file:../../webapp/platform/types"
|
|
},
|
|
"devDependencies": {
|
|
"@mattermost/eslint-plugin": "file:../../webapp/platform/eslint-plugin",
|
|
"@playwright/test": "1.61.1",
|
|
"@types/luxon": "3.7.2",
|
|
"@types/pg": "8.20.0",
|
|
"@typescript-eslint/eslint-plugin": "8.62.0",
|
|
"chalk": "5.6.2",
|
|
"cross-env": "10.1.0",
|
|
"dayjs": "1.11.21",
|
|
"eslint": "9.39.4",
|
|
"eslint-import-resolver-typescript": "4.4.5",
|
|
"glob": "13.0.6",
|
|
"globals": "17.7.0",
|
|
"luxon": "3.7.2",
|
|
"pg": "8.22.0",
|
|
"prettier": "3.9.1",
|
|
"typescript": "6.0.3",
|
|
"zod": "4.4.3"
|
|
},
|
|
"allowScripts": {
|
|
"cpu-features@0.0.10": true,
|
|
"protobufjs@7.6.4": true,
|
|
"ssh2@1.17.0": true,
|
|
"unrs-resolver@1.12.2": true,
|
|
"@percy/core@1.32.2": true,
|
|
"fsevents@2.3.2": true
|
|
}
|
|
}
|