eslint-plugin-playwright
eslint-plugin-playwright copied to clipboard
Feature request: check page and locator actions for `missing-playwright-await` rule
trafficstars
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:
https://github.com/playwright-community/eslint-plugin-playwright/blob/f3cfc99f4eaaf73b9936a80f17be95668ac2efc1/src/rules/missing-playwright-await.ts#L11-L58
just to add 2p, for example, currently, this missing page await is not flagged up:
test('has title', async ({ page }) => {
page.goto('https://playwright.dev/'); // await is missing!
// ^^^
// Expect a title "to contain" a substring.
await expect(page).toHaveTitle(/Playwright/);
});