hard20 pts · first answer countsplaywrightasync
Hidden race in a test
What is wrong with this Playwright test?
test('shows cart count', async ({ page }) => {
await page.getByRole('button', { name: 'Add to cart' }).click()
expect(page.getByTestId('cart-count')).toHaveText('1')
})Discussion 0
Join free to post in the discussion.
Related questions
- A missing awaitAutomation Test Engineer
- Browsers Playwright coversAutomation Test Engineer
- Using the trace viewerAutomation Test Engineer
- Web-first assertionsAutomation Test Engineer
- Speeding up logged-in testsAutomation Test Engineer
- A custom Playwright fixtureAutomation Test Engineer
- Splitting a suite across machinesAutomation Test Engineer
- Tests for several user rolesAutomation Test Engineer