Mock the network
Choose what the server replies with, and match each reply to the screen a test needs to reach.
The diagram
A test can answer the app’s request for tasks itself, using page.route. Choose a reply and watch which screen the app shows.
route.fulfill({ status: 200, json: [{ title: 'Pay rent' }, { title: 'Call Mei' }] })
The task list: Pay rent · Call Mei
Match each goal to the reply it needs
SYNTHETIC / TRAINING ONLY. The Daily List app and the people in it are made up, and every number is a teaching figure.
What this shows
Network mocking: a test can make the server answer exactly what it needs, so empty states, errors and slow replies are easy to reach.