Files
kandev/apps/web/e2e/tests/integrations/mobile-github-workspace-settings.spec.ts
T
2026-07-21 19:24:02 +01:00

38 lines
1.4 KiB
TypeScript

import { test, expect } from "../../fixtures/test-base";
test.describe("GitHub workspace settings on mobile", () => {
test("explains repository scope below issue watches without requiring hover", async ({
testPage,
seedData,
}) => {
await testPage.goto(`/settings/workspace/${seedData.workspaceId}/integrations/github`);
const issueWatchesHeading = testPage.getByRole("heading", { name: "Issue Watches" });
const repositoryScopeHeading = testPage.getByRole("heading", {
name: "Repository Scope",
exact: true,
});
const scopeDescription = testPage.getByText(
"Limits GitHub pull requests and issues shown or imported in this workspace.",
{ exact: true },
);
await expect(scopeDescription).toBeVisible();
const scopeHelpButton = testPage.getByRole("button", { name: "Explain repository scope" });
await expect(scopeHelpButton).toBeVisible();
const [issueWatchesBox, repositoryScopeBox] = await Promise.all([
issueWatchesHeading.boundingBox(),
repositoryScopeHeading.boundingBox(),
]);
expect(issueWatchesBox).not.toBeNull();
expect(repositoryScopeBox).not.toBeNull();
expect(repositoryScopeBox!.y).toBeGreaterThan(issueWatchesBox!.y);
await scopeHelpButton.click();
await expect(testPage.getByRole("dialog", { name: "Repository Scope" })).toContainText(
"including My GitHub results and review and issue watches",
);
});
});