evOo-local/apps/web/e2e/graphql-integrations.spec.ts
Cursor Agent 2f2f0eb21e Move integrations and live trading into settings navigation
Integrations and Live Trading no longer compete as sidebar peers with
the account entry. Settings opens from a dedicated sidebar control;
integrations live in the settings nav, and Live Trading is a discover
banner above the account block in General.

Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
2026-09-21 17:10:17 +00:00

49 lines
2.6 KiB
TypeScript

import { expect, test } from "@playwright/test";
import { captureScreenshot, completeOnboarding, openIntegrations, signup } from "./helpers";
test("advanced GraphQL install shows Add GraphQL in MCP, OpenAPI, GraphQL, Executor, Treg order", async ({
page,
}, testInfo) => {
const stamp = Date.now();
await signup(page, `graphql-source-${stamp}@rakazo.test`, "password12", `GraphQL ${stamp}`);
await completeOnboarding(page);
await openIntegrations(page);
await expect(page.getByPlaceholder("Search apps")).toBeVisible();
await expect(page.getByRole("button", { name: "Add GraphQL", exact: true })).toBeHidden();
const advanced = page.getByTestId("integrations-advanced");
await advanced.evaluate((element) => {
(element as HTMLDetailsElement).open = true;
});
await expect(page.getByRole("button", { name: "Manage MCP servers", exact: true })).toBeVisible();
await expect(page.getByRole("button", { name: "Add MCP server", exact: true })).toBeVisible();
await expect(page.getByRole("button", { name: "Add OpenAPI", exact: true })).toBeVisible();
await expect(page.getByRole("button", { name: "Add GraphQL", exact: true })).toBeVisible();
await expect(page.getByRole("button", { name: "Add Executor", exact: true })).toBeVisible();
await expect(page.getByRole("button", { name: "Add Treg", exact: true })).toBeVisible();
await expect(page.getByRole("button", { name: "MCP servers", exact: true })).toBeHidden();
// Catalog Search (when enabled) lives outside this group and must not affect add order.
const advancedActions = advanced.getByTestId("integrations-advanced-add").locator("button");
await expect(advancedActions).toHaveCount(5);
await expect(advancedActions.nth(0)).toHaveText("Add MCP server");
await expect(advancedActions.nth(1)).toHaveText("Add OpenAPI");
await expect(advancedActions.nth(2)).toHaveText("Add GraphQL");
await expect(advancedActions.nth(3)).toHaveText("Add Executor");
await expect(advancedActions.nth(4)).toHaveText("Add Treg");
await captureScreenshot(page, testInfo, "01-graphql-advanced-order");
await page.getByRole("button", { name: "Add GraphQL", exact: true }).click();
await page.getByPlaceholder("Display name").fill("Browser GraphQL");
await page
.getByPlaceholder("https://example.com/graphql")
.fill("https://graphql.example.test/graphql");
await page.getByRole("button", { name: "Verify and add", exact: true }).click();
await expect(
page.getByText(/GRAPHQL · https:\/\/graphql\.example\.test\/graphql · no auth/),
).toBeVisible();
await captureScreenshot(page, testInfo, "02-graphql-installed");
});