404 errors during playwright navigation due to missing server redirect?
When I run my playwright tests on my SPA Nuxt application, I keep getting the message:
Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found)
This happens when navigating to a page in the app using Playwright, like localhost:3000/mypage. Note however that the test and the navigation do succeed, but the error is always printed nonetheless.
I assume this has something to do with the server serving the assets? Obviously there is no real
mypage.html
mypage.html
, so the 404 would be warranted, but usually servers are setup to reroute to the root for an SPA.
Is there a setting I can change to remove this error from the tests (that doesn't include just hiding it by hacking the console.log )