Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable no-await-in-loop for Playwright #128

Merged
merged 6 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
rajsite marked this conversation as resolved.
Show resolved Hide resolved
"type": "patch",
"comment": "Disable no-await-in-loop for Playwright",
"packageName": "@ni/eslint-config-playwright",
"email": "[email protected]",
"dependentChangeType": "patch"
}
8 changes: 8 additions & 0 deletions packages/eslint-config-playwright/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ module.exports = {
'plugin:playwright/playwright-test'
],
rules: {
/*
In UI tests it is common to have a loop that performs async operations which must be sequential.
For example, clicking on a list of elements one after another.
While there are still some cases where the rule would suggest valid improvements, they are not common
enough to justify the noise that comes from needing to suppress it.
*/
'no-await-in-loop': 'off',

/*
Playwright marks this as recommended but configures it as 'warn'.
Deeply nested describe blocks are likely an indication that test files are too complicated.
Expand Down