From 947ca4b7d6f2f60f14c03d4a76701a5152db2aa1 Mon Sep 17 00:00:00 2001 From: Matsu Date: Tue, 2 Jun 2026 10:03:19 +0300 Subject: [PATCH] test: Page-scope Instance AI preview NDV output panel locator (#31530) Co-authored-by: Claude Opus 4.8 (1M context) --- packages/testing/playwright/pages/InstanceAiPage.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 ─────────────────────────────────────────────────────