mirror of
https://github.com/nexu-io/open-design.git
synced 2026-09-20 06:15:06 +08:00
a338a13aab
* test(e2e): harden coverage and runtime isolation * test(e2e): gate prerelease on full functional suite * test(daemon): enforce prerelease coverage * test(daemon): stabilize full-suite fixtures Generated-By: looper 0.11.8 (runner=fixer, agent=codex) * test(e2e): preserve interaction regression coverage Keep deck navigation subject to Playwright actionability checks and restore the current rail updater/composer stacking witness as an explicit expected failure. Generated-By: looper 0.11.8 (runner=fixer, agent=codex) * fix(ci): close conformance validation gaps Generated-By: looper 0.11.8 (runner=fixer, agent=codex) * test(e2e): restore MCP snippet style guard Restore the browser-computed style witness that was over-deleted when the OAuth flow moved to Integrations, and navigate through the current Settings MCP server entry.\n\nGenerated-By: looper 0.11.8 (runner=fixer, agent=codex) * fix(ci): close directive and job-boundary gaps Compare normalized MUST_FIX directives as sets so identical multi-item rounds remain weak debates, and bound workflow topology assertions to their immediate sibling jobs.\n\nGenerated-By: looper 0.11.8 (runner=fixer, agent=codex)
45 lines
1.7 KiB
TypeScript
45 lines
1.7 KiB
TypeScript
import { expect } from '@playwright/test';
|
|
import type { Page } from '@playwright/test';
|
|
|
|
// The Design Files entry is a plain tab in the workspace tab strip — there is
|
|
// no dropdown to open first, and "active" is carried by aria-selected rather
|
|
// than by the tab's label. These helpers keep their historical names so the
|
|
// many existing call sites read the same.
|
|
export async function openAllProjectFiles(page: Page): Promise<void> {
|
|
const tab = page.getByTestId('design-files-tab');
|
|
await expect(tab).toBeVisible();
|
|
await tab.click();
|
|
await expectAllProjectFilesActive(page);
|
|
}
|
|
|
|
export async function expectAllProjectFilesActive(page: Page): Promise<void> {
|
|
await expect(page.getByTestId('design-files-tab')).toHaveAttribute('aria-selected', 'true');
|
|
}
|
|
|
|
export async function expectAllProjectFilesInactive(page: Page): Promise<void> {
|
|
await expect(page.getByTestId('design-files-tab')).toHaveAttribute('aria-selected', 'false');
|
|
}
|
|
|
|
export async function clickDeckNextSlide(page: Page): Promise<void> {
|
|
await revealDeckNavigation(page);
|
|
const button = page.locator('button[aria-label="Next slide"]:visible');
|
|
await expect(button).toBeVisible();
|
|
await expect(button).toBeEnabled();
|
|
await button.click();
|
|
}
|
|
|
|
export async function clickDeckPreviousSlide(page: Page): Promise<void> {
|
|
await revealDeckNavigation(page);
|
|
const button = page.locator('button[aria-label="Previous slide"]:visible');
|
|
await expect(button).toBeVisible();
|
|
await expect(button).toBeEnabled();
|
|
await button.click();
|
|
}
|
|
|
|
async function revealDeckNavigation(page: Page): Promise<void> {
|
|
const canvas = page.getByTestId('comment-preview-canvas');
|
|
if (await canvas.isVisible().catch(() => false)) {
|
|
await canvas.hover();
|
|
}
|
|
}
|