diff --git a/tests/playwright/pages/Dashboard/WebhookForm/index.ts b/tests/playwright/pages/Dashboard/WebhookForm/index.ts index 2a1aea22fa..3a203fe1b6 100644 --- a/tests/playwright/pages/Dashboard/WebhookForm/index.ts +++ b/tests/playwright/pages/Dashboard/WebhookForm/index.ts @@ -2,6 +2,7 @@ import { expect, Locator } from '@playwright/test'; import BasePage from '../../Base'; import { DashboardPage } from '..'; import { ToolbarPage } from '../common/Toolbar'; +import { getTextExcludeIconText } from '../../../tests/utils/general'; export class WebhookFormPage extends BasePage { readonly dashboard: DashboardPage; @@ -181,9 +182,11 @@ export class WebhookFormPage extends BasePage { }) { await expect.poll(async () => await this.get().locator('input.nc-text-field-hook-title').inputValue()).toBe(title); await expect(this.get().locator('.nc-text-field-hook-event >> .ant-select-selection-item')).toHaveText(hookEvent); - await expect(this.get().locator('.nc-select-hook-notification-type >> .ant-select-selection-item')).toHaveText( - notificationType - ); + + const locator = this.get().locator('.nc-select-hook-notification-type >> .ant-select-selection-item'); + const text = await getTextExcludeIconText(locator); + await expect(text).toBe(notificationType); + await expect(this.get().locator('.nc-select-hook-url-method >> .ant-select-selection-item')).toHaveText(urlMethod); await expect.poll(async () => await this.get().locator('input.nc-text-field-hook-url-path').inputValue()).toBe(url);