Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Exercise the mobile settings drawer in the shell-consistency spec

rcourtman3440923cb0dd
diff --git a/tests/integration/tests/15-settings-shell-consistency.spec.ts b/tests/integration/tests/15-settings-shell-consistency.spec.ts
index ba7edcbafd..55d1f2894a 100644
--- a/tests/integration/tests/15-settings-shell-consistency.spec.ts
+++ b/tests/integration/tests/15-settings-shell-consistency.spec.ts
@@ -89,22 +89,36 @@ test.describe('Settings shell consistency', () => {
test.setTimeout(180_000);
for (const panel of SETTINGS_SHELL_ROUTES) {
- test(`uses the canonical shell on ${panel.route}`, async ({ page }) => {
+ test(`uses the canonical shell on ${panel.route}`, async ({ page, isMobile }) => {
await page.goto(panel.route, { waitUntil: 'domcontentloaded' });
await page.waitForURL(/\/settings/, { timeout: 15_000 });
+ if (isMobile) {
+ // Mobile keeps the settings navigation behind the Settings drawer
+ // trigger instead of a persistent sidebar.
+ await page
+ .getByRole('main')
+ .getByRole('button', { name: 'Settings', exact: true })
+ .first()
+ .click();
+ }
+
const navigation = page.locator('[aria-label="Settings navigation"]');
await expect(navigation, `${panel.route} should keep the shared settings navigation`).toBeVisible();
const searchInput = page.getByPlaceholder('Search settings...');
await expect(searchInput, `${panel.route} should keep the shared settings search`).toBeVisible();
+
const pageHeading = page.getByRole('heading', { level: 1, name: panel.title });
await expect(pageHeading, `${panel.route} should render the canonical page-shell heading`).toBeVisible();
- await expect(
- page.getByText(panel.description, { exact: true }).first(),
- `${panel.route} should render the canonical page-shell description`,
- ).toBeVisible();
+ if (!isMobile) {
+ // Panel descriptions are desktop-only copy (hidden sm:block).
+ await expect(
+ page.getByText(panel.description, { exact: true }).first(),
+ `${panel.route} should render the canonical page-shell description`,
+ ).toBeVisible();
+ }
await expect(
page.locator('h1'),