Playwright · Senior · Question 75 of 77
When is checking the network layer in E2E tests better than checking the UI?
- 1When the effect is invisible, like an analytics event
- 2Never, because tests must check only what users see
- 3Always, because the UI is less important than data
Show the answer
Correct answer: When the effect is invisible, like an analytics event
Explanation
Some behaviour, such as tracking calls or retries, has no visible result. Asserting on requests covers it.