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

Quiz

Touch events (legacy)

Check yourself

  1. 1.You're testing a mobile swipe widget. You call locator.dispatchEvent('touchstart') without extra arguments, then 'touchmove', then 'touchend', but the widget doesn't respond. What's most likely missing?
  2. 2.Your app uses modern Pointer Events (not legacy Touch Events) for its swipe gesture. You want to test the swipe in a mobile device emulation. What's the simplest approach?
  3. 3.In the pan gesture helper, why does the code call locator.evaluate(target => target.getBoundingClientRect()) at the start?
  4. 4.A pinch-in gesture starts with two touch points far apart and moves them toward each other. How many touch points does each touchmove event in a pinch need?
  5. 5.After dispatching touch events via dispatchEvent, why might the gesture work in a real mobile browser but fail in your test, even though events are firing?
  6. 6.For the touchend event at the end of a pan gesture, what should the touches list contain?
  7. 7.When should you use locator.tap() instead of manually dispatching touch events?
  8. 8.You need to simulate a swipe that starts at the center of a map element and moves 200px to the right. How do you compute the starting clientX coordinate?