IKivan-kozenko -aqa
Try yourself as a QA tester
Back to topic

Quiz

Visual comparisons

Check yourself

  1. 1.You run npx playwright test and a visual test fails with: 'snapshot doesn't exist, writing actual'. What should you do?
  2. 2.Visual tests fail intermittently on CI because the order list shows different timestamps on each run. What's the best fix?
  3. 3.What is the difference between expect(page).toHaveScreenshot() and expect(locator).toHaveScreenshot()?
  4. 4.Where does Playwright store generated screenshot reference files by default?
  5. 5.You intentionally updated the checkout page design. How do you update the visual references so tests stop failing?
  6. 6.What does maxDiffPixels: 100 do when passed to toHaveScreenshot()?
  7. 7.A test captures a screenshot named dashboard.png. What does the actual filename on disk look like on a macOS machine running Chromium?
  8. 8.You want to hide a live chat widget globally across all visual tests without adding a mask option to every individual assertion. What is the recommended approach?