diff --git a/packages/testing/playwright/composables/WorkflowComposer.ts b/packages/testing/playwright/composables/WorkflowComposer.ts index 97ef81393cc..6f710f70ee7 100644 --- a/packages/testing/playwright/composables/WorkflowComposer.ts +++ b/packages/testing/playwright/composables/WorkflowComposer.ts @@ -119,6 +119,7 @@ export class WorkflowComposer { await this.n8n.page.keyboard.press('ControlOrMeta+a'); await this.n8n.page.keyboard.press('Backspace'); await this.n8n.page.keyboard.type(projectNameOrEmail, { delay: 50 }); + await this.n8n.resourceMoveModal.waitForDebounce(); const projectOption = this.n8n.page .getByTestId('project-sharing-info') diff --git a/packages/testing/playwright/pages/components/ResourceMoveModal.ts b/packages/testing/playwright/pages/components/ResourceMoveModal.ts index 58ad818430c..4b54e7be595 100644 --- a/packages/testing/playwright/pages/components/ResourceMoveModal.ts +++ b/packages/testing/playwright/pages/components/ResourceMoveModal.ts @@ -62,4 +62,16 @@ export class ResourceMoveModal extends FloatingUiHelper { async clickConfirmMoveButton(): Promise { await this.getMoveConfirmButton().click(); } + + /** + * Waits for the project select's remote search to settle after typing. + * The search is debounced twice — element-plus's own remote-method + * debounce and this component's own search debounce, 300ms each — so up + * to ~600ms can pass between the last keystroke and the option list + * actually reflecting it. + */ + async waitForDebounce(): Promise { + // eslint-disable-next-line playwright/no-wait-for-timeout + await this.page.waitForTimeout(800); + } }