Merge pull request #34317 from backstage/freben/fix-entity-page-test-flake

fix(catalog): fix flaky entity page test
This commit is contained in:
Fredrik Adelöw
2026-05-25 16:00:49 +02:00
committed by GitHub
4 changed files with 104 additions and 78 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/frontend-test-utils': patch
---
Added a `mountPath` option to `renderInTestApp` that controls the route path pattern the test element is rendered at. When set, the element is wrapped in a `<Route>` with the given path, enabling `useParams()` to extract route parameters from the URL. Use together with `initialRouteEntries` to set a concrete URL that matches the pattern. This is useful for testing page components that depend on URL parameters, such as entity pages that use `useRouteRefParams`.