Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,6 @@ module.exports = {
version: 'detect',
},
},
overrides: [
{
files: ['e2e/**/*.ts'],
parserOptions: {
project: './e2e/tsconfig.json',
},
rules: {
'no-console': 'off',
'no-empty-pattern': 'off',
},
},
],
globals: {
process: 'readonly',
React: true,
Expand Down
23 changes: 23 additions & 0 deletions frontend/e2e/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
extends: ['plugin:console/playwright'],
rules: {
'no-console': 'off',
'no-empty-pattern': 'off',
'playwright/no-conditional-in-test': 'off',
'playwright/no-skipped-test': ['warn', { allowConditional: true }],
},
overrides: [
{
files: ['setup/**/*.ts'],
rules: {
'playwright/expect-expect': 'off',
Comment thread
fsgreco marked this conversation as resolved.
},
},
],
};
2 changes: 2 additions & 0 deletions frontend/e2e/pages/base-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export default abstract class BasePage {
} catch (clickError) {
const msg = clickError instanceof Error ? clickError.message : String(clickError);
if (attempt < retries && (msg.includes('intercept') || msg.includes('not visible'))) {
// eslint-disable-next-line playwright/no-force-option
await locator.click({ force: true, timeout: attemptTimeout });
return;
}
Expand All @@ -78,6 +79,7 @@ export default abstract class BasePage {
} catch (error) {
lastError = error;
if (attempt < retries && retryDelay > 100) {
// eslint-disable-next-line playwright/no-wait-for-timeout
await this.page.waitForTimeout(retryDelay);
}
}
Expand Down
1 change: 1 addition & 0 deletions frontend/packages/eslint-plugin-console/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {

// Augmenting configs: choose one or more
jest: require('./lib/config/jest'),
playwright: require('./lib/config/playwright'),

// React Testing Library (test/spec files only). Also merged into `react-typescript-prettier`.
'testing-library-tests': require('./lib/config/testing-library-tests'),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
plugins: ['playwright'],
extends: ['plugin:playwright/recommended'],
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = {
overrides: [
{
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
excludedFiles: ['e2e/**'],
plugins: ['testing-library'],
extends: ['plugin:testing-library/react'],
rules: {
Expand Down
1 change: 1 addition & 0 deletions frontend/packages/eslint-plugin-console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"eslint-plugin-json": "^2.0.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-n": "^17.24.0",
"eslint-plugin-playwright": "^2.10.2",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.6.0",
"eslint-plugin-react": "^7.37.0",
Expand Down
19 changes: 19 additions & 0 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10947,6 +10947,7 @@ __metadata:
eslint-plugin-json: "npm:^2.0.1"
eslint-plugin-jsx-a11y: "npm:^6.8.0"
eslint-plugin-n: "npm:^17.24.0"
eslint-plugin-playwright: "npm:^2.10.2"
eslint-plugin-prettier: "npm:^4.2.1"
eslint-plugin-promise: "npm:^6.6.0"
eslint-plugin-react: "npm:^7.37.0"
Expand Down Expand Up @@ -11100,6 +11101,17 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-playwright@npm:^2.10.2":
version: 2.10.2
resolution: "eslint-plugin-playwright@npm:2.10.2"
dependencies:
globals: "npm:^17.3.0"
peerDependencies:
eslint: ">=8.40.0"
checksum: 10c0/cede6b74aa8c242d058f42da7bfdc29db5119a4184b05d8735ced16a89a0968ca36de217ee7d927cdc6687ef3d32bff3f3f8211e7c62256ca274cb4d3b4e478d
languageName: node
linkType: hard

"eslint-plugin-prettier@npm:^4.2.1":
version: 4.2.5
resolution: "eslint-plugin-prettier@npm:4.2.5"
Expand Down Expand Up @@ -12719,6 +12731,13 @@ __metadata:
languageName: node
linkType: hard

"globals@npm:^17.3.0":
version: 17.6.0
resolution: "globals@npm:17.6.0"
checksum: 10c0/cf94fb4329cc5c68cf81018fd68324f413181ee169f0235b0b33b82bc93fe7825a21beea951f83a80e8e4bbdad9c0c80515a145b5fd4b5cb52f2a80db899a93f
languageName: node
linkType: hard

"globalthis@npm:^1.0.4":
version: 1.0.4
resolution: "globalthis@npm:1.0.4"
Expand Down