mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 02:25:56 +00:00
test(web): verify compact settings headings and canonical routes
Fresh multi-tenant browser runs reproduced desktop-title expectations on mobile organization panels. Match the compact navigation labels, update the server-updates title, and assert canonical URLs including the legacy AI route redirect. All 33 settings-shell checks pass across Chromium, mobile Chrome and mobile Safari; production presentation policy is unchanged. Change-source: pulse-maintainer
This commit is contained in:
@@ -21,18 +21,21 @@ const SETTINGS_SHELL_ROUTES = [
|
|||||||
{
|
{
|
||||||
route: '/settings/organization',
|
route: '/settings/organization',
|
||||||
title: 'Organization Overview',
|
title: 'Organization Overview',
|
||||||
|
mobileTitle: 'Overview',
|
||||||
description: 'Review organization metadata, membership footprint, and ownership.',
|
description: 'Review organization metadata, membership footprint, and ownership.',
|
||||||
requiresMultiTenant: true,
|
requiresMultiTenant: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
route: '/settings/organization/access',
|
route: '/settings/organization/access',
|
||||||
title: 'Organization Access',
|
title: 'Organization Access',
|
||||||
|
mobileTitle: 'Access',
|
||||||
description: 'Manage organization invitations, member roles, and ownership transfers.',
|
description: 'Manage organization invitations, member roles, and ownership transfers.',
|
||||||
requiresMultiTenant: true,
|
requiresMultiTenant: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
route: '/settings/organization/billing',
|
route: '/settings/organization/billing',
|
||||||
title: 'Billing & Usage',
|
title: 'Billing & Usage',
|
||||||
|
mobileTitle: 'Billing',
|
||||||
description:
|
description:
|
||||||
'Review your organization plan, applicable usage policies, and subscription status for paid access.',
|
'Review your organization plan, applicable usage policies, and subscription status for paid access.',
|
||||||
requiresMultiTenant: true,
|
requiresMultiTenant: true,
|
||||||
@@ -50,13 +53,14 @@ const SETTINGS_SHELL_ROUTES = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
route: '/settings/system-ai',
|
route: '/settings/system-ai',
|
||||||
|
canonicalRoute: '/settings/pulse-intelligence/provider',
|
||||||
title: 'Provider & Models',
|
title: 'Provider & Models',
|
||||||
description:
|
description:
|
||||||
'Configure providers, default models, provider health, budget, and usage for Pulse Intelligence.',
|
'Configure providers, default models, provider health, budget, and usage for Pulse Intelligence.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
route: '/settings/system-updates',
|
route: '/settings/system-updates',
|
||||||
title: 'Updates',
|
title: 'Pulse server updates',
|
||||||
description:
|
description:
|
||||||
'Manage Pulse server runtime version checks, update channels, and automatic updates. Agent updates stay under Infrastructure.',
|
'Manage Pulse server runtime version checks, update channels, and automatic updates. Agent updates stay under Infrastructure.',
|
||||||
},
|
},
|
||||||
@@ -144,8 +148,13 @@ test.describe('Settings shell consistency', () => {
|
|||||||
await expect(navigation).toBeHidden();
|
await expect(navigation).toBeHidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
const pageHeading = page.getByRole('heading', { level: 1, name: panel.title });
|
// The compact mobile header uses the navigation label, not the
|
||||||
|
// desktop page title (SettingsPageShell + settingsNavCatalog).
|
||||||
|
const title = isMobile && 'mobileTitle' in panel ? panel.mobileTitle : panel.title;
|
||||||
|
const pageHeading = page.getByRole('heading', { level: 1, name: title, exact: true });
|
||||||
await expect(pageHeading, `${panel.route} should render the canonical page-shell heading`).toBeVisible();
|
await expect(pageHeading, `${panel.route} should render the canonical page-shell heading`).toBeVisible();
|
||||||
|
const canonicalRoute = 'canonicalRoute' in panel ? panel.canonicalRoute : panel.route;
|
||||||
|
await expect(page).toHaveURL(new RegExp(`${canonicalRoute}$`));
|
||||||
if (!isMobile) {
|
if (!isMobile) {
|
||||||
// Panel descriptions are desktop-only copy (hidden sm:block).
|
// Panel descriptions are desktop-only copy (hidden sm:block).
|
||||||
await expect(
|
await expect(
|
||||||
|
|||||||
Reference in New Issue
Block a user