Wait for a specific number of drafts to exist
(projectPath: string, count: number)
| 28 | |
| 29 | /** Wait for a specific number of drafts to exist */ |
| 30 | async function waitForDraftCount(projectPath: string, count: number): Promise<string[]> { |
| 31 | return await waitFor( |
| 32 | () => { |
| 33 | const ids = getWorkspaceDraftIds(projectPath); |
| 34 | if (ids.length !== count) { |
| 35 | throw new Error(`Expected ${count} drafts, got ${ids.length}`); |
| 36 | } |
| 37 | return ids; |
| 38 | }, |
| 39 | { timeout: 5_000 } |
| 40 | ); |
| 41 | } |
| 42 | |
| 43 | describeIntegration("Draft workspace behavior", () => { |
| 44 | beforeAll(async () => { |
no test coverage detected