From af264d308cb1a723f3a354189858c072d02e3b87 Mon Sep 17 00:00:00 2001 From: "Jakub P." Date: Mon, 27 Jan 2025 13:09:35 +0100 Subject: [PATCH] test: adapt webhook tests to work with default values --- .../tests/app-integrations/webhook.spec.js | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/e2e-tests/tests/app-integrations/webhook.spec.js b/packages/e2e-tests/tests/app-integrations/webhook.spec.js index e457abb8..4eea2aa6 100644 --- a/packages/e2e-tests/tests/app-integrations/webhook.spec.js +++ b/packages/e2e-tests/tests/app-integrations/webhook.spec.js @@ -12,7 +12,7 @@ test.describe('Webhook flow', () => { test('Create a new flow with a sync Webhook step then a Webhook step', async ({ flowEditorPage, page, - request + request, }) => { await flowEditorPage.flowName.click(); await flowEditorPage.flowNameInput.fill('syncWebhook'); @@ -23,10 +23,11 @@ test.describe('Webhook flow', () => { await expect(flowEditorPage.continueButton).toHaveCount(1); await expect(flowEditorPage.continueButton).not.toBeEnabled(); - await page - .getByTestId('parameters.statusCode-power-input') - .locator('[contenteditable]') - .fill('200'); + await expect( + page + .getByTestId('parameters.statusCode-power-input') + .locator('[contenteditable]') + ).toHaveText('200'); await flowEditorPage.clickAway(); await expect(flowEditorPage.continueButton).toHaveCount(1); await expect(flowEditorPage.continueButton).not.toBeEnabled(); @@ -36,7 +37,9 @@ test.describe('Webhook flow', () => { .locator('[contenteditable]') .fill('response from webhook'); await flowEditorPage.clickAway(); - await expect(page.getByTestId("parameters.headers.0.key-power-input")).toBeVisible(); + await expect( + page.getByTestId('parameters.headers.0.key-power-input') + ).toBeVisible(); await expect(flowEditorPage.continueButton).toBeEnabled(); await flowEditorPage.continueButton.click(); @@ -52,7 +55,7 @@ test.describe('Webhook flow', () => { test('Create a new flow with an async Webhook step then a Webhook step', async ({ flowEditorPage, page, - request + request, }) => { await flowEditorPage.flowName.click(); await flowEditorPage.flowNameInput.fill('asyncWebhook'); @@ -75,7 +78,9 @@ test.describe('Webhook flow', () => { .locator('[contenteditable]') .fill('response from webhook'); await flowEditorPage.clickAway(); - await expect(page.getByTestId("parameters.headers.0.key-power-input")).toBeVisible(); + await expect( + page.getByTestId('parameters.headers.0.key-power-input') + ).toBeVisible(); await expect(flowEditorPage.continueButton).toBeEnabled(); await flowEditorPage.continueButton.click();