-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Suggestion
We should add additional functions to check if they are being awaited on. Currently we only check expect and test matchers, but none of the page actions or locator actions:
eslint-plugin-playwright/src/rules/missing-playwright-await.ts
Lines 11 to 58 in f3cfc99
const validTypes = new Set([ | |
'AwaitExpression', | |
'ReturnStatement', | |
'ArrowFunctionExpression', | |
]); | |
const expectPlaywrightMatchers = [ | |
'toBeChecked', | |
'toBeDisabled', | |
'toBeEnabled', | |
'toEqualText', // deprecated | |
'toEqualUrl', | |
'toEqualValue', | |
'toHaveFocus', | |
'toHaveSelector', | |
'toHaveSelectorCount', | |
'toHaveText', // deprecated | |
'toMatchAttribute', | |
'toMatchComputedStyle', | |
'toMatchText', | |
'toMatchTitle', | |
'toMatchURL', | |
'toMatchValue', | |
]; | |
const playwrightTestMatchers = [ | |
'toBeChecked', | |
'toBeDisabled', | |
'toBeEditable', | |
'toBeEmpty', | |
'toBeEnabled', | |
'toBeFocused', | |
'toBeHidden', | |
'toBeVisible', | |
'toContainText', | |
'toHaveAttribute', | |
'toHaveClass', | |
'toHaveCount', | |
'toHaveCSS', | |
'toHaveId', | |
'toHaveJSProperty', | |
'toBeOK', | |
'toHaveScreenshot', | |
'toHaveText', | |
'toHaveTitle', | |
'toHaveURL', | |
'toHaveValue', | |
]; |
TroyBallinger, 2Fake, revelt, qakos, daenamkim and 3 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request