Files
kandev/apps/web/e2e/tests/task/mobile-external-link-menu.spec.ts
T
José Almeida 4eae00964d feat: move integration links into task menus (#1644)
* feat: move integration links into task menus

* fix: address integration link review feedback

* fix: preserve archived task title when linking

* fix: address integration link review issues

* fix: remove ignored swimlane availability prop
2026-07-09 23:43:35 +01:00

50 lines
1.9 KiB
TypeScript

import { test, expect } from "../../fixtures/test-base";
import { SessionPage } from "../../pages/session-page";
test.describe("Mobile sidebar — external link menu", () => {
test("shows enabled integration link actions in the task switcher sheet", async ({
testPage,
apiClient,
seedData,
}) => {
await apiClient.setJiraConfig({
siteUrl: "https://acme.atlassian.net",
email: "alice@example.com",
secret: "api-token-value",
});
await apiClient.setLinearConfig({ secret: "lin_api_xxx" });
await apiClient.setSentryConfig({ secret: "sntrys_xxx" });
await Promise.all([
apiClient.waitForIntegrationAuthHealthy("jira"),
apiClient.waitForIntegrationAuthHealthy("linear"),
apiClient.waitForIntegrationAuthHealthy("sentry"),
]);
const task = await apiClient.seedTask(seedData.workspaceId, "Mobile external link task", {
workflow_id: seedData.workflowId,
workflow_step_id: seedData.startStepId,
});
await testPage.goto(`/t/${task.task_id}`);
const session = new SessionPage(testPage);
await session.waitForLoad();
await testPage.getByTestId("mobile-session-menu").click();
const sheet = testPage.getByRole("dialog");
const taskRow = sheet.locator('[role="button"]').filter({
hasText: "Mobile external link task",
});
await expect(taskRow).toBeVisible({ timeout: 10_000 });
await taskRow.getByRole("button", { name: "Task actions" }).click();
const linkTrigger = testPage.getByRole("menuitem", { name: /^Link$/ });
await expect(linkTrigger).toBeVisible();
await linkTrigger.focus();
await testPage.keyboard.press("ArrowRight");
await expect(testPage.getByRole("menuitem", { name: "Jira Ticket" })).toBeVisible();
await expect(testPage.getByRole("menuitem", { name: "Linear Issue" })).toBeVisible();
await expect(testPage.getByRole("menuitem", { name: "Sentry Issue" })).toBeVisible();
});
});