diff --git a/modules/package.json b/modules/package.json index 40d99ccd15..10c7caa4a0 100644 --- a/modules/package.json +++ b/modules/package.json @@ -5,9 +5,9 @@ "scripts": { "lint:js": "eslint --max-warnings 0 */src -c ./.eslintrc.cjs", "lint:ts": "tsc --noEmit", - "test:playwright": "playwright test", - "test:playwright:open": "yarn test:playwright --ui", - "test:playwright:screenshots": "playwright-screenshots yarn test:playwright --update-snapshots --grep @screenshot" + "test:playwright": "nx test:playwright --", + "test:playwright:open": "nx test:playwright -- --ui", + "test:playwright:screenshots": "nx test:playwright:screenshots --" }, "devDependencies": { "@element-hq/element-web-playwright-common": "workspace:*", diff --git a/modules/project.json b/modules/project.json new file mode 100644 index 0000000000..7f65e1cf91 --- /dev/null +++ b/modules/project.json @@ -0,0 +1,16 @@ +{ + "$schema": "../node_modules/nx/schemas/project-schema.json", + "projectType": "library", + "targets": { + "test:playwright": { + "command": "playwright test", + "options": { "cwd": "modules" }, + "dependsOn": ["^build:playwright"] + }, + "test:playwright:screenshots": { + "command": "playwright-screenshots playwright test --update-snapshots --grep @screenshot", + "options": { "cwd": "modules" }, + "dependsOn": ["^build:playwright"] + } + } +}