Files
wehub-resource-sync 070959e133
landing-page-staging / Deploy landing page to staging (push) Has been skipped
landing-page-ci / Validate landing page (push) Failing after 4s
visual-baseline / Capture visual baselines (push) Has been cancelled
bake-plugin-previews / Bake plugin previews (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:00:47 +08:00

71 lines
2.0 KiB
TypeScript

import { playwrightUiScenarios } from '../../resources/playwright.ts';
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-selection-limit'
| 'question-form-submit-persistence'
| '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);
}