From 9a4b9a7f1e195d09357f7ed434bfe3a76bd74875 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 18 Mar 2023 12:29:57 +0800 Subject: [PATCH] feat(playwright): add logic to cater delete modal in hook --- tests/playwright/pages/Dashboard/WebhookForm/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/playwright/pages/Dashboard/WebhookForm/index.ts b/tests/playwright/pages/Dashboard/WebhookForm/index.ts index 47205471c5..2a1aea22fa 100644 --- a/tests/playwright/pages/Dashboard/WebhookForm/index.ts +++ b/tests/playwright/pages/Dashboard/WebhookForm/index.ts @@ -124,9 +124,11 @@ export class WebhookFormPage extends BasePage { await this.toolbar.actions.click('Webhooks'); await this.get().locator(`.nc-hook-delete-icon`).nth(index).click(); + await this.rootPage.locator('.ant-modal-confirm-confirm button:has-text("Yes")').click(); await this.verifyToast({ message: 'Hook deleted successfully' }); // click escape to close the drawer + await this.get().click(); await this.get().press('Escape'); }