test: add wait for substeps response

This commit is contained in:
Jakub P.
2024-08-30 12:53:35 +02:00
parent 01340f4597
commit ec22184087
2 changed files with 17 additions and 8 deletions

View File

@@ -71,7 +71,11 @@ export class FlowEditorPage extends AuthenticatedPage {
await this.page.getByRole('option', { name: appName }).click();
await expect(this.eventAutocomplete).toBeVisible();
await this.eventAutocomplete.click();
await this.page.getByRole('option', { name: eventName }).click();
await expect(this.page.locator('[data-testid="ErrorIcon"]')).toHaveCount(2);
await Promise.all([
this.page.waitForResponse(resp => /(apps\/.*\/actions\/.*\/substeps)/.test(resp.url()) && resp.status() === 200),
this.page.getByRole('option', { name: eventName }).click(),
]);
await this.continueButton.click();
}