test: add applications settings tests

This commit is contained in:
Jakub P.
2024-09-10 22:00:49 +02:00
committed by Ali BARIN
parent e146793d32
commit 09b2b7350c
14 changed files with 407 additions and 31 deletions

View File

@@ -30,6 +30,8 @@ export class FlowEditorPage extends AuthenticatedPage {
this.flowNameInput = this.page
.getByTestId('editableTypographyInput')
.locator('input');
this.flowStep = this.page.getByTestId('flow-step');
}
async createWebhookTrigger(workSynchronously) {
@@ -68,11 +70,11 @@ export class FlowEditorPage extends AuthenticatedPage {
}
async chooseAppAndEvent(appName, eventName) {
await expect(this.appAutocomplete).toHaveCount(1);
await this.appAutocomplete.click();
await this.page.getByRole('option', { name: appName }).click();
await expect(this.eventAutocomplete).toBeVisible();
await this.eventAutocomplete.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(),