diff --git a/.changeset/fix-test-route-matching.md b/.changeset/fix-test-route-matching.md index 359fe19164..c8adb6f8d5 100644 --- a/.changeset/fix-test-route-matching.md +++ b/.changeset/fix-test-route-matching.md @@ -2,4 +2,4 @@ '@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 `` with the given path, enabling `useParams()` to extract route parameters from the URL. When `mountPath` is set and `initialRouteEntries` is not, the initial route entry defaults to the mount path. This is useful for testing page components that depend on URL parameters, such as entity pages that use `useRouteRefParams`. +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 `` 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`.