2021-11-30 00:34:47 +00:00
|
|
|
/* eslint-disable no-undef */
|
|
|
|
module.exports = {
|
2024-08-07 21:36:14 +00:00
|
|
|
extends: ['plugin:playwright/recommended'],
|
2023-05-18 21:54:46 +00:00
|
|
|
rules: {
|
2024-08-07 21:36:14 +00:00
|
|
|
'playwright/max-nested-describe': ['error', { max: 1 }],
|
|
|
|
'playwright/expect-expect': 'off'
|
2023-05-18 21:54:46 +00:00
|
|
|
},
|
|
|
|
overrides: [
|
|
|
|
{
|
2024-08-07 21:36:14 +00:00
|
|
|
//Apply Best Practices to externalFixtures and exampleTemplate.e2e.spec.js
|
|
|
|
files: [
|
|
|
|
'appActions.js',
|
|
|
|
'baseFixtures.js',
|
|
|
|
'pluginFixtures.js',
|
|
|
|
'**/exampleTemplate.e2e.spec.js'
|
|
|
|
],
|
2023-05-18 21:54:46 +00:00
|
|
|
rules: {
|
2024-08-07 21:36:14 +00:00
|
|
|
'playwright/no-raw-locators': 'error',
|
|
|
|
'playwright/no-nth-methods': 'error',
|
|
|
|
'playwright/no-get-by-title': 'error',
|
|
|
|
'playwright/prefer-comparison-matcher': 'error'
|
2023-05-18 21:54:46 +00:00
|
|
|
}
|
2024-08-13 21:55:57 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
// Disable no-raw-locators for .contract.perf.spec.js files until https://github.com/grafana/xk6-browser/issues/1226
|
|
|
|
files: ['**/*.contract.perf.spec.js'],
|
|
|
|
rules: {
|
|
|
|
'playwright/no-raw-locators': 'off'
|
|
|
|
}
|
2024-09-28 16:17:32 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
files: ['**/*.visual.spec.js'],
|
|
|
|
rules: {
|
|
|
|
'playwright/no-networkidle': 'off' //https://github.com/nasa/openmct/issues/7549
|
|
|
|
}
|
2023-05-18 21:54:46 +00:00
|
|
|
}
|
|
|
|
]
|
2021-11-30 00:34:47 +00:00
|
|
|
};
|