diff --git a/openmetadata-ui/src/main/resources/ui/playwright/constant/delete.ts b/openmetadata-ui/src/main/resources/ui/playwright/constant/delete.ts index a2092e3c3dd..9ae410e6978 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/constant/delete.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/constant/delete.ts @@ -67,3 +67,9 @@ export const ENTITIES_WITHOUT_FOLLOWING_BUTTON = [ 'services/searchServices', 'apiCollections', ]; + +/** + * Timeout for deleting big entities + * 5 minutes + */ +export const BIG_ENTITY_DELETE_TIMEOUT = 5 * 60 * 1000; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/ApiServiceRest.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/ApiServiceRest.spec.ts index 6edc53a8e53..1eaab361c99 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/ApiServiceRest.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/ApiServiceRest.spec.ts @@ -11,6 +11,7 @@ * limitations under the License. */ import { expect, test } from '@playwright/test'; +import { BIG_ENTITY_DELETE_TIMEOUT } from '../../constant/delete'; import { GlobalSettingOptions } from '../../constant/settings'; import { descriptionBox, @@ -102,6 +103,10 @@ test.describe('API service', () => { await deleteResponse; - await toastNotification(page, /deleted successfully!/); + await toastNotification( + page, + /deleted successfully!/, + BIG_ENTITY_DELETE_TIMEOUT + ); }); }); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts index 17f46a7b9b2..f86d682316b 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/EntityVersionPages.spec.ts @@ -11,6 +11,7 @@ * limitations under the License. */ import test, { expect } from '@playwright/test'; +import { BIG_ENTITY_DELETE_TIMEOUT } from '../../constant/delete'; import { EntityDataClass } from '../../support/entity/EntityDataClass'; import { EntityDataClassCreationConfig } from '../../support/entity/EntityDataClass.interface'; import { TableClass } from '../../support/entity/TableClass'; @@ -257,7 +258,11 @@ test.describe('Entity Version pages', () => { await deleteResponse; - await toastNotification(page, /deleted successfully!/); + await toastNotification( + page, + /deleted successfully!/, + BIG_ENTITY_DELETE_TIMEOUT + ); await page.reload(); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/ServiceEntityVersionPage.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/ServiceEntityVersionPage.spec.ts index f0da8a02151..f9385001933 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/ServiceEntityVersionPage.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/VersionPages/ServiceEntityVersionPage.spec.ts @@ -11,6 +11,7 @@ * limitations under the License. */ import test, { expect } from '@playwright/test'; +import { BIG_ENTITY_DELETE_TIMEOUT } from '../../constant/delete'; import { EntityDataClass } from '../../support/entity/EntityDataClass'; import { EntityDataClassCreationConfig } from '../../support/entity/EntityDataClass.interface'; import { @@ -215,7 +216,11 @@ test.describe('Service Version pages', () => { await deleteResponse; - await toastNotification(page, /deleted successfully!/); + await toastNotification( + page, + /deleted successfully!/, + BIG_ENTITY_DELETE_TIMEOUT + ); await page.reload(); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts index fc18a44813e..9de5a31a059 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts @@ -13,6 +13,7 @@ import { expect, Page } from '@playwright/test'; import { isEmpty, lowerCase } from 'lodash'; import { + BIG_ENTITY_DELETE_TIMEOUT, ENTITIES_WITHOUT_FOLLOWING_BUTTON, LIST_OF_FIELDS_TO_EDIT_NOT_TO_BE_PRESENT, LIST_OF_FIELDS_TO_EDIT_TO_BE_DISABLED, @@ -1248,7 +1249,11 @@ export const softDeleteEntity = async ( await deleteResponse; - await toastNotification(page, /deleted successfully!/); + await toastNotification( + page, + /deleted successfully!/, + BIG_ENTITY_DELETE_TIMEOUT + ); await page.reload(); @@ -1313,7 +1318,11 @@ export const hardDeleteEntity = async ( await page.click('[data-testid="confirm-button"]'); await deleteResponse; - await toastNotification(page, /deleted successfully!/); + await toastNotification( + page, + /deleted successfully!/, + BIG_ENTITY_DELETE_TIMEOUT + ); }; export const checkDataAssetWidget = async (page: Page, serviceType: string) => { diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/serviceIngestion.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/serviceIngestion.ts index a65fc814c2b..73b3ed4f379 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/serviceIngestion.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/serviceIngestion.ts @@ -12,6 +12,7 @@ */ import { expect, Page } from '@playwright/test'; +import { BIG_ENTITY_DELETE_TIMEOUT } from '../constant/delete'; import { GlobalSettingOptions } from '../constant/settings'; import { EntityTypeEndpoint } from '../support/entity/Entity.interface'; import { getApiContext, toastNotification } from './common'; @@ -120,7 +121,11 @@ export const deleteService = async ( await deleteResponse; // Closing the toast notification - await toastNotification(page, /deleted successfully!/, 5 * 60 * 1000); // Wait for up to 5 minutes for the toast notification to appear + await toastNotification( + page, + /deleted successfully!/, + BIG_ENTITY_DELETE_TIMEOUT + ); // Wait for up to 5 minutes for the toast notification to appear await page.reload(); await page.waitForLoadState('networkidle');