I'm replacing the useLocation hook in the exploreLayout component with a prop that is passed in from the parent. Accessing the url of the browser only works on the client side and cannot be tested server side. This change will allow us to check the navigation on the server visually.
How you can test the changes
You can run the playwright e2e tests and will see the explore spec tests for the tabs navigation pass (make sure to test this from a production build and not just from local dev server so you have a server side rendered page).
If you build and serve the CASEI app locally you will now see the tabs highlighting on navigation.
What I am changing
I'm replacing the
useLocation
hook in the exploreLayout component with a prop that is passed in from the parent. Accessing the url of the browser only works on the client side and cannot be tested server side. This change will allow us to check the navigation on the server visually.How you can test the changes
You can run the playwright e2e tests and will see the explore spec tests for the tabs navigation pass (make sure to test this from a production build and not just from local dev server so you have a server side rendered page).
If you build and serve the CASEI app locally you will now see the tabs highlighting on navigation.