Summary
Add an e2e test for anvil-cmg that verifies filter state is preserved across navigation flows. This covers a regression where moving providers inside the ErrorBoundary caused state loss during route transitions (see #4783, #4787).
Test flow
- Navigate to the Datasets page
- Select two filters from different categories
- Verify the URL contains the correct filter params and the filter tags display
- Navigate to a dataset detail page
- Return back to the Datasets page
- Verify the URL still contains the correct filter params and the filter tags still display
- Navigate to the Export/Explore page (via the Export button)
- Verify the URL is correct
- In the side panel, under "Current Query", verify both filter facet names and their selected terms render
Context
Recent commits (#4783, #4787) moved ExploreStateProvider inside the ErrorBoundary to prevent crash loops, but this caused filter state to be lost on navigation. The root cause was the dynamic Main component (derived from Component.Main) changing identity across routes, causing React to unmount and remount everything inside it — including the state providers.
This e2e test ensures the filter-URL-navigation flow remains stable.
Summary
Add an e2e test for anvil-cmg that verifies filter state is preserved across navigation flows. This covers a regression where moving providers inside the ErrorBoundary caused state loss during route transitions (see #4783, #4787).
Test flow
Context
Recent commits (#4783, #4787) moved
ExploreStateProviderinside theErrorBoundaryto prevent crash loops, but this caused filter state to be lost on navigation. The root cause was the dynamicMaincomponent (derived fromComponent.Main) changing identity across routes, causing React to unmount and remount everything inside it — including the state providers.This e2e test ensures the filter-URL-navigation flow remains stable.