-
- {icon}
- {title}
-
+
+
+ {icon}
+ {title}
+
+ {titleAccessory}
+
{description &&
{description}
}
{action &&
{action}
}
diff --git a/apps/web/e2e/tests/integrations/github-workspace-settings.spec.ts b/apps/web/e2e/tests/integrations/github-workspace-settings.spec.ts
index 3983268789..bca8a9f103 100644
--- a/apps/web/e2e/tests/integrations/github-workspace-settings.spec.ts
+++ b/apps/web/e2e/tests/integrations/github-workspace-settings.spec.ts
@@ -38,6 +38,24 @@ test.describe("GitHub workspace settings", () => {
await testPage.goto(`/settings/workspace/${seedData.workspaceId}/integrations/github`);
await expect(testPage.getByTestId("github-integration-heading")).toBeVisible();
+ const issueWatchesHeading = testPage.getByRole("heading", { name: "Issue Watches" });
+ const repositoryScopeHeading = testPage.getByRole("heading", {
+ name: "Repository Scope",
+ exact: true,
+ });
+ 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 testPage.getByRole("button", { name: "Explain repository scope" }).hover();
+ await expect(testPage.getByRole("tooltip")).toContainText(
+ "Limits the GitHub pull requests and issues Kandev discovers for this workspace",
+ );
+
await testPage.getByTestId("github-scope-mode").click();
await testPage.getByRole("option", { name: "Selected repositories" }).click();
await testPage.getByTestId("github-scope-repos-input").fill("kdlbs/kandev");
diff --git a/apps/web/e2e/tests/integrations/mobile-github-workspace-settings.spec.ts b/apps/web/e2e/tests/integrations/mobile-github-workspace-settings.spec.ts
new file mode 100644
index 0000000000..ac9dbcda3b
--- /dev/null
+++ b/apps/web/e2e/tests/integrations/mobile-github-workspace-settings.spec.ts
@@ -0,0 +1,37 @@
+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",
+ );
+ });
+});