test: harden webhook tests

This commit is contained in:
Jakub P.
2024-08-22 12:05:52 +02:00
parent 53f63996bd
commit e008087c4a
2 changed files with 10 additions and 7 deletions

View File

@@ -20,14 +20,16 @@ test.describe('Webhook flow', () => {
await flowEditorPage.chooseAppAndEvent('Webhook', 'Respond with');
await expect(flowEditorPage.continueButton.last()).not.toBeEnabled();
await expect(flowEditorPage.continueButton).toHaveCount(1);
await expect(flowEditorPage.continueButton).not.toBeEnabled();
await page
.getByTestId('parameters.statusCode-power-input')
.locator('[contenteditable]')
.fill('200');
await flowEditorPage.clickAway();
await expect(flowEditorPage.continueButton.last()).not.toBeEnabled();
await expect(flowEditorPage.continueButton).toHaveCount(1);
await expect(flowEditorPage.continueButton).not.toBeEnabled();
await page
.getByTestId('parameters.body-power-input')
@@ -54,15 +56,16 @@ test.describe('Webhook flow', () => {
const asyncWebhookUrl = await flowEditorPage.createWebhookTrigger(false);
await flowEditorPage.chooseAppAndEvent('Webhook', 'Respond with');
await expect(flowEditorPage.continueButton.last()).not.toBeEnabled();
await expect(flowEditorPage.continueButton).toHaveCount(1);
await expect(flowEditorPage.continueButton).not.toBeEnabled();
await page
.getByTestId('parameters.statusCode-power-input')
.locator('[contenteditable]')
.fill('200');
await flowEditorPage.clickAway();
await expect(flowEditorPage.continueButton.last()).not.toBeEnabled();
await expect(flowEditorPage.continueButton).toHaveCount(1);
await expect(flowEditorPage.continueButton).not.toBeEnabled();
await page
.getByTestId('parameters.body-power-input')