Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -1,4 +1,4 @@
import { expect, type Page, test } from "./utils/test";
import { expect, type Locator, type Page, test } from "./utils/test";
import { getTenantCredentials, loginAsTenantUser, tenantSettingsAccountPath, tenantSettingsProfilePath, tenantSettingsSubscriptionPath } from "./utils/auth";
import { expectNoCriticalA11yViolations } from "./utils/axe";
import { compactMobileViewport, expectNoHorizontalOverflow, narrowMobileViewport } from "./utils/mobile";
@@ -10,7 +10,7 @@ const dashboardPath = process.env.E2E_TENANT_DASHBOARD_PATH ?? "/app/dashboard";
const pluginSettingsPath = process.env.E2E_PLUGIN_SETTINGS_PATH;
const workflowBuilderPath = process.env.E2E_WORKFLOW_BUILDER_PATH;
const workflowRunManualPath = process.env.E2E_WORKFLOW_RUN_MANUAL_PATH;
const mobileSidebarSelector = '[data-ui-id="ui.surface.app.sidebar.mobile"]';
const mobileSidebarSelector = '[data-ui-id="ui.surface.app.sidebar"]';
type MobileShellRouteCheck = {
name: string;
@@ -22,6 +22,21 @@ function requireMobileShellInputs(reason: string): void {
skipOrFailWhenE2eInputsMissing(["E2E_TENANT_EMAIL", "E2E_TENANT_PASSWORD"], reason);
}
async function isMobileSidebarOpen(sidebar: Locator): Promise<boolean> {
return sidebar.evaluate((element) => element.classList.contains("max-md:translate-x-0"));
}
async function expectMobileSidebarOpen(sidebar: Locator): Promise<void> {
await expect(sidebar).toBeVisible();
await expect(sidebar).toHaveClass(/(?:^|\s)max-md:translate-x-0(?:\s|$)/u);
await expect(sidebar).not.toHaveAttribute("aria-hidden", "true");
}
async function expectMobileSidebarClosed(sidebar: Locator): Promise<void> {
await expect(sidebar).toHaveClass(/(?:^|\s)max-md:-translate-x-full(?:\s|$)/u);
await expect(sidebar).toHaveAttribute("aria-hidden", "true");
}
async function expectFocusInsideMobileSidebar(page: Page, stepName: string): Promise<void> {
await expect
.poll(
@@ -66,15 +81,15 @@ async function expectMobileShellControlsUsable(page: Page): Promise<void> {
// click can race that close and leave the drawer shut. Retry-open, only
// clicking while it's closed, so the toggle never clobbers an open drawer.
await expect(async () => {
if (!(await mobileSidebar.isVisible())) {
if (!(await isMobileSidebarOpen(mobileSidebar))) {
await sidebarTrigger.click();
}
await expect(mobileSidebar).toBeVisible({ timeout: 2000 });
await expectMobileSidebarOpen(mobileSidebar);
}).toPass({ timeout: 15000 });
await expect(mobileSidebar.locator('[data-ui-id="ui.nav.app.dashboard"]').first()).toBeVisible();
await expect(mobileSidebar.locator('[data-ui-id="ui.nav.app.settings"]').first()).toBeVisible();
await page.keyboard.press("Escape");
await expect(mobileSidebar).toBeHidden();
await expectMobileSidebarClosed(mobileSidebar);
}
async function expectAuthenticatedMobileShellRoute(page: Page, routeCheck: MobileShellRouteCheck): Promise<void> {
@@ -130,14 +145,14 @@ test.describe("authenticated mobile shell flow", () => {
await expect(page).toHaveURL(new RegExp(`${escapeRegExp(dashboardPath)}(?:[?#].*)?$`, "u"));
await expectNoHorizontalOverflow(page);
const mobileSidebar = page.locator('[data-ui-id="ui.surface.app.sidebar.mobile"], [data-mobile="true"]');
await expect(mobileSidebar).toBeHidden();
const mobileSidebar = page.locator(mobileSidebarSelector);
await expectMobileSidebarClosed(mobileSidebar);
await page.locator('[data-ui-id="ui.action.shell.sidebarTrigger"]').click();
await expect(mobileSidebar).toBeVisible();
await expectMobileSidebarOpen(mobileSidebar);
await expect(mobileSidebar).toHaveAttribute("role", "dialog");
await expect(mobileSidebar).toHaveAttribute("aria-modal", "true");
await expect(mobileSidebar).toHaveAccessibleName(/.+/u);
await expect(mobileSidebar).toHaveAccessibleDescription(/.+/u);
const settingsLink = mobileSidebar.locator('[data-ui-id="ui.nav.app.settings"]').first();
await expect(settingsLink).toBeVisible();
@@ -145,7 +160,7 @@ test.describe("authenticated mobile shell flow", () => {
const settingsProfilePath = tenantSettingsProfilePath(dashboardPath);
await expect(page).toHaveURL(new RegExp(`${escapeRegExp(settingsProfilePath)}(?:[?#].*)?$`, "u"));
await expect(mobileSidebar).toBeHidden();
await expectMobileSidebarClosed(mobileSidebar);
await expectNoHorizontalOverflow(page);
});
@@ -157,16 +172,16 @@ test.describe("authenticated mobile shell flow", () => {
await expectNoHorizontalOverflow(page);
const trigger = page.locator('[data-ui-id="ui.action.shell.sidebarTrigger"]');
const mobileSidebar = page.locator('[data-ui-id="ui.surface.app.sidebar.mobile"], [data-mobile="true"]');
await expect(mobileSidebar).toBeHidden();
const mobileSidebar = page.locator(mobileSidebarSelector);
await expectMobileSidebarClosed(mobileSidebar);
await trigger.click();
await expect(mobileSidebar).toBeVisible();
await expectMobileSidebarOpen(mobileSidebar);
await expect(mobileSidebar.locator('[data-ui-id="ui.nav.app.dashboard"]').first()).toBeVisible();
await expect(mobileSidebar.locator('[data-ui-id="ui.nav.app.settings"]').first()).toBeVisible();
await page.keyboard.press("Escape");
await expect(mobileSidebar).toBeHidden();
await expectMobileSidebarClosed(mobileSidebar);
await expect(trigger).toBeVisible();
await expect(page).toHaveURL(new RegExp(`${escapeRegExp(dashboardPath)}(?:[?#].*)?$`, "u"));
await expectNoHorizontalOverflow(page);
@@ -181,13 +196,13 @@ test.describe("authenticated mobile shell flow", () => {
const trigger = page.locator('[data-ui-id="ui.action.shell.sidebarTrigger"]');
const mobileSidebar = page.locator(mobileSidebarSelector);
await expect(mobileSidebar).toBeHidden();
await expectMobileSidebarClosed(mobileSidebar);
await trigger.focus();
await expect(trigger).toBeFocused();
await page.keyboard.press("Enter");
await expect(mobileSidebar).toBeVisible();
await expectMobileSidebarOpen(mobileSidebar);
await expectFocusInsideMobileSidebar(page, "opening");
const focusableItemCount = await countMobileSidebarFocusableItems(page);
@@ -199,7 +214,7 @@ test.describe("authenticated mobile shell flow", () => {
}
await page.keyboard.press("Escape");
await expect(mobileSidebar).toBeHidden();
await expectMobileSidebarClosed(mobileSidebar);
await expect(trigger).toBeVisible();
await expect(trigger).toBeFocused();
await expect(page).toHaveURL(new RegExp(`${escapeRegExp(dashboardPath)}(?:[?#].*)?$`, "u"));
@@ -213,17 +228,17 @@ test.describe("authenticated mobile shell flow", () => {
await expect(page).toHaveURL(new RegExp(`${escapeRegExp(dashboardPath)}(?:[?#].*)?$`, "u"));
await expectNoHorizontalOverflow(page);
const mobileSidebar = page.locator('[data-mobile="true"]');
await expect(mobileSidebar).toBeHidden();
const mobileSidebar = page.locator(mobileSidebarSelector);
await expectMobileSidebarClosed(mobileSidebar);
await page.keyboard.press("Control+e");
await expect(mobileSidebar).toBeVisible();
await expectMobileSidebarOpen(mobileSidebar);
await expect(mobileSidebar.locator('[data-ui-id="ui.nav.app.dashboard"]').first()).toBeVisible();
await expect(mobileSidebar.locator('[data-ui-id="ui.nav.app.settings"]').first()).toBeVisible();
await expect(page).toHaveURL(new RegExp(`${escapeRegExp(dashboardPath)}(?:[?#].*)?$`, "u"));
await page.keyboard.press("Control+e");
await expect(mobileSidebar).toBeHidden();
await expectMobileSidebarClosed(mobileSidebar);
await expect(page).toHaveURL(new RegExp(`${escapeRegExp(dashboardPath)}(?:[?#].*)?$`, "u"));
await expectNoHorizontalOverflow(page);
});
@@ -239,11 +254,12 @@ test.describe("authenticated mobile shell flow", () => {
const profileTarget = page.locator('[data-ui-id="ui.action.shell.profile"]').first();
await expect(profileTarget).toBeVisible();
await expect(profileTarget.locator("xpath=ancestor::a[1]")).toHaveAttribute("href", /settings\/profile/u);
await expect(profileTarget).toHaveAttribute("role", "menuitem");
const signOut = page.locator('[data-ui-id="ui.action.shell.signOut"]').first();
await expect(signOut).toBeVisible();
await expect(signOut.locator("xpath=ancestor::form[1]")).toHaveAttribute("action", /\/logout$/u);
await expect(signOut).toHaveAttribute("role", "menuitem");
await expect(signOut.locator("xpath=ancestor::form[1]")).toHaveCount(0);
await expectNoCriticalA11yViolations(page);
await expectNoHorizontalOverflow(page);
});
@@ -276,7 +292,7 @@ test.describe("authenticated mobile shell flow", () => {
await expect(page).toHaveURL(new RegExp(`${escapeRegExp(dashboardPath)}(?:[?#].*)?$`, "u"));
await expectNoHorizontalOverflow(page);
const trigger = page.locator('[data-ui-id="ui.action.shell.search"]');
const trigger = page.locator('[data-ui-id="ui.action.shell.searchMobile"]');
await trigger.click();
const palette = page.locator('[data-ui-id="ui.surface.commandPalette.portal"]');
@@ -302,11 +318,11 @@ test.describe("authenticated mobile shell flow", () => {
await expect(page).toHaveURL(new RegExp(`${escapeRegExp(dashboardPath)}(?:[?#].*)?$`, "u"));
await expectNoHorizontalOverflow(page);
await page.locator('[data-ui-id="ui.action.shell.search"]').click();
await page.locator('[data-ui-id="ui.action.shell.searchMobile"]').click();
const palette = page.locator('[data-ui-id="ui.surface.commandPalette.portal"]');
const searchInput = page.locator('[data-ui-id="ui.surface.commandPalette.search"]');
const rows = page.locator('[data-ui-id="ui.surface.commandPalette.row"]');
const rows = page.locator('[data-ui-id^="ui.surface.commandPalette.action."], [data-ui-id^="ui.surface.commandPalette.result."]');
await expect(palette).toBeVisible();
await expect(searchInput).toBeFocused();
@@ -331,7 +347,7 @@ test.describe("authenticated mobile shell flow", () => {
const palette = page.locator('[data-ui-id="ui.surface.commandPalette.portal"]');
const searchInput = page.locator('[data-ui-id="ui.surface.commandPalette.search"]');
const rows = page.locator('[data-ui-id="ui.surface.commandPalette.row"]');
const rows = page.locator('[data-ui-id^="ui.surface.commandPalette.action."], [data-ui-id^="ui.surface.commandPalette.result."]');
await expect(palette).toBeVisible();
await expect(searchInput).toBeVisible();
await expect(searchInput).toBeFocused();
@@ -374,18 +390,18 @@ test.describe("authenticated mobile shell flow", () => {
await expectNoHorizontalOverflow(page);
await expectNoCriticalA11yViolations(page);
const mobileSidebar = page.locator('[data-mobile="true"]');
await expect(mobileSidebar).toBeHidden();
const mobileSidebar = page.locator(mobileSidebarSelector);
await expectMobileSidebarClosed(mobileSidebar);
await page.locator('[data-ui-id="ui.action.shell.sidebarTrigger"]').click();
await expect(mobileSidebar).toBeVisible();
await expectMobileSidebarOpen(mobileSidebar);
const dashboardLink = mobileSidebar.locator('[data-ui-id="ui.nav.app.dashboard"]').first();
await expect(dashboardLink).toBeVisible();
await dashboardLink.click();
await expect(page).toHaveURL(new RegExp(`${escapeRegExp(dashboardPath)}(?:[?#].*)?$`, "u"));
await expect(mobileSidebar).toBeHidden();
await expectMobileSidebarClosed(mobileSidebar);
await expectNoHorizontalOverflow(page);
});
@@ -401,16 +417,16 @@ test.describe("authenticated mobile shell flow", () => {
await expect(form).toBeVisible();
await expect(form.locator('input[name="action"][value="profile"]')).toHaveCount(1);
const email = form.locator('[data-ui-id="ui.settings.profile.email"]').first();
const email = page.locator('[data-ui-id="ui.settings.profile.email"]').first();
await expect(email).toBeVisible();
await expect(email).toBeDisabled();
await expect(email).not.toHaveValue("");
await expect(form.locator('[data-ui-id="ui.settings.profile.firstName"]').first()).toBeVisible();
await expect(form.locator('[data-ui-id="ui.settings.profile.lastName"]').first()).toBeVisible();
await expect(form.locator('[data-ui-id="ui.settings.profile.save"]').first()).toBeVisible();
await expect(page.locator('[data-ui-id="ui.settings.profile.session.panel"]').first()).toBeVisible();
await expect(page.locator('[data-ui-id="ui.settings.profile.danger.delete"]').first()).toBeVisible();
await expect(form.locator('[data-ui-id="ui.settings.profile.basicInfo.save"]').first()).toBeVisible();
await expect(page.locator('[data-ui-id="ui.settings.profile.password.open"]').first()).toBeVisible();
await expect(page.locator('[data-ui-id="ui.settings.profile.security.manage"]').first()).toBeVisible();
await expectNoHorizontalOverflow(page);
});
@@ -420,7 +436,11 @@ test.describe("authenticated mobile shell flow", () => {
const routeChecks = [
{ name: "account settings", path: tenantSettingsAccountPath(dashboardPath) },
{ name: "profile settings", path: tenantSettingsProfilePath(dashboardPath) },
{ name: "subscription settings", path: tenantSettingsSubscriptionPath(dashboardPath), readySelector: '[data-ui-id="ui.subscription.page"]' },
{
name: "subscription settings",
path: tenantSettingsSubscriptionPath(dashboardPath),
readySelector: '[data-ui-id^="ui.billing.selfServiceSubscription."]',
},
...(pluginSettingsPath ? [{ name: "plugin settings", path: pluginSettingsPath }] : []),
...(workflowBuilderPath ? [{ name: "workflow builder", path: workflowBuilderPath }] : []),
];
@@ -449,12 +469,12 @@ test.describe("authenticated mobile shell flow", () => {
await expectNoHorizontalOverflow(page);
await sidebarTrigger.click();
await expect(mobileSidebar).toBeVisible();
await expectMobileSidebarOpen(mobileSidebar);
await expect(mobileSidebar.locator('[data-ui-id="ui.nav.app.dashboard"]').first()).toBeVisible();
await expect(mobileSidebar.locator('[data-ui-id="ui.nav.app.settings"]').first()).toBeVisible();
await expectNoHorizontalOverflow(page);
await page.keyboard.press("Escape");
await expect(mobileSidebar).toBeHidden();
await expectMobileSidebarClosed(mobileSidebar);
await moreTrigger.click();
await expect(page.locator('[data-ui-id="ui.action.shell.signOut"]').first()).toBeVisible();
@@ -577,10 +597,10 @@ test.describe("authenticated mobile shell browser history slice", () => {
const settingsProfilePath = tenantSettingsProfilePath(dashboardPath);
const mobileSidebar = page.locator(mobileSidebarSelector);
await page.locator('[data-ui-id="ui.action.shell.sidebarTrigger"]').click();
await expect(mobileSidebar).toBeVisible();
await expectMobileSidebarOpen(mobileSidebar);
await mobileSidebar.locator('[data-ui-id="ui.nav.app.settings"]').first().click();
await expect(page).toHaveURL(pathPattern(settingsProfilePath));
await expect(mobileSidebar).toBeHidden();
await expectMobileSidebarClosed(mobileSidebar);
await expectMobileShellControlsUsable(page);
await page.goBack({ waitUntil: "domcontentloaded" });
@@ -602,11 +622,13 @@ test.describe("authenticated mobile shell browser history slice", () => {
const originRoute = { name: "profile settings", path: settingsProfilePath, readySelector: '[data-ui-id="ui.settings.profile.page"]' };
const crossSurfaceRoutes = [
{ name: "subscription settings", path: tenantSettingsSubscriptionPath(dashboardPath), readySelector: '[data-ui-id="ui.subscription.page"]' },
{
name: "subscription settings",
path: tenantSettingsSubscriptionPath(dashboardPath),
readySelector: '[data-ui-id^="ui.billing.selfServiceSubscription."]',
},
...(pluginSettingsPath ? [{ name: "plugin settings", path: pluginSettingsPath, readySelector: '[data-ui-id="ui.plugins.page"]' }] : []),
...(workflowBuilderPath
? [{ name: "workflow builder", path: workflowBuilderPath, readySelector: '[data-ui-id="ui.workflows.builder.canvas"]' }]
: []),
...(workflowBuilderPath ? [{ name: "workflow builder", path: workflowBuilderPath, readySelector: '[data-ui-id="ui.workflows.builder.canvas"]' }] : []),
...(workflowRunManualPath
? [{ name: "workflow manual run", path: workflowRunManualPath, readySelector: '[data-ui-id="ui.workflows.run.manual.form"]' }]
: []),
@@ -638,12 +660,12 @@ test.describe("authenticated compact mobile shell flow", () => {
const sidebarTrigger = page.locator('[data-ui-id="ui.action.shell.sidebarTrigger"]');
const mobileSidebar = page.locator(mobileSidebarSelector);
await sidebarTrigger.click();
await expect(mobileSidebar).toBeVisible();
await expectMobileSidebarOpen(mobileSidebar);
await expect(mobileSidebar.locator('[data-ui-id="ui.nav.app.dashboard"]').first()).toBeVisible();
await expect(mobileSidebar.locator('[data-ui-id="ui.nav.app.settings"]').first()).toBeVisible();
await expectNoHorizontalOverflow(page);
await page.keyboard.press("Escape");
await expect(mobileSidebar).toBeHidden();
await expectMobileSidebarClosed(mobileSidebar);
await expect(sidebarTrigger).toBeFocused();
await expectNoHorizontalOverflow(page);
@@ -657,14 +679,14 @@ test.describe("authenticated compact mobile shell flow", () => {
await expect(moreTrigger).toBeFocused();
await expectNoHorizontalOverflow(page);
const searchTrigger = page.locator('[data-ui-id="ui.action.shell.search"]');
const searchTrigger = page.locator('[data-ui-id="ui.action.shell.searchMobile"]');
await searchTrigger.click();
const palette = page.locator('[data-ui-id="ui.surface.commandPalette.portal"]');
const searchInput = page.locator('[data-ui-id="ui.surface.commandPalette.search"]');
await expect(palette).toBeVisible();
await expect(searchInput).toBeFocused();
await searchInput.fill("settings");
await expect(page.locator('[data-ui-id="ui.surface.commandPalette.row"]').first()).toBeVisible();
await expect(page.locator('[data-ui-id^="ui.surface.commandPalette.action."], [data-ui-id^="ui.surface.commandPalette.result."]').first()).toBeVisible();
await expectNoCriticalA11yViolations(page);
await expectNoHorizontalOverflow(page);
await page.keyboard.press("Escape");
@@ -674,23 +696,23 @@ test.describe("authenticated compact mobile shell flow", () => {
const settingsProfilePath = tenantSettingsProfilePath(dashboardPath);
await sidebarTrigger.click();
await expect(mobileSidebar).toBeVisible();
await expectMobileSidebarOpen(mobileSidebar);
await mobileSidebar.locator('[data-ui-id="ui.nav.app.settings"]').first().click();
await expect(page).toHaveURL(pathPattern(settingsProfilePath));
await expect(mobileSidebar).toBeHidden();
await expectMobileSidebarClosed(mobileSidebar);
await expectNoHorizontalOverflow(page);
// Reopening the drawer right after the settings SPA navigation can race the
// closing Sheet's state, dropping the first trigger click. Retry the open
// (only clicking while it is still closed, so we never toggle it back shut).
await expect(async () => {
if (!(await mobileSidebar.isVisible())) {
if (!(await isMobileSidebarOpen(mobileSidebar))) {
await sidebarTrigger.click();
}
await expect(mobileSidebar).toBeVisible({ timeout: 2000 });
await expectMobileSidebarOpen(mobileSidebar);
}).toPass({ timeout: 15000 });
await page.keyboard.press("Escape");
await expect(mobileSidebar).toBeHidden();
await expectMobileSidebarClosed(mobileSidebar);
await expect(sidebarTrigger).toBeFocused();
await expectNoHorizontalOverflow(page);
await expectNoCriticalA11yViolations(page);