Open seanmturley opened 1 year ago
Added notes to the OP to describe the options of testing at the layout level (and rendering Outlets), plus the need to mock API requests.
This is quite involved, and more research is required to determine the best way forward.
I've abandoned local changes for now as nothing much was achieved in implementing the tests, and I want to move onto new features. This task will be set aside to revisit later.
Description
As far as I can see, testing the ErrorPage component requires testing and rendering the full App with specific URLs that will generate different types of errors. Unfortunately, App renders a router (the router, in fact), so when it is rendered with setupWithRouting or the now removed setupWithUrl testing utility functions the following error occurs:
"You cannot render a inside another . You should never have more than one in your app."
The same issue is true for testing the LoadingOverlay, which is rendered by the MainLayout.
Questions