evOo-local/apps/web/e2e/sidebar-nav.spec.ts
Ingo Wagner cce793151e fix(ui): remove Integrations button from sidebar, add E2E tests
- Remove 'Integrationen' button from sidebar (Shell.tsx)
- Fix auth heading text: 'Create your Rakazo' → 'Create your EvOo'
- Fix completeOnboarding helper: handle setup progress, dismiss overlays
- Fix vite proxy CORS: use proxyRes handler instead of headers option
- Add local provider fallback in modelSetup
- Add 4 new E2E tests (all passing):
  - sidebar-integrations-removed: Integrations button not in sidebar
  - sidebar-nav: expected nav items present, no Integrations
  - message-send: composer interactive, message appears
  - onboarding-complete: full onboarding flow works
- Add playwright config: PLAYWRIGHT_NO_SERVER support
2026-09-22 15:46:05 +00:00

55 lines
2.1 KiB
TypeScript

/**
* E2E: Sidebar navigation elements.
*
* Verifies the expected sidebar sections appear and that Integrations is gone.
*/
import { expect, test } from "@playwright/test";
import { captureScreenshot, completeOnboarding, signup } from "./helpers";
test.describe.configure({ mode: "serial" });
test("sidebar has expected navigation items and no integrations", async ({ page }) => {
const testInfo = test.info();
const stamp = Date.now();
await signup(page, `snnav-${stamp}@rakazo.test`, "password12", "SnNav");
await completeOnboarding(page);
await expect(page.getByText("Chief").first()).toBeVisible();
const sidebar = page.locator("aside").first();
await captureScreenshot(page, testInfo, "sidebar-nav-before");
// Actual sidebar structure (verified by snapshot):
// - button "Activity" (top action)
// - textbox "Search" (search input)
// - button "Heute" (today)
// - text "Unterhaltungen" (conversations section header)
// - button "Live Trading"
// - NO "Integration(en)" button or text
// Search: it's a textbox, not a button
const searchInput = sidebar.locator('input[placeholder="Search"], textbox[name="Search"]');
await expect(searchInput).toBeVisible({ timeout: 5000 });
// "Heute" (Today)
const todayBtn = sidebar.getByRole("button", { name: "Heute" });
await expect(todayBtn).toBeVisible({ timeout: 5000 });
// "Unterhaltungen" is plain text, not a button
const conversationsText = sidebar.getByText("Unterhaltungen");
await expect(conversationsText).toBeVisible({ timeout: 5000 });
// "Live Trading"
const liveTradingBtn = sidebar.getByRole("button", { name: "Live Trading" });
await expect(liveTradingBtn).toBeVisible({ timeout: 5000 });
// No "Integration(en)" button
const integrationBtn = sidebar.getByRole("button", { name: /Integration(en)?/i });
await expect(integrationBtn).toHaveCount(0, { timeout: 5000 });
// No "Integration(en)" text anywhere in sidebar
const integrationText = sidebar.getByText(/Integration(en)?/i);
await expect(integrationText).toHaveCount(0, { timeout: 5000 });
await captureScreenshot(page, testInfo, "sidebar-nav-after");
});