How to Mock Network Responses
A page that loads its data from an API is hard to test: the API can be slow, down, or return data that changes. The test can answer the API calls itself, with the data it chooses, and check how the page shows it.
A page that loads its data from an API is hard to test: the API can be slow, down, or return data that changes. The test can answer the API calls itself, with the data it chooses, and check how the page shows it.