Skip to content
RED SAGSkills
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')
})
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions