Files
nexu-io__open-design/e2e/lib/playwright/resources.ts
Ray Xi a554d017c8 fix(web): render fixed-stage recent deck covers (#7556)
* fix(web): render fixed-stage recent deck covers

* test(e2e): type visual projects from contracts

Bind visual project fixtures to the production Project DTO so contract changes fail at the mocked API boundary.\n\nGenerated-By: looper 0.12.0 (runner=fixer, agent=codex)

* test(web): own fixed-stage deck cover fixtures

Move the authored deck sample into the e2e resource lane and pin the wrapper normalization in the web-owned srcDoc test.

Generated-By: looper 0.12.0 (runner=fixer, agent=codex)
2026-08-28 11:04:07 +00:00

77 lines
2.2 KiB
TypeScript

import { recentProjectFixedStageDeckHtml } from '../../resources/recent-project-fixed-stage-deck.ts';
import { playwrightUiScenarios } from '../../resources/playwright.ts';
export function fixedStageDeckFixtureHtml(): string {
return recentProjectFixedStageDeckHtml;
}
export type ScenarioKind = 'prototype' | 'deck' | 'hyperframes' | 'image' | 'audio' | 'template' | 'workspace';
export interface MockArtifactScenario {
identifier: string;
title: string;
html: string;
fileName: string;
heading: string;
}
export interface ExpectedScenarioFile {
kind?: string;
name: string;
previewText?: string;
}
export interface UiScenario {
id: string;
title: string;
kind: ScenarioKind;
flow?:
| 'standard'
| 'design-system-selection'
| 'example-use-prompt'
| 'conversation-persistence'
| 'file-mention'
| 'deep-link-preview'
| 'file-upload-send'
| 'design-files-upload'
| 'design-files-delete'
| 'design-files-tab-persistence'
| 'conversation-delete-recovery'
| 'question-form-single-selection'
| 'question-form-submit-persistence'
| 'question-form-single-answer'
| 'generation-does-not-create-extra-file'
| 'comment-attachment-flow'
| 'deck-pagination-next-prev-correctness'
| 'deck-pagination-per-file-isolated'
| 'uploaded-image-renders-in-preview'
| 'python-source-preview'
| 'hyperframes-project-routing'
| 'image-project-routing'
| 'video-project-routing'
| 'audio-project-routing'
| 'live-artifact-project-routing'
| 'plugin-create-import';
automated: boolean;
description: string;
create: {
projectName: string;
tab?: 'prototype' | 'live-artifact' | 'deck' | 'template' | 'media' | 'other';
mediaSurface?: 'image' | 'video' | 'audio';
videoModel?: string;
audioKind?: 'speech' | 'sfx';
};
prompt: string;
secondaryPrompt?: string;
mockArtifact?: MockArtifactScenario;
expectedProjectMetadata?: Record<string, unknown>;
expectedRunRequest?: Record<string, unknown>;
expectedFiles?: ExpectedScenarioFile[];
expectedPreviewText?: string;
notes?: string[];
}
export function automatedUiScenarios(): UiScenario[] {
return playwrightUiScenarios.filter((scenario) => scenario.automated);
}