Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,44 @@
|
||||
import { expect, test } from "./utils/test";
|
||||
import { expectNoCriticalA11yViolations } from "./utils/axe";
|
||||
import { getTenantCredentials, loginAsTenantUser, tenantSettingsPoliciesPath } from "./utils/auth";
|
||||
import { expectNoHorizontalOverflow } from "./utils/mobile";
|
||||
import { escapeRegExp, skipIfUnavailable } from "./utils/navigation";
|
||||
import { skipOrFailWhenE2eInputsMissing } from "./utils/readiness";
|
||||
|
||||
const credentials = getTenantCredentials();
|
||||
const dashboardPath = process.env.E2E_TENANT_DASHBOARD_PATH;
|
||||
const policiesPath = process.env.E2E_TENANT_POLICIES_PATH ?? (dashboardPath ? tenantSettingsPoliciesPath(dashboardPath) : undefined);
|
||||
|
||||
test.describe("tenant governance settings desktop a11y", () => {
|
||||
test.use({ viewport: { width: 1440, height: 900 }, isMobile: false, hasTouch: false });
|
||||
|
||||
test.beforeEach(() => {
|
||||
skipOrFailWhenE2eInputsMissing(
|
||||
["E2E_TENANT_EMAIL", "E2E_TENANT_PASSWORD", "E2E_TENANT_DASHBOARD_PATH"],
|
||||
"Tenant governance settings E2E inputs not configured"
|
||||
);
|
||||
});
|
||||
|
||||
test("renders policy links for tenant governance surfaces without mutations", async ({ page }) => {
|
||||
await loginAsTenantUser(page, credentials!);
|
||||
|
||||
const response = await page.goto(policiesPath!, { waitUntil: "domcontentloaded" });
|
||||
await skipIfUnavailable(page, response, `Tenant policies path ${policiesPath}`);
|
||||
await expect(page).toHaveURL(new RegExp(`${escapeRegExp(policiesPath!)}(?:[?#].*)?$`, "u"));
|
||||
await expect(page.getByRole("heading", { name: /account policies|kontorichtlinien/iu })).toBeVisible();
|
||||
|
||||
for (const path of [
|
||||
"settings/members",
|
||||
"settings/roles-and-permissions",
|
||||
"settings/subscription",
|
||||
"settings/notifications",
|
||||
"settings/logs",
|
||||
"settings/api",
|
||||
]) {
|
||||
await expect(page.locator(`a[href$="${path}"]`).first()).toBeVisible();
|
||||
}
|
||||
|
||||
await expectNoHorizontalOverflow(page);
|
||||
await expectNoCriticalA11yViolations(page);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user