Playwright · Senior · Question 75 of 77

When is checking the network layer in E2E tests better than checking the UI?

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.

Further reading

Problem with a question

Playwright · Senior · question 75

Test yourself

Take the Playwright · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz