diff --git a/packages/testing/playwright/pages/InstanceAiPage.ts b/packages/testing/playwright/pages/InstanceAiPage.ts index b2f3bf9cb38..523f71d6c96 100644 --- a/packages/testing/playwright/pages/InstanceAiPage.ts +++ b/packages/testing/playwright/pages/InstanceAiPage.ts @@ -231,8 +231,16 @@ export class InstanceAiPage extends BasePage { ); } + /** + * NDV is rendered through a ``, and `#app-modals` + * is mounted in `App.vue` as a sibling of the router view — i.e. OUTSIDE both + * `workflow-canvas-host` and `instance-ai-container`. So unlike the canvas + * content above, this must be page-scoped, not scoped to the preview canvas. + * On the `/instance-ai` route the main editor isn't mounted, so the preview's + * NDV is the only `output-panel` on the page. + */ getPreviewNdvOutputPanel(): Locator { - return this.getPreviewCanvas().getByTestId('output-panel'); + return this.page.getByTestId('output-panel'); } // ── Artifacts ─────────────────────────────────────────────────────