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

Quiz

Clock

Check yourself

  1. 1.You need to test that a countdown timer shows '0 seconds' exactly at the deadline. Which approach is correct?
  2. 2.Which browser APIs does page.clock control when installed?
  3. 3.Your app shows 'Created 2 days ago' for orders. The test passes today but will fail tomorrow because the date changes. What is the correct fix?
  4. 4.What is the difference between page.clock.fastForward() and page.clock.runFor()?
  5. 5.You need to test a debounced search that fires an API request 500ms after the user stops typing. Which clock approach is correct?
  6. 6.You must call page.clock.install() before navigating to the page. Why does the order matter?
  7. 7.What does page.clock.install({ time: new Date('2026-05-14T08:00:00') }) do compared to page.clock.setFixedTime()?
  8. 8.You're testing a progress bar that updates every second via setInterval. You want to verify the bar is at 50% after 5 seconds. Which call correctly advances the clock by 5 seconds?