fix(core): Fix flakey e2e test by awaiting debounce (no-changelog) (#38082)

This commit is contained in:
James Martin 2026-09-10 08:28:12 +00:00 committed by GitHub
parent b1943ff11f
commit 3527d059bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View File

@ -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')

View File

@ -62,4 +62,16 @@ export class ResourceMoveModal extends FloatingUiHelper {
async clickConfirmMoveButton(): Promise<void> {
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<void> {
// eslint-disable-next-line playwright/no-wait-for-timeout
await this.page.waitForTimeout(800);
}
}