From 474490b79f48627ec9f77ea4d10ae2db06123a1b Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Sun, 26 Mar 2023 08:46:02 +0530 Subject: [PATCH] test: quick tests Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- tests/playwright/pages/Dashboard/WebhookForm/index.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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);