feat(frontend-plugin-api): add titleRouteRef to PageBlueprint
Add `titleRouteRef` to `PageLayoutProps` so the plugin header title links back to the plugin root. `PageBlueprint` resolves it from `plugin.routes.root` with fallback to `params.routeRef`. - PageLayout swap resolves the title link via a conditional child component that calls `useRouteRef` only when a route ref exists - Header actions get stable React keys via `cloneElement` Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
@@ -23,6 +23,7 @@ test('App should render the welcome page', async ({ page }) => {
|
||||
await expect(enterButton).toBeVisible();
|
||||
await enterButton.click();
|
||||
|
||||
await expect(page.getByRole('link', { name: 'Catalog' })).toBeVisible();
|
||||
const nav = page.getByRole('navigation');
|
||||
await expect(nav.getByRole('link', { name: 'Catalog' })).toBeVisible();
|
||||
await expect(page.getByRole('link', { name: 'APIs' })).toBeVisible();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user