eslint-plugin-playwright icon indicating copy to clipboard operation
eslint-plugin-playwright copied to clipboard

ESLint plugin for Playwright

Results 20 eslint-plugin-playwright issues
Sort by recently updated
recently updated
newest added
trafficstars

We're establishing coding practices for our e2e suite before opening it up to the public. Generally, we're looking to *enforce* these code practices wherever possible _and would likely need most...

enhancement
help wanted

It would be great to have a rule to enforce expect.soft assertions. I've found that they've been a great way to isolate failure in tests but find it difficult to...

enhancement

Bad: ```js await page.locator('.hello-world') ``` The code above is wrong because it doesn't do anything. We just await a locator and then throw it away, but that doesn't test anything....

enhancement

See here: https://github.com/microsoft/playwright/issues/9474

Having the following block produce a missing-playwright-await error ![image](https://user-images.githubusercontent.com/87318561/196512808-80dc7581-7dbf-4e11-b77c-d00e7908fe10.png) ``` await Promise.all([ expect(previewLessonPage.relatedContent.title).toBeHidden(), expect(previewLessonPage.relatedContent.items).toHaveCount(0), ]); ``` Those cases should not produce errors considering that we're handling them into a Promise...

I would love to have a new optional rule where I could enforce tests having the new tag configuration, maybe even having including a `tagMustMatch` option (same as in `playwright/valid-title`).

new rule

Example [from the docs](https://playwright.dev/docs/auth#basic-shared-account-in-all-tests): ```ts import { test as setup, expect } from '@playwright/test'; setup('authenticate', async ({ page }) => { // ... }); ``` Expected: no warning Actual: "This...

In order to make tests less flaky, any call to page.waitForResponse should be wrapped in a promise.all of the action which invoked the network response. More here: https://github.com/microsoft/playwright/issues/5470#issuecomment-1285640689

new rule

## 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](https://playwright.dev/docs/api/class-page) or...

enhancement