Writing end-to-end tests for Next.js apps