Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
49 lines
1.9 KiB
TypeScript
49 lines
1.9 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 "Today"
|
|
// - text "Talk to your Oos" (conversations section header)
|
|
// - 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 });
|
|
|
|
const todayBtn = sidebar.getByRole("button", { name: "Today", exact: true });
|
|
await expect(todayBtn).toBeVisible({ timeout: 5000 });
|
|
|
|
// "Talk to your Oos" is plain text, not a button
|
|
const conversationsText = sidebar.getByText("Talk to your Oos");
|
|
await expect(conversationsText).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");
|
|
});
|