From 7cf6d0009bda98f4377b7b65742bcded9dba1c6b Mon Sep 17 00:00:00 2001 From: anuj-kumary Date: Mon, 6 Jul 2026 13:26:03 +0530 Subject: [PATCH 1/9] Replaced old entity delete modal with untitles delete modal --- .../e2e/Features/Dashboards.spec.ts | 1 - .../Features/DataQuality/TestLibrary.spec.ts | 7 - .../Features/FailedTestCaseSampleData.spec.ts | 1 - .../Glossary/GlossaryCRUDOperations.spec.ts | 4 +- .../Glossary/GlossaryMiscOperations.spec.ts | 3 - .../Glossary/GlossaryWorkflow.spec.ts | 2 - .../e2e/Features/KnowledgeCenter.spec.ts | 1 - .../e2e/Features/MetricCustomUnitFlow.spec.ts | 2 - .../SampleDataTableOperations.spec.ts | 4 - .../e2e/Features/TeamsHierarchy.spec.ts | 4 +- .../e2e/Flow/ApiServiceRest.spec.ts | 1 - .../e2e/Flow/ExploreDiscovery.spec.ts | 3 - .../Flow/PersonaDeletionUserProfile.spec.ts | 3 - .../playwright/e2e/Flow/PersonaFlow.spec.ts | 4 +- .../Flow/ServiceCreationPermissions.spec.ts | 2 - .../playwright/e2e/Pages/DataInsight.spec.ts | 1 - .../Pages/DataProductAndSubdomains.spec.ts | 2 - .../playwright/e2e/Pages/DataProducts.spec.ts | 2 - .../e2e/Pages/DomainUIInteractions.spec.ts | 6 - .../ui/playwright/e2e/Pages/Domains.spec.ts | 2 - .../ui/playwright/e2e/Pages/Glossary.spec.ts | 2 - .../ui/playwright/e2e/Pages/Policies.spec.ts | 8 +- .../ui/playwright/e2e/Pages/Roles.spec.ts | 8 +- .../ui/playwright/e2e/Pages/Tag.spec.ts | 2 - .../ui/playwright/e2e/Pages/Tags.spec.ts | 2 - .../ui/playwright/e2e/Pages/TestSuite.spec.ts | 1 - .../VersionPages/EntityVersionPages.spec.ts | 1 - .../ServiceEntityVersionPage.spec.ts | 1 - .../resources/ui/playwright/utils/alert.ts | 3 - .../ui/playwright/utils/asyncDelete.ts | 1 - .../main/resources/ui/playwright/utils/bot.ts | 2 - .../ui/playwright/utils/customMetric.ts | 1 - .../resources/ui/playwright/utils/entity.ts | 2 - .../resources/ui/playwright/utils/glossary.ts | 4 - .../ui/playwright/utils/serviceIngestion.ts | 2 - .../resources/ui/playwright/utils/team.ts | 4 - .../ui/playwright/utils/testCases.ts | 1 - .../resources/ui/playwright/utils/user.ts | 5 - .../DataQualityTab/DataQualityTab.test.tsx | 4 +- .../DataQualityTab/DataQualityTab.tsx | 4 +- .../CustomMetricGraphs.component.tsx | 4 +- .../CustomMetricGraphs.test.tsx | 4 +- .../DomainDetails/DomainDetails.component.tsx | 4 +- ...rofileSectionUserDetailsCard.component.tsx | 4 +- .../Bot/BotListV1/BotListV1.component.tsx | 4 +- .../DeleteWidget/DeleteEntityModal.test.tsx | 135 ++++++ .../common/DeleteWidget/DeleteEntityModal.tsx | 305 ++++++++++++++ .../DeleteWidget/DeleteWidgetModal.test.tsx | 170 -------- .../common/DeleteWidget/DeleteWidgetModal.tsx | 391 ------------------ .../delete-widget-modal.style.less | 19 - .../ManageButton/ManageButton.test.tsx | 6 +- .../ManageButton/ManageButton.tsx | 4 +- .../ui/src/locale/languages/ar-sa.json | 2 + .../ui/src/locale/languages/de-de.json | 2 + .../ui/src/locale/languages/en-us.json | 2 + .../ui/src/locale/languages/es-es.json | 2 + .../ui/src/locale/languages/fr-fr.json | 2 + .../ui/src/locale/languages/gl-es.json | 2 + .../ui/src/locale/languages/he-he.json | 2 + .../ui/src/locale/languages/ja-jp.json | 2 + .../ui/src/locale/languages/ko-kr.json | 2 + .../ui/src/locale/languages/mr-in.json | 2 + .../ui/src/locale/languages/nl-nl.json | 2 + .../ui/src/locale/languages/pr-pr.json | 2 + .../ui/src/locale/languages/pt-br.json | 2 + .../ui/src/locale/languages/pt-pt.json | 2 + .../ui/src/locale/languages/ru-ru.json | 2 + .../ui/src/locale/languages/sv-se.json | 2 + .../ui/src/locale/languages/th-th.json | 2 + .../ui/src/locale/languages/tr-tr.json | 2 + .../ui/src/locale/languages/zh-cn.json | 2 + .../ui/src/locale/languages/zh-tw.json | 2 + .../AlertDetailsPage.test.tsx | 6 +- .../components/AlertDetailsContent.tsx | 4 +- .../pages/DataInsightPage/KPIList.test.tsx | 2 +- .../ui/src/pages/DataInsightPage/KPIList.tsx | 4 +- .../NotificationListPage.test.tsx | 6 +- .../NotificationListPage.tsx | 4 +- .../ObservabilityAlertsPage.test.tsx | 6 +- .../ObservabilityAlertsPage.tsx | 4 +- .../PersonaListPage/PersonaPage.test.tsx | 4 +- .../PoliciesListPage.test.tsx | 2 +- .../PoliciesListPage/PoliciesListPage.tsx | 4 +- .../RolesListPage/RolesListPage.test.tsx | 2 +- .../RolesPage/RolesListPage/RolesListPage.tsx | 4 +- .../src/pages/UserListPage/UserListPageV1.tsx | 4 +- 86 files changed, 534 insertions(+), 725 deletions(-) create mode 100644 openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.test.tsx create mode 100644 openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx delete mode 100644 openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteWidgetModal.test.tsx delete mode 100644 openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteWidgetModal.tsx delete mode 100644 openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/delete-widget-modal.style.less diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Dashboards.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Dashboards.spec.ts index 6c7b26537ecc..0d6acf07d6ec 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Dashboards.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Dashboards.spec.ts @@ -134,7 +134,6 @@ test.describe( await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const deleteResponse = page.waitForResponse( `/api/v1/${EntityTypeEndpoint.Dashboard}/async/*?hardDelete=false&recursive=true` ); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataQuality/TestLibrary.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataQuality/TestLibrary.spec.ts index 53c02f09ef02..a4ac9e790c9a 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataQuality/TestLibrary.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataQuality/TestLibrary.spec.ts @@ -269,8 +269,6 @@ test.describe( page.getByText(`Delete ${UPDATE_TEST_DEFINITION_DISPLAY_NAME}`) ).toBeVisible(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); - // Wait for API call const deleteTestDefinitionResponse = page.waitForResponse( (response) => @@ -743,8 +741,6 @@ test.describe( page.getByText(`Delete ${createdTestDisplayName}`) ).toBeVisible(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); - const deleteResponse = page.waitForResponse( (response) => response.url().includes('/api/v1/dataQuality/testDefinitions') && @@ -1053,8 +1049,6 @@ test.describe( await expect(page.locator('.ant-modal')).toBeVisible(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); - const deleteResponse = page.waitForResponse( (response) => response.url().includes('/api/v1/dataQuality/testDefinitions') && @@ -1215,7 +1209,6 @@ test.describe( .click(); await expect(page.locator('.ant-modal')).toBeVisible(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); // Set up both DELETE and the subsequent GET response waits BEFORE clicking const deleteResponse = page.waitForResponse( diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/FailedTestCaseSampleData.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/FailedTestCaseSampleData.spec.ts index af67d2905a46..a17a8048fe4b 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/FailedTestCaseSampleData.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/FailedTestCaseSampleData.spec.ts @@ -115,7 +115,6 @@ test( await page.click('[data-testid="sample-data-manage-button"]'); await page.click('[data-testid="delete-button"]'); await page.locator('.ant-modal-body').waitFor({ state: 'visible' }); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const deleteSampleData = page.waitForResponse( '/api/v1/dataQuality/testCases/*/failedRowsSample' ); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryCRUDOperations.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryCRUDOperations.spec.ts index ddda29af26cc..fc22708fcd7f 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryCRUDOperations.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryCRUDOperations.spec.ts @@ -408,9 +408,7 @@ test.describe('Glossary CRUD Operations', () => { state: 'visible', }); - const confirmInput = page.locator( - '[data-testid="confirmation-text-input"]' - ); + const confirmInput = page.locator(); if ( await confirmInput.isVisible({ timeout: 2000 }).catch(() => false) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryMiscOperations.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryMiscOperations.spec.ts index b3231e4487ec..82eaa427053f 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryMiscOperations.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryMiscOperations.spec.ts @@ -95,7 +95,6 @@ test.describe('Glossary Miscellaneous Operations', () => { await expect(page.locator('[role="dialog"]')).toBeVisible(); // Confirm deletion - await page.getByTestId('confirmation-text-input').fill('DELETE'); const deleteRes = page.waitForResponse('/api/v1/glossaries/async/*'); await page.getByTestId('confirm-button').click(); @@ -245,7 +244,6 @@ test.describe('Glossary Miscellaneous Operations', () => { await expect(page.locator('[role="dialog"]')).toBeVisible(); // Confirm deletion - await page.getByTestId('confirmation-text-input').fill('DELETE'); const deleteRes = page.waitForResponse('/api/v1/glossaryTerms/async/*'); await page.getByTestId('confirm-button').click(); @@ -386,7 +384,6 @@ test.describe('Glossary Miscellaneous Operations', () => { await expect(page.locator('[role="dialog"]')).toBeVisible(); // Confirm deletion - await page.getByTestId('confirmation-text-input').fill('DELETE'); const deleteRes = page.waitForResponse('/api/v1/glossaryTerms/async/*'); await page.getByTestId('confirm-button').click(); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryWorkflow.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryWorkflow.spec.ts index bf42f26e7850..ae8ef77c053b 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryWorkflow.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryWorkflow.spec.ts @@ -651,8 +651,6 @@ test('should delete parent term and cascade delete children', async ({ await expect(page.locator('[role="dialog"]')).toBeVisible(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); - const deleteRes = page.waitForResponse('/api/v1/glossaryTerms/async/*'); await page.getByTestId('confirm-button').click(); await deleteRes; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/KnowledgeCenter.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/KnowledgeCenter.spec.ts index 8f86b6511059..e7a72e3ae0ea 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/KnowledgeCenter.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/KnowledgeCenter.spec.ts @@ -519,7 +519,6 @@ test.describe('Knowledge Center', () => { // await page.click('[data-testid="hard-delete-option"]'); // await page.check('[data-testid="hard-delete"]'); - // await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); // const deleteResponse = page.waitForResponse( // '/api/v1/contextCenter/pages/*?hardDelete=true&recursive=true' diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/MetricCustomUnitFlow.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/MetricCustomUnitFlow.spec.ts index d7550ae42e5e..ffd5c45c7555 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/MetricCustomUnitFlow.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/MetricCustomUnitFlow.spec.ts @@ -169,8 +169,6 @@ test.describe( await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); - const deletePromise = page.waitForResponse( (response) => response.request().method() === 'DELETE' && diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/SampleDataTableOperations.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/SampleDataTableOperations.spec.ts index e26acaa8a679..e89a35a23c5c 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/SampleDataTableOperations.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/SampleDataTableOperations.spec.ts @@ -202,8 +202,6 @@ test.describe('Sample Data Tab - Download and Delete Functionality', () => { }); await test.step('Type DELETE to enable confirm button', async () => { - await page.getByTestId('confirmation-text-input').fill('DELETE'); - const confirmButton = page.getByTestId('confirm-button'); await expect(confirmButton).toBeEnabled(); }); @@ -234,8 +232,6 @@ test.describe('Sample Data Tab - Download and Delete Functionality', () => { }); await test.step('Type DELETE and confirm deletion', async () => { - await page.getByTestId('confirmation-text-input').fill('DELETE'); - const deleteResponse = page.waitForResponse( (response) => response diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsHierarchy.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsHierarchy.spec.ts index d8fcb17bf145..424005e22ccf 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsHierarchy.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsHierarchy.spec.ts @@ -129,9 +129,7 @@ test.describe( page.locator('[data-testid="confirm-button"]') ).toBeDisabled(); - await page - .locator('[data-testid="confirmation-text-input"]') - .fill(DELETE_TERM); + await page.fill(DELETE_TERM); const deleteResponse = page.waitForResponse( `/api/v1/teams/*?hardDelete=true&recursive=true` 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 deecc08aff80..2f5ea64774dc 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 @@ -172,7 +172,6 @@ test.describe('API service', PLAYWRIGHT_INGESTION_TAG_OBJ, () => { await page.click('[data-testid="hard-delete-option"]'); await page.check('[data-testid="hard-delete"]'); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const deleteResponse = page.waitForResponse( '/api/v1/services/apiServices/async/*?hardDelete=true&recursive=true' diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/ExploreDiscovery.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/ExploreDiscovery.spec.ts index dbd7cbc728fb..29074d3a5df7 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/ExploreDiscovery.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/ExploreDiscovery.spec.ts @@ -238,9 +238,6 @@ test.describe('Explore Assets Discovery', () => { ) ).toBeVisible(); - await page.getByTestId('confirmation-text-input').click(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); - await expect(page.getByTestId('confirm-button')).toBeEnabled(); await page.getByTestId('confirm-button').click(); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaDeletionUserProfile.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaDeletionUserProfile.spec.ts index d54cbf10f394..75f03940aa31 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaDeletionUserProfile.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaDeletionUserProfile.spec.ts @@ -12,7 +12,6 @@ */ import { expect } from '@playwright/test'; -import { DELETE_TERM } from '../../constant/common'; import { UserClass } from '../../support/user/UserClass'; import { performAdminLogin } from '../../utils/admin'; import { descriptionBox, uuid } from '../../utils/common'; @@ -148,8 +147,6 @@ test.describe.serial('User profile works after persona deletion', () => { const confirmButton = page.getByTestId('confirm-button'); await expect(confirmButton).toBeDisabled(); - await page.getByTestId('confirmation-text-input').fill(DELETE_TERM); - const deleteResponse = page.waitForResponse( `/api/v1/personas/*?hardDelete=true&recursive=false` ); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaFlow.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaFlow.spec.ts index 0c960120f673..38c5d29fec38 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaFlow.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaFlow.spec.ts @@ -283,9 +283,7 @@ test.describe.serial('Persona operations', () => { await expect(page.locator('[data-testid="confirm-button"]')).toBeDisabled(); - await page - .locator('[data-testid="confirmation-text-input"]') - .fill(DELETE_TERM); + await page.fill(DELETE_TERM); const deleteResponse = page.waitForResponse( `/api/v1/personas/*?hardDelete=true&recursive=false` diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/ServiceCreationPermissions.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/ServiceCreationPermissions.spec.ts index 2530c117df4b..68d5f3c2ea47 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/ServiceCreationPermissions.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/ServiceCreationPermissions.spec.ts @@ -335,7 +335,6 @@ test.describe( await page.getByTestId('manage-button').click(); await page.getByTestId('delete-button-title').click(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); await page.getByTestId('confirm-button').click(); await toastNotification( @@ -519,7 +518,6 @@ test.describe( await page.getByTestId('manage-button').click(); await page.getByTestId('delete-button-title').click(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); const deleteResponse = page.waitForResponse( (response) => diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts index c5a1dae5e1d1..1ad78d9fb472 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataInsight.spec.ts @@ -295,7 +295,6 @@ test.describe('Data Insight Page', { tag: '@data-insight' }, () => { for (const data of KPI_DATA) { await page.getByTestId(`delete-action-${data.displayName}`).click(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); const deleteResponse = page.waitForResponse( `/api/v1/kpi/*?hardDelete=true&recursive=false` ); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProductAndSubdomains.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProductAndSubdomains.spec.ts index cf4a15f24a11..ea728ddf5415 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProductAndSubdomains.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProductAndSubdomains.spec.ts @@ -799,8 +799,6 @@ test.describe('Multiple Subdomains Tests', () => { await expect(page.getByRole('dialog')).toBeVisible(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); - const deleteRes = page.waitForResponse('/api/v1/domains/*'); await page.getByTestId('confirm-button').click(); await deleteRes; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProducts.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProducts.spec.ts index 8c3e9d62a3b6..b9f7e1264ff3 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProducts.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProducts.spec.ts @@ -191,8 +191,6 @@ test.describe('Data Products', () => { page.getByTestId('modal-header').getByText(dataProduct.data.name) ).toBeVisible(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); - const deleteRes = page.waitForResponse('/api/v1/dataProducts/*'); await page.getByTestId('confirm-button').click(); await deleteRes; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DomainUIInteractions.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DomainUIInteractions.spec.ts index d5a20867d570..10507e311471 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DomainUIInteractions.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DomainUIInteractions.spec.ts @@ -374,8 +374,6 @@ test.describe('Data Product UI Operations', () => { await expect(page.getByRole('dialog')).toBeVisible(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); - const deleteRes = page.waitForResponse('/api/v1/dataProducts/*'); await page.getByTestId('confirm-button').click(); await deleteRes; @@ -514,8 +512,6 @@ test.describe('Subdomain Management', () => { await expect(page.getByRole('dialog')).toBeVisible(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); - const deleteRes = page.waitForResponse('/api/v1/domains/*'); await page.getByTestId('confirm-button').click(); await deleteRes; @@ -847,8 +843,6 @@ test.describe('Delete Domain with Dependencies', () => { await expect(page.getByRole('dialog')).toBeVisible(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); - const deleteRes = page.waitForResponse('/api/v1/domains/*'); await page.getByTestId('confirm-button').click(); await deleteRes; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts index 0653befbc1f8..6cb9bb5db4e8 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts @@ -229,7 +229,6 @@ test.describe('Domains', () => { .getByText(`Delete domain "${domain.data.displayName}"`) ).toBeVisible(); - const confirmationInput = page.getByTestId('confirmation-text-input'); await expect(confirmationInput).toBeVisible(); await confirmationInput.click(); await confirmationInput.fill('DELETE'); @@ -1389,7 +1388,6 @@ test.describe('Domains', () => { await expect(deleteButton).toBeVisible(); await deleteButton.click(); - const confirmationInput = page.getByTestId('confirmation-text-input'); await expect(confirmationInput).toBeVisible(); await confirmationInput.click(); await confirmationInput.fill('DELETE'); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts index 1497d8cd5d08..a83f513a4f1e 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts @@ -2131,8 +2131,6 @@ test.describe('Glossary tests', () => { await expect(page.getByTestId('body-text')).toContainText('DELETE'); - const confirmationInput = page.getByTestId('confirmation-text-input'); - await expect(confirmationInput).toBeVisible(); await confirmationInput.fill('DELETE'); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Policies.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Policies.spec.ts index a5f35cdc6513..b6e9147f395c 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Policies.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Policies.spec.ts @@ -323,9 +323,7 @@ test.describe( await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); // Type 'DELETE' in the confirmation text input - await page - .locator('[data-testid="confirmation-text-input"]') - .fill('DELETE'); + await page.fill('DELETE'); // Click on confirm button await page.locator('[data-testid="confirm-button"]').click(); @@ -412,9 +410,7 @@ test.describe( await page.getByTestId('manage-button').click(); await page.getByTestId('delete-button').click(); - await page - .locator('[data-testid="confirmation-text-input"]') - .fill('DELETE'); + await page.fill('DELETE'); await page.locator('[data-testid="confirm-button"]').click(); await expect(policyLocator).not.toBeVisible(); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Roles.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Roles.spec.ts index 0857c7c2faba..f3fe1b69e0d6 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Roles.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Roles.spec.ts @@ -504,9 +504,7 @@ test.describe('Roles page tests', PLAYWRIGHT_BASIC_TEST_TAG_OBJ, () => { await expect(roleLocator).toBeVisible(); // Wait for confirmation modal to be visible - const confirmationInput = page.locator( - '[data-testid="confirmation-text-input"]' - ); + const confirmationInput = page.locator(); await expect(confirmationInput).toBeVisible(); await confirmationInput.fill('DELETE'); @@ -570,9 +568,7 @@ test.describe('Roles page tests', PLAYWRIGHT_BASIC_TEST_TAG_OBJ, () => { await deleteButton.click(); // Wait for confirmation modal - const confirmationInput = page.locator( - '[data-testid="confirmation-text-input"]' - ); + const confirmationInput = page.locator(); await expect(confirmationInput).toBeVisible(); await confirmationInput.fill('DELETE'); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Tag.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Tag.spec.ts index 85a0d904dc41..6c3ffe67c4a7 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Tag.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Tag.spec.ts @@ -197,8 +197,6 @@ test.describe('Tag Page with Admin Roles', () => { await expect(adminPage.getByRole('dialog')).toBeVisible(); - await adminPage.getByTestId('confirmation-text-input').fill('DELETE'); - const deleteTag = adminPage.waitForResponse(`/api/v1/tags/*`); await adminPage.getByTestId('confirm-button').click(); await deleteTag; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Tags.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Tags.spec.ts index f20b89edb3b3..330a04659ac4 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Tags.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Tags.spec.ts @@ -67,7 +67,6 @@ const permanentDeleteModal = async (page: Page, entity: string) => { `Delete ${entity}` ); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); await page.click('[data-testid="confirm-button"]'); }; @@ -495,7 +494,6 @@ test('Classification Page', async ({ page }) => { await page.click('[data-testid="delete-button"]'); await page.click('[data-testid="hard-delete-option"]'); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const deleteClassification = page.waitForResponse( (response) => diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestSuite.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestSuite.spec.ts index de4596fa7b54..00ad8c7e7f0c 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestSuite.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestSuite.spec.ts @@ -363,7 +363,6 @@ test( // Click on Permanent/Hard delete option await ownerPage.click('[data-testid="hard-delete-option"]'); - await ownerPage.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const deleteResponse = ownerPage.waitForResponse( '/api/v1/dataQuality/testSuites/*?hardDelete=true&recursive=true' ); 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 e9cee128890b..50ae4436f8df 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 @@ -349,7 +349,6 @@ test.describe('Entity Version pages', () => { await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const deleteResponse = page.waitForResponse( `/api/v1/${entity.endpoint}/async/*?hardDelete=false&recursive=true` ); 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 833b4e4defa0..c13c8c6ceace 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 @@ -281,7 +281,6 @@ test.describe('Service Version pages', () => { await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const deleteResponse = page.waitForResponse( `/api/v1/${entity.endpoint}/async/*?hardDelete=false&recursive=true` ); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/alert.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/alert.ts index 42394b59b4d5..28ce4907f20e 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/alert.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/alert.ts @@ -25,7 +25,6 @@ import { ALERT_WITH_PERMISSION_ROLE_NAME, } from '../constant/alert'; import { AlertDetails, EventDetails } from '../constant/alert.interface'; -import { DELETE_TERM } from '../constant/common'; import { Domain } from '../support/domain/Domain'; import { DashboardClass } from '../support/entity/DashboardClass'; import { TableClass } from '../support/entity/TableClass'; @@ -204,8 +203,6 @@ export const deleteAlertSteps = async ( `Delete subscription "${displayName}"` ); - await page.fill('[data-testid="confirmation-text-input"]', DELETE_TERM); - const deleteAlert = page.waitForResponse( (response) => response.request().method() === 'DELETE' && response.status() === 200 diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/asyncDelete.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/asyncDelete.ts index 788db0ca0776..af0fe66626ad 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/asyncDelete.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/asyncDelete.ts @@ -129,7 +129,6 @@ export const openDeleteModal = async (page: Page) => { * Fills the DELETE confirmation and clicks confirm button. */ export const confirmDelete = async (page: Page) => { - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); await page.click('[data-testid="confirm-button"]'); }; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts index 29f34b46573b..99f3cda08e40 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts @@ -137,8 +137,6 @@ export const deleteBot = async (page: Page) => { await page.getByTestId('hard-delete-option').click(); - await page.getByTestId('confirmation-text-input').fill('DELETE'); - const deleteResponse = page.waitForResponse(`/api/v1/bots/*`); await page.getByTestId('confirm-button').click(); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/customMetric.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/customMetric.ts index 8b042db83b2d..228eac8e5d49 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/customMetric.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/customMetric.ts @@ -149,7 +149,6 @@ export const deleteCustomMetric = async ({ await expect(page.locator('.ant-modal-header')).toContainText(metric.name); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const deleteMetricResponse = page.waitForResponse( isColumnMetric ? `/api/v1/tables/*/customMetric/${metric.column}/${metric.name}*` 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 0e8fe9baf521..34241b8354de 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts @@ -2132,7 +2132,6 @@ export const softDeleteEntity = async ( await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); await expect(page.locator('.ant-modal-title')).toContainText(displayName); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const deleteResponse = page.waitForResponse( `/api/v1/${endPoint}/async/*?hardDelete=false&recursive=true` ); @@ -2230,7 +2229,6 @@ export const hardDeleteEntity = async ( await page.click('[data-testid="hard-delete-option"]'); await page.check('[data-testid="hard-delete"]'); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const deleteResponse = page.waitForResponse( `/api/v1/${endPoint}/async/*?hardDelete=true&recursive=true` ); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/glossary.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/glossary.ts index ee3389dcd38e..7551ddb610d3 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/glossary.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/glossary.ts @@ -399,8 +399,6 @@ export const deleteGlossary = async (page: Page, glossary: GlossaryData) => { glossary.displayName ); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); - const deleteGlossary = page.waitForResponse( (response) => response.url().includes('/api/v1/glossaries/') && @@ -1129,8 +1127,6 @@ export const deleteGlossaryOrGlossaryTerm = async ( entityName ); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); - const endpoint = isGlossaryTerm ? '/api/v1/glossaryTerms/async/*' : '/api/v1/glossaries/async/*'; 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 8e507a590114..be3b68aa7f45 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/serviceIngestion.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/serviceIngestion.ts @@ -98,8 +98,6 @@ export const deleteService = async ( await page.click('[data-testid="hard-delete-option"]'); await page.click(`[data-testid="hard-delete-option"] >> text=${serviceName}`); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); - const deleteResponse = page.waitForResponse((response) => response .url() diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/team.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/team.ts index e663ce55305d..7709b0f6b505 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/team.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/team.ts @@ -121,10 +121,7 @@ export const softDeleteTeam = async (page: Page) => { await page.waitForLoadState('domcontentloaded'); - await expect(page.getByTestId('confirmation-text-input')).toBeVisible(); - await page.click('[data-testid="soft-delete-option"]'); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const deleteResponse = page.waitForResponse( '/api/v1/teams/*?hardDelete=false&recursive=true' @@ -149,7 +146,6 @@ export const hardDeleteTeam = async (page: Page, teamName: string) => { await page.click('[data-testid="hard-delete-option"]'); await page.check('[data-testid="hard-delete"]'); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const deleteResponse = page.waitForResponse( '/api/v1/teams/*?hardDelete=true&recursive=true' diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/testCases.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/testCases.ts index 29e9fc13a3a2..593852e2be8e 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/testCases.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/testCases.ts @@ -186,7 +186,6 @@ export const waitForTestSuiteIngestionPipelinesListResponse = (page: Page) => }); export const confirmIngestionPipelineHardDelete = async (page: Page) => { - await page.getByTestId('confirmation-text-input').fill('DELETE'); const deleteResponse = page.waitForResponse( '/api/v1/services/ingestionPipelines/*?hardDelete=true' ); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts index 33f9c781819a..89da997515a7 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts @@ -191,8 +191,6 @@ export const softDeleteUserProfilePage = async ( await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); await expect(page.locator('.ant-modal-title')).toContainText(displayName); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); - const deleteResponse = page.waitForResponse( '/api/v1/users/*?hardDelete=false&recursive=true' ); @@ -241,7 +239,6 @@ export const hardDeleteUserProfilePage = async ( await page.click('[data-testid="hard-delete-option"]'); await page.check('[data-testid="hard-delete"]'); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const deleteResponse = page.waitForResponse( '/api/v1/users/*?hardDelete=true&recursive=true' @@ -371,7 +368,6 @@ export const softDeleteUser = async ( await page.click(`[data-testid="delete-user-btn-${username}"]`); // Soft deleting the user await page.click('[data-testid="soft-delete"]'); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const fetchUpdatedUsers = page.waitForResponse('/api/v1/users/*'); const deleteResponse = page.waitForResponse( @@ -478,7 +474,6 @@ export const permanentDeleteUser = async ( // Click on hard delete await page.click('[data-testid="hard-delete"]'); - await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); const reFetchUsers = page.waitForResponse( '/api/v1/users?**include=non-deleted' diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Database/Profiler/DataQualityTab/DataQualityTab.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Database/Profiler/DataQualityTab/DataQualityTab.test.tsx index d9f6d9d184a2..1b0dda9163a2 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Database/Profiler/DataQualityTab/DataQualityTab.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Database/Profiler/DataQualityTab/DataQualityTab.test.tsx @@ -330,11 +330,11 @@ jest.mock('../../../common/Loader/Loader', () => jest.fn().mockImplementation(() => Loader) ); -jest.mock('../../../common/DeleteWidget/DeleteWidgetModal', () => +jest.mock('../../../common/DeleteWidget/DeleteEntityModal', () => jest.fn().mockImplementation(({ visible, onCancel }) => visible ? (
-

DeleteWidgetModal

+

DeleteEntityModal

) : null diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Database/Profiler/DataQualityTab/DataQualityTab.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Database/Profiler/DataQualityTab/DataQualityTab.tsx index 9c267b72496b..0a11702d3b64 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Database/Profiler/DataQualityTab/DataQualityTab.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Database/Profiler/DataQualityTab/DataQualityTab.tsx @@ -57,7 +57,7 @@ import { getEntityDetailsPath } from '../../../../utils/RouterUtils'; import { replacePlus } from '../../../../utils/StringUtils'; import { showErrorToast } from '../../../../utils/ToastUtils'; import DateTimeDisplay from '../../../common/DateTimeDisplay/DateTimeDisplay'; -import DeleteWidgetModal from '../../../common/DeleteWidget/DeleteWidgetModal'; +import DeleteEntityModal from '../../../common/DeleteWidget/DeleteEntityModal'; import FilterTablePlaceHolder from '../../../common/ErrorWithPlaceholder/FilterTablePlaceHolder'; import NextPrevious from '../../../common/NextPrevious/NextPrevious'; import StatusBadge from '../../../common/StatusBadge/StatusBadge.component'; @@ -891,7 +891,7 @@ const DataQualityTab: React.FC = ({ onConfirm={handleConfirmClick} /> ) : ( - ); })} - { return jest.fn().mockImplementation(() =>
ProfilerLatestValue
); }); -jest.mock('../../../../common/DeleteWidget/DeleteWidgetModal', () => { - return jest.fn().mockImplementation(() =>
DeleteWidgetModal
); +jest.mock('../../../../common/DeleteWidget/DeleteEntityModal', () => { + return jest.fn().mockImplementation(() =>
DeleteEntityModal
); }); jest.mock('../../../../common/ErrorWithPlaceholder/ErrorPlaceHolder', () => { return jest.fn().mockImplementation(() =>
ErrorPlaceHolder
); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetails/DomainDetails.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetails/DomainDetails.component.tsx index a37970d11338..f1e821faaa09 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetails/DomainDetails.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetails/DomainDetails.component.tsx @@ -112,7 +112,7 @@ import { import { withActivityFeed } from '../../AppRouter/withActivityFeed'; import { useFormDrawerWithHook } from '../../common/atoms/drawer'; import { CoverImage } from '../../common/CoverImage/CoverImage.component'; -import DeleteWidgetModal from '../../common/DeleteWidget/DeleteWidgetModal'; +import DeleteEntityModal from '../../common/DeleteWidget/DeleteEntityModal'; import AnnouncementCard from '../../common/EntityPageInfos/AnnouncementCard/AnnouncementCard'; import AnnouncementDrawer from '../../common/EntityPageInfos/AnnouncementDrawer/AnnouncementDrawer'; import HeaderBreadcrumb from '../../common/HeaderBreadcrumb/HeaderBreadcrumb.component'; @@ -1103,7 +1103,7 @@ const DomainDetails = ({ /> {domain && ( - onDelete(domain.id)} allowSoftDelete={false} entityId={domain.id} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ProfileCard/ProfileSectionUserDetailsCard.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/ProfileCard/ProfileSectionUserDetailsCard.component.tsx index fcfa6941ea2d..a8186ecdbdc4 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ProfileCard/ProfileSectionUserDetailsCard.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/ProfileCard/ProfileSectionUserDetailsCard.component.tsx @@ -34,7 +34,7 @@ import { changePassword } from '../../rest/auth-API'; import { getEntityName } from '../../utils/EntityNameUtils'; import { showErrorToast, showSuccessToast } from '../../utils/ToastUtils'; import { getUserOnlineStatus, isMaskedEmail } from '../../utils/UsersPureUtils'; -import DeleteWidgetModal from '../common/DeleteWidget/DeleteWidgetModal'; +import DeleteEntityModal from '../common/DeleteWidget/DeleteEntityModal'; import UserPopOverCard from '../common/PopOverCard/UserPopOverCard'; import ProfilePicture from '../common/ProfilePicture/ProfilePicture'; import { ProfileEditModal } from '../Modals/ProfileEditModal/ProfileEditModal'; @@ -280,7 +280,7 @@ const ProfileSectionUserDetailsCard = ({ )} {isDelete && ( - - ({ + deleteEntity: jest.fn().mockImplementation(() => + Promise.resolve({ + status: 200, + data: { version: 1 }, + }) + ), +})); + +jest.mock('../../../hooks/useApplicationStore', () => ({ + useApplicationStore: jest.fn(() => ({ + currentUser: mockUserData, + })), +})); + +jest.mock('../../Auth/AuthProviders/AuthProvider', () => ({ + useAuthProvider: jest.fn().mockImplementation(() => ({ + onLogoutHandler: mockOnLogoutHandler, + })), +})); + +jest.mock('../../../utils/ToastUtils', () => ({ + showErrorToast: jest.fn(), + showSuccessToast: jest.fn(), +})); + +jest.mock('../../../utils/i18next/LocalUtil', () => ({ + Transi18next: ({ children }: { children: ReactNode }) => children, + t: jest.fn().mockImplementation((key: string) => key), +})); + +describe('DeleteEntityModal', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('should render header, both options and action buttons without a text input', async () => { + render(); + + expect(await screen.findByTestId('delete-modal')).toBeInTheDocument(); + expect(await screen.findByTestId('modal-header')).toBeInTheDocument(); + expect(await screen.findByTestId('soft-delete')).toBeInTheDocument(); + expect(await screen.findByTestId('hard-delete')).toBeInTheDocument(); + expect(await screen.findByTestId('discard-button')).toBeInTheDocument(); + expect(await screen.findByTestId('confirm-button')).toBeInTheDocument(); + expect( + screen.queryByTestId('confirmation-text-input') + ).not.toBeInTheDocument(); + }); + + it('should confirm without requiring typed confirmation', async () => { + render(); + + const confirmButton = await screen.findByTestId('confirm-button'); + + expect(confirmButton).not.toBeDisabled(); + + await act(async () => { + fireEvent.click(confirmButton); + }); + + expect(deleteEntity).toHaveBeenCalled(); + }); + + it('should call onCancel when discard is clicked', async () => { + render(); + + fireEvent.click(await screen.findByTestId('discard-button')); + + expect(mockProps.onCancel).toHaveBeenCalled(); + }); + + it('should not logout when deleting a different user', async () => { + render(); + + fireEvent.click(await screen.findByTestId('hard-delete')); + + await act(async () => { + fireEvent.click(screen.getByTestId('confirm-button')); + }); + + expect(mockOnLogoutHandler).not.toHaveBeenCalled(); + }); + + it('should logout when deleting the current user', async () => { + render(); + + fireEvent.click(await screen.findByTestId('hard-delete')); + + await act(async () => { + fireEvent.click(screen.getByTestId('confirm-button')); + }); + + expect(mockOnLogoutHandler).toHaveBeenCalled(); + }); +}); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx new file mode 100644 index 000000000000..8cbd1a06ef68 --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx @@ -0,0 +1,305 @@ +/* + * Copyright 2025 Collate. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { + Button, + Dialog, + FeaturedIcon, + Modal, + ModalOverlay, + RadioButton, + RadioGroup, + Typography, +} from '@openmetadata/ui-core-components'; +import { Trash01 } from '@untitledui/icons'; +import { AxiosError } from 'axios'; +import classNames from 'classnames'; +import { startCase } from 'lodash'; +import { useCallback, useEffect, useMemo, useState } from 'react'; +import { useTranslation } from 'react-i18next'; +import { useAsyncDeleteProvider } from '../../../context/AsyncDeleteProvider/AsyncDeleteProvider'; +import { EntityType } from '../../../enums/entity.enum'; +import { useApplicationStore } from '../../../hooks/useApplicationStore'; +import { deleteEntity } from '../../../rest/miscAPI'; +import deleteWidgetClassBase from '../../../utils/DeleteWidget/DeleteWidgetClassBase'; +import { showErrorToast, showSuccessToast } from '../../../utils/ToastUtils'; +import { useAuthProvider } from '../../Auth/AuthProviders/AuthProvider'; +import { + DeleteType, + DeleteWidgetFormFields, + DeleteWidgetModalProps, +} from './DeleteWidget.interface'; + +const DeleteEntityModal = ({ + allowSoftDelete = true, + visible, + deleteMessage, + softDeleteMessagePostFix = '', + hardDeleteMessagePostFix = '', + entityName, + entityType, + onCancel, + entityId, + prepareType = true, + isAsyncDelete = false, + isRecursiveDelete, + afterDeleteAction, + successMessage, + deleteOptions, + onDelete, + isDeleting = false, +}: DeleteWidgetModalProps) => { + const { t } = useTranslation(); + const { currentUser } = useApplicationStore(); + const { onLogoutHandler } = useAuthProvider(); + const { handleOnAsyncEntityDeleteConfirm } = useAsyncDeleteProvider(); + const [deletionType, setDeletionType] = useState( + allowSoftDelete ? DeleteType.SOFT_DELETE : DeleteType.HARD_DELETE + ); + const [isLoading, setIsLoading] = useState(false); + const entityTypeName = useMemo(() => startCase(entityType), [entityType]); + + const DELETE_OPTION = useMemo( + () => [ + { + title: t('label.soft-delete'), + description: ( + <> + {t('message.soft-delete-common-message', { + entity: entityTypeName.toLowerCase(), + })} + {softDeleteMessagePostFix} + + ), + type: DeleteType.SOFT_DELETE, + isAllowed: allowSoftDelete, + }, + { + title: t('label.permanently-delete'), + description: ( + <> + {deleteMessage ?? + t('message.permanently-delete-common-message', { + entity: entityTypeName.toLowerCase(), + })} + {hardDeleteMessagePostFix} + + ), + type: DeleteType.HARD_DELETE, + isAllowed: true, + }, + ], + [ + t, + entityTypeName, + softDeleteMessagePostFix, + allowSoftDelete, + deleteMessage, + hardDeleteMessagePostFix, + ] + ); + + const options = useMemo( + () => (deleteOptions ?? DELETE_OPTION).filter((option) => option.isAllowed), + [deleteOptions, DELETE_OPTION] + ); + + const handleOnEntityDeleteCancel = useCallback(() => { + setDeletionType( + allowSoftDelete ? DeleteType.SOFT_DELETE : DeleteType.HARD_DELETE + ); + onCancel(); + }, [onCancel, allowSoftDelete]); + + const handleOnEntityDeleteConfirm = useCallback( + async ({ deleteType }: DeleteWidgetFormFields) => { + try { + setIsLoading(true); + const response = await deleteEntity( + prepareType + ? deleteWidgetClassBase.prepareEntityType(entityType) + : entityType, + entityId ?? '', + Boolean(isRecursiveDelete), + deleteType === DeleteType.HARD_DELETE + ); + if (response.status === 200) { + showSuccessToast( + successMessage ?? + t('server.entity-deleted-successfully', { + entity: entityName, + }) + ); + + if (entityType === EntityType.USER && entityId === currentUser?.id) { + onLogoutHandler(); + + return; + } + if (afterDeleteAction) { + afterDeleteAction( + deletionType === DeleteType.SOFT_DELETE, + response.data.version + ); + } + } else { + showErrorToast(t('server.unexpected-response')); + } + } catch (error) { + showErrorToast( + error as AxiosError, + t('server.delete-entity-error', { + entity: entityName, + }) + ); + } finally { + handleOnEntityDeleteCancel(); + setIsLoading(false); + } + }, + [ + entityType, + entityId, + isRecursiveDelete, + deletionType, + afterDeleteAction, + entityName, + handleOnEntityDeleteCancel, + currentUser?.id, + ] + ); + + const onConfirm = useCallback(async () => { + const values: DeleteWidgetFormFields = { + deleteType: deletionType, + deleteTextInput: '', + }; + if (isAsyncDelete) { + setIsLoading(true); + await handleOnAsyncEntityDeleteConfirm({ + entityName, + entityId: entityId ?? '', + entityType, + deleteType: deletionType, + prepareType, + isRecursiveDelete: isRecursiveDelete ?? false, + afterDeleteAction, + }); + setIsLoading(false); + handleOnEntityDeleteCancel(); + } else { + onDelete ? onDelete(values) : handleOnEntityDeleteConfirm(values); + } + }, [ + deletionType, + isAsyncDelete, + entityId, + onDelete, + entityName, + entityType, + prepareType, + isRecursiveDelete, + handleOnAsyncEntityDeleteConfirm, + handleOnEntityDeleteConfirm, + handleOnEntityDeleteCancel, + afterDeleteAction, + ]); + + useEffect(() => { + setDeletionType( + allowSoftDelete ? DeleteType.SOFT_DELETE : DeleteType.HARD_DELETE + ); + }, [allowSoftDelete, visible]); + + useEffect(() => { + setIsLoading(isDeleting); + }, [isDeleting]); + + return ( + + !isOpen && !isLoading && handleOnEntityDeleteCancel() + }> + + + + + + {t('label.delete')} "{entityName}" {entityTypeName} + + + + setDeletionType(value as DeleteType)}> + {options.map((option) => ( + + classNames( + 'tw:cursor-pointer tw:rounded-xl tw:border tw:p-4 tw:transition-colors', + isSelected + ? 'tw:border-brand tw:ring-1 tw:ring-brand' + : 'tw:border-secondary' + ) + } + data-testid={option.type} + hint={option.description} + key={option.type} + label={option.title} + size="md" + value={option.type} + /> + ))} + + + + + + + + + + ); +}; + +export default DeleteEntityModal; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteWidgetModal.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteWidgetModal.test.tsx deleted file mode 100644 index 07b8eb24d1e0..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteWidgetModal.test.tsx +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright 2022 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { act, fireEvent, render, screen } from '@testing-library/react'; -import userEvent from '@testing-library/user-event'; -import { ReactNode } from 'react'; -import { EntityType } from '../../../enums/entity.enum'; -import { mockUserData } from '../../../mocks/MyDataPage.mock'; -import { DeleteWidgetModalProps } from './DeleteWidget.interface'; -import DeleteWidgetModal from './DeleteWidgetModal'; - -const mockProps: DeleteWidgetModalProps = { - visible: true, - onCancel: jest.fn(), - entityName: 'entityName', - entityType: EntityType.TABLE, - entityId: 'entityId', -}; - -const mockPropsUser: DeleteWidgetModalProps = { - visible: true, - onCancel: jest.fn(), - entityName: 'entityName', - entityType: EntityType.USER, - entityId: mockUserData.id, -}; - -const mockOnLogoutHandler = jest.fn(); - -jest.mock('../../../rest/miscAPI', () => ({ - deleteEntity: jest.fn().mockImplementation(() => - Promise.resolve({ - status: 200, - }) - ), -})); - -jest.mock('../../../hooks/useApplicationStore', () => ({ - useApplicationStore: jest.fn(() => ({ - currentUser: mockUserData, - })), -})); - -jest.mock('../../Auth/AuthProviders/AuthProvider', () => ({ - useAuthProvider: jest.fn().mockImplementation(() => ({ - onLogoutHandler: mockOnLogoutHandler, - })), -})); - -jest.mock('../../../utils/ToastUtils', () => ({ - showSuccessToast: jest.fn(), -})); - -jest.mock('../../../utils/i18next/LocalUtil', () => ({ - Transi18next: ({ children }: { children: ReactNode }) => children, - t: jest.fn().mockImplementation((key: string) => key), -})); - -describe('Test DeleteWidgetV1 Component', () => { - it('Component should render properly', async () => { - render(); - - const deleteModal = await screen.findByTestId('delete-modal'); - const footer = await screen.findByTestId('footer'); - const discardButton = await screen.findByTestId('discard-button'); - const confirmButton = await screen.findByTestId('confirm-button'); - const softDelete = await screen.findByTestId('soft-delete'); - const hardDelete = await screen.findByTestId('hard-delete'); - const inputBox = await screen.findByTestId('confirmation-text-input'); - - expect(deleteModal).toBeInTheDocument(); - expect(footer).toBeInTheDocument(); - expect(discardButton).toBeInTheDocument(); - expect(confirmButton).toBeInTheDocument(); - expect(softDelete).toBeInTheDocument(); - expect(hardDelete).toBeInTheDocument(); - expect(inputBox).toBeInTheDocument(); - }); - - it('Delete click should work properly', async () => { - render(); - - const inputBox = await screen.findByTestId('confirmation-text-input'); - const confirmButton = await screen.findByTestId('confirm-button'); - const hardDelete = await screen.findByTestId('hard-delete'); - - fireEvent.click(hardDelete); - - fireEvent.change(inputBox, { target: { value: 'DELETE' } }); - - expect(confirmButton).not.toBeDisabled(); - - fireEvent.click(confirmButton); - }); - - it('Delete click should work properly regardless of capitalization', async () => { - render(); - - const inputBox = await screen.findByTestId('confirmation-text-input'); - const confirmButton = await screen.findByTestId('confirm-button'); - const hardDelete = await screen.findByTestId('hard-delete'); - - fireEvent.click(hardDelete); - - fireEvent.change(inputBox, { target: { value: 'delete' } }); - - expect(confirmButton).not.toBeDisabled(); - - userEvent.click(confirmButton); - }); - - it('Discard click should work properly', async () => { - render(); - const discardButton = await screen.findByTestId('discard-button'); - - fireEvent.click(discardButton); - - expect(mockProps.onCancel).toHaveBeenCalled(); - }); - - it('onLogoutHandler should not be called if entityType is user and EntityId and CurrentUser id is different', async () => { - render(); - - const confirmButton = screen.getByTestId('confirm-button'); - - fireEvent.click(screen.getByTestId('hard-delete')); - - fireEvent.change(screen.getByTestId('confirmation-text-input'), { - target: { value: 'DELETE' }, - }); - - expect(confirmButton).not.toBeDisabled(); - - await act(async () => { - fireEvent.click(confirmButton); - }); - - expect(mockOnLogoutHandler).not.toHaveBeenCalled(); - }); - - it('onLogoutHandler should be called if entityType is user and EntityId and CurrentUser id is same', async () => { - render(); - - const confirmButton = screen.getByTestId('confirm-button'); - - fireEvent.click(screen.getByTestId('hard-delete')); - - fireEvent.change(screen.getByTestId('confirmation-text-input'), { - target: { value: 'DELETE' }, - }); - - expect(confirmButton).not.toBeDisabled(); - - await act(async () => { - fireEvent.click(confirmButton); - }); - - expect(mockOnLogoutHandler).toHaveBeenCalled(); - }); -}); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteWidgetModal.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteWidgetModal.tsx deleted file mode 100644 index 4c7545304bbe..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteWidgetModal.tsx +++ /dev/null @@ -1,391 +0,0 @@ -/* - * Copyright 2022 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { - Button, - Form, - Modal, - Radio, - RadioChangeEvent, - Space, - Typography, -} from 'antd'; -import Input, { InputRef } from 'antd/lib/input/Input'; -import { AxiosError } from 'axios'; -import { startCase } from 'lodash'; -import { - ChangeEvent, - useCallback, - useEffect, - useMemo, - useRef, - useState, -} from 'react'; -import { useTranslation } from 'react-i18next'; -import { useAsyncDeleteProvider } from '../../../context/AsyncDeleteProvider/AsyncDeleteProvider'; -import { EntityType } from '../../../enums/entity.enum'; -import { useApplicationStore } from '../../../hooks/useApplicationStore'; -import { deleteEntity } from '../../../rest/miscAPI'; -import deleteWidgetClassBase from '../../../utils/DeleteWidget/DeleteWidgetClassBase'; -import { Transi18next } from '../../../utils/i18next/LocalUtil'; -import { showErrorToast, showSuccessToast } from '../../../utils/ToastUtils'; -import { useAuthProvider } from '../../Auth/AuthProviders/AuthProvider'; -import './delete-widget-modal.style.less'; -import { - DeleteType, - DeleteWidgetFormFields, - DeleteWidgetModalProps, -} from './DeleteWidget.interface'; - -export const DELETE_CONFIRMATION_TEXT = 'DELETE'; - -const DeleteWidgetModal = ({ - allowSoftDelete = true, - visible, - deleteMessage, - softDeleteMessagePostFix = '', - hardDeleteMessagePostFix = '', - entityName, - entityType, - onCancel, - entityId, - prepareType = true, - isAsyncDelete = false, - isRecursiveDelete, - afterDeleteAction, - successMessage, - deleteOptions, - onDelete, - isDeleting = false, -}: DeleteWidgetModalProps) => { - const { t } = useTranslation(); - const [form] = Form.useForm(); - const { currentUser } = useApplicationStore(); - const { onLogoutHandler } = useAuthProvider(); - const { handleOnAsyncEntityDeleteConfirm } = useAsyncDeleteProvider(); - const [deleteConfirmationText, setDeleteConfirmationText] = - useState(''); - const [deletionType, setDeletionType] = useState( - allowSoftDelete ? DeleteType.SOFT_DELETE : DeleteType.HARD_DELETE - ); - const [isLoading, setIsLoading] = useState(false); - const deleteTextInputRef = useRef(null); - const entityTypeName = useMemo(() => { - return startCase(entityType); - }, [entityType]); - - const DELETE_OPTION = useMemo( - () => [ - { - title: `${t('label.delete')} ${entityTypeName} "${entityName}"`, - description: ( - <> - {deleteWidgetClassBase.getDeleteMessage( - entityName, - entityType, - true - )} - {softDeleteMessagePostFix} - - ), - type: DeleteType.SOFT_DELETE, - isAllowed: allowSoftDelete, - }, - { - title: `${t( - 'label.permanently-delete' - )} ${entityTypeName} "${entityName}"`, - description: ( - <> - {deleteMessage ?? - deleteWidgetClassBase.getDeleteMessage(entityName, entityType)} - {hardDeleteMessagePostFix} - - ), - type: DeleteType.HARD_DELETE, - isAllowed: true, - }, - ], - [ - entityType, - entityName, - softDeleteMessagePostFix, - allowSoftDelete, - deleteMessage, - hardDeleteMessagePostFix, - ] - ); - - const handleOnChange = useCallback((e: ChangeEvent) => { - setDeleteConfirmationText(e.target.value); - }, []); - - const handleOnEntityDeleteCancel = useCallback(() => { - setDeleteConfirmationText(''); - setDeletionType( - allowSoftDelete ? DeleteType.SOFT_DELETE : DeleteType.HARD_DELETE - ); - onCancel(); - }, [onCancel, allowSoftDelete]); - - const isDeleteTextPresent = useMemo(() => { - return ( - deleteConfirmationText.toLowerCase() === - DELETE_CONFIRMATION_TEXT.toLowerCase() && - (deletionType === DeleteType.SOFT_DELETE || - deletionType === DeleteType.HARD_DELETE) - ); - }, [deleteConfirmationText, deletionType]); - - const handleOnEntityDeleteConfirm = useCallback( - async ({ deleteType }: DeleteWidgetFormFields) => { - try { - setIsLoading(true); - const response = await deleteEntity( - prepareType - ? deleteWidgetClassBase.prepareEntityType(entityType) - : entityType, - entityId ?? '', - Boolean(isRecursiveDelete), - deleteType === DeleteType.HARD_DELETE - ); - if (response.status === 200) { - showSuccessToast( - successMessage ?? - t('server.entity-deleted-successfully', { - entity: entityName, - }) - ); - - if (entityType === EntityType.USER && entityId === currentUser?.id) { - onLogoutHandler(); - - return; - } - if (afterDeleteAction) { - afterDeleteAction( - deletionType === DeleteType.SOFT_DELETE, - response.data.version - ); - } - } else { - showErrorToast(t('server.unexpected-response')); - } - } catch (error) { - showErrorToast( - error as AxiosError, - t('server.delete-entity-error', { - entity: entityName, - }) - ); - } finally { - if (isDeleteTextPresent) { - handleOnEntityDeleteCancel(); - } - setIsLoading(false); - } - }, - [ - entityType, - entityId, - isRecursiveDelete, - deletionType, - afterDeleteAction, - entityName, - handleOnEntityDeleteCancel, - isDeleteTextPresent, - currentUser?.id, - ] - ); - - const onFormFinish = useCallback( - async (values: DeleteWidgetFormFields) => { - if (isAsyncDelete) { - setIsLoading(true); - await handleOnAsyncEntityDeleteConfirm({ - entityName, - entityId: entityId ?? '', - entityType, - deleteType: values.deleteType, - prepareType, - isRecursiveDelete: isRecursiveDelete ?? false, - afterDeleteAction, - }); - setIsLoading(false); - handleOnEntityDeleteCancel(); - } else { - onDelete ? onDelete(values) : handleOnEntityDeleteConfirm(values); - } - }, - [ - entityId, - onDelete, - entityName, - entityType, - prepareType, - isRecursiveDelete, - handleOnEntityDeleteConfirm, - handleOnEntityDeleteCancel, - afterDeleteAction, - ] - ); - - const onChange = useCallback((e: RadioChangeEvent) => { - const value = e.target.value; - setDeletionType(value); - }, []); - - useEffect(() => { - let timeout: number; - - if (visible) { - // using setTimeout here as directly calling focus() doesn't focus element after first time - timeout = window.setTimeout(() => { - deleteTextInputRef.current?.focus(); - }, 1); - } - - return () => { - clearTimeout(timeout); - }; - }, [visible, deleteTextInputRef]); - - useEffect(() => { - setDeletionType( - allowSoftDelete ? DeleteType.SOFT_DELETE : DeleteType.HARD_DELETE - ); - }, [allowSoftDelete]); - - const handleConfirmClick = useCallback(() => form.submit(), []); - - const footer = useMemo(() => { - return ( - - - - - - ); - }, [handleOnEntityDeleteCancel, isDeleteTextPresent, isLoading]); - - useEffect(() => { - // Resetting the form values on visibility change - // Using setFieldsValue instead of resetValue as the default value to be set - // is dynamic i.e. dependent on allowSoftDelete prop which sets it to undefined - // if reset using resetValue - form.setFieldsValue({ - deleteType: allowSoftDelete - ? DeleteType.SOFT_DELETE - : DeleteType.HARD_DELETE, - deleteTextInput: '', - }); - }, [visible]); - - useEffect(() => { - setIsLoading(isDeleting); - }, [isDeleting]); - - return ( - // Used Button to stop click propagation event in the - // TeamDetailsV1 and User.component collapsible panel. - - ); -}; - -export default DeleteWidgetModal; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/delete-widget-modal.style.less b/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/delete-widget-modal.style.less deleted file mode 100644 index acfea73a4b46..000000000000 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/delete-widget-modal.style.less +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2023 Collate. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -.delete-widget-title { - font-weight: 500; - - &.ant-typography { - margin-bottom: 4px; - } -} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/EntityPageInfos/ManageButton/ManageButton.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/EntityPageInfos/ManageButton/ManageButton.test.tsx index 414eeb588f1e..95b5fd84efa7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/EntityPageInfos/ManageButton/ManageButton.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/EntityPageInfos/ManageButton/ManageButton.test.tsx @@ -19,8 +19,8 @@ jest.mock('../../../../utils/AnnouncementsUtils', () => ({ ANNOUNCEMENT_ENTITIES: ['table', 'topic', 'dashboard', 'pipeline'], })); -jest.mock('../../DeleteWidget/DeleteWidgetModal', () => { - return jest.fn().mockReturnValue(
DeleteWidgetModal
); +jest.mock('../../DeleteWidget/DeleteEntityModal', () => { + return jest.fn().mockReturnValue(
DeleteEntityModal
); }); const mockAnnouncementClick = jest.fn(); @@ -79,7 +79,7 @@ describe('Test manage button component', () => { fireEvent.click(deleteOption); - expect(await screen.findByText('DeleteWidgetModal')).toBeInTheDocument(); + expect(await screen.findByText('DeleteEntityModal')).toBeInTheDocument(); }); it('Should call announcement callback on click of announcement option', async () => { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/EntityPageInfos/ManageButton/ManageButton.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/EntityPageInfos/ManageButton/ManageButton.tsx index 9f917dd8108d..f50780d79544 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/EntityPageInfos/ManageButton/ManageButton.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/EntityPageInfos/ManageButton/ManageButton.tsx @@ -32,7 +32,7 @@ import entityUtilClassBase from '../../../../utils/EntityUtilClassBase'; import { showErrorToast } from '../../../../utils/ToastUtils'; import EntityNameModal from '../../../Modals/EntityNameModal/EntityNameModal.component'; import { EntityName } from '../../../Modals/EntityNameModal/EntityNameModal.interface'; -import DeleteWidgetModal from '../../DeleteWidget/DeleteWidgetModal'; +import DeleteEntityModal from '../../DeleteWidget/DeleteEntityModal'; import { ManageButtonItemLabel } from '../../ManageButtonContentItem/ManageButtonContentItem.component'; import { ManageButtonProps } from './ManageButton.interface'; import './ManageButton.less'; @@ -305,7 +305,7 @@ const ManageButton: FC = ({ <> {items.length ? renderDropdownTrigger() : null} {isDelete && ( - {{entityName}} إلى فقدان تكوين المسار (pipeline)، ولا يمكن استعادته.", "permanently-delete-metadata": "سيؤدي الحذف الدائم لـ <0>{{entityName}} إلى إزالة بياناته الوصفية من {{brandName}}، ولا يمكن استعادته.", "permanently-delete-metadata-and-dependents": "سيؤدي الحذف الدائم لـ {{entityName}} إلى إزالة بياناته الوصفية، وكذلك البيانات الوصفية لـ {{dependents}} من {{brandName}} بشكل دائم.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "تطور حجم الأصول في المنظمة.", "smart-sampling-hint": "يُحسِّن الموارد بناءً على حجم البيانات", "soft-delete-archive-message": "سيؤدي هذا الإجراء إلى تعطيل الوصول إلى {{entity}}. يمكنك استعادته لاحقًا من الأرشيف.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "سيؤدي الحذف الناعم (Soft deleting) إلى إلغاء تنشيط {{entity}}. سيؤدي هذا إلى تعطيل أي عمليات اكتشاف أو قراءة أو كتابة على {{entity}}.", "soft-delete-message-for-n-entities": "سيؤدي الحذف الناعم إلى إلغاء تنشيط {{count}} {{entity}}. سيؤدي هذا إلى تعطيل أي عمليات اكتشاف أو قراءة أو كتابة عليها.", "something-went-wrong": "حدث خطأ ما", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json index 510afa31df79..d4020d94afba 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json @@ -3637,6 +3637,7 @@ "password-error-message": "Das Passwort muss mindestens 8 und maximal 56 Zeichen lang sein und mindestens einen Großbuchstaben (A-Z), einen Kleinbuchstaben (a-z), eine Zahl und ein Sonderzeichen (z. B. !, %, @ oder #) enthalten.", "password-pattern-error": "Das Passwort muss mindestens 8 und maximal 56 Zeichen lang sein und mindestens einen Sonderbuchstaben, einen Großbuchstaben und einen Kleinbuchstaben enthalten.", "path-of-the-dbt-files-stored": "Pfad zum Ordner, in dem die dbt-Dateien gespeichert sind", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "Das dauerhafte Löschen von <0>{{entityName}} führt zum Verlust der Pipeline-Konfiguration und kann nicht wiederhergestellt werden.", "permanently-delete-metadata": "Das dauerhafte Löschen dieses <0>{{entityName}} entfernt seine Metadaten dauerhaft aus {{brandName}}.", "permanently-delete-metadata-and-dependents": "Das dauerhafte Löschen dieses {{entityName}} entfernt seine Metadaten sowie die Metadaten von {{dependents}} dauerhaft aus {{brandName}}.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "Größenentwicklung der Assets in der Organisation.", "smart-sampling-hint": "Optimiert Ressourcen basierend auf der Datengröße", "soft-delete-archive-message": "Diese Aktion deaktiviert den Zugriff auf {{entity}}. Sie können es später aus dem Archiv wiederherstellen.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "Durch das Soft-Löschen wird {{entity}} deaktiviert. Dadurch werden alle Entdeckungs-, Lese- oder Schreibvorgänge auf {{entity}} deaktiviert.", "soft-delete-message-for-n-entities": "Das vorläufige Löschen deaktiviert diese {{count}} {{entity}}. Dadurch werden alle Erkennungs-, Lese- oder Schreibvorgänge für sie deaktiviert.", "something-went-wrong": "Etwas ist schiefgelaufen", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json index 33cef3d95b33..114985356b56 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json @@ -3637,6 +3637,7 @@ "password-error-message": "Password must be a minimum of 8 and a maximum of 56 characters long and contain at least one uppercase character (A-Z), one lowercase character (a-z), one number, and one special character (such as !, %, @, or #)", "password-pattern-error": "Password must be of minimum 8 and maximum 56 characters, with one special , one upper, one lower case character", "path-of-the-dbt-files-stored": "Path of the folder where the dbt files are stored", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "Permanently deleting this <0>{{entityName}} will result in loss of pipeline configuration, and it cannot be recovered.", "permanently-delete-metadata": "Permanently deleting this <0>{{entityName}} will result in the removal of its metadata from {{brandName}}, and it cannot be recovered.", "permanently-delete-metadata-and-dependents": "Permanently deleting this {{entityName}} will remove its metadata, as well as the metadata of {{dependents}} from {{brandName}} permanently.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "Size evolution of assets in organization.", "smart-sampling-hint": "Optimizes resources based on data size", "soft-delete-archive-message": "This action will disable access to the {{entity}}. You can restore it later from Archives.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "Soft deleting will deactivate the {{entity}}. This will disable any discovery, read or write operations on {{entity}}.", "soft-delete-message-for-n-entities": "Soft deleting will deactivate these {{count}} {{entity}}. This will disable any discovery, read or write operations on them.", "something-went-wrong": "Something went wrong", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json index 9927caa3cd65..035802f976dd 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json @@ -3637,6 +3637,7 @@ "password-error-message": "La contraseña debe tener como mínimo 8 y como máximo 56 caracteres, con al menos una letra mayúscula, una letra minúscula, un número y un carácter especial (como !, %, @ o #)", "password-pattern-error": "La contraseña debe tener como mínimo 8 y como máximo 56 caracteres, con al menos una letra mayúscula, una letra minúscula, un número y un carácter especial (como !, %, @ o #)", "path-of-the-dbt-files-stored": "Ruta de la carpeta donde se almacenan los archivos dbt", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "Al eliminar permanentemente este <0>{{entityName}}, se perderá la configuración de la pipeline, y no podrá ser recuperada.", "permanently-delete-metadata": "Al eliminar permanentemente este <0>{{entityName}}, se eliminarán sus metadatos de {{brandName}} permanentemente.", "permanently-delete-metadata-and-dependents": "Al eliminar permanentemente este {{entityName}}, se eliminarán sus metadatos, así como los metadatos de {{dependents}} de {{brandName}} permanentemente.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "Evolución del tamaño de los activos en la organización.", "smart-sampling-hint": "Optimiza los recursos según el tamaño de los datos", "soft-delete-archive-message": "Esta acción deshabilitará el acceso a {{entity}}. Podrás restaurarlo más tarde desde Archivos.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "La eliminación suave desactivará la {{entity}}. Esto deshabilitará cualquier operación de descubrimiento, lectura o escritura en {{entity}}.", "soft-delete-message-for-n-entities": "La eliminación temporal desactivará estos {{count}} {{entity}}. Esto deshabilitará cualquier operación de descubrimiento, lectura o escritura sobre ellos.", "something-went-wrong": "Algo salió mal", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json index 388c9c7595c0..420d4654145d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json @@ -3637,6 +3637,7 @@ "password-error-message": "Le mot de passe doit comporter au moins 8 caractères et au plus 56 caractères et doit contenir au moins une lettre majuscule (A-Z), une lettre minuscule (a-z), un chiffre et un caractère spécial (tel que !, %, @ ou #).", "password-pattern-error": "Le mot de passe doit comporter au moins 8 caractères et au plus 56 caractères, avec un caractère spécial, une lettre majuscule et une lettre minuscule.", "path-of-the-dbt-files-stored": "Chemin du dossier où sont situés les fichiers dbt.", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "La suppression définitive de <0>{{entityName}} entraînera la perte de la configuration du pipeline et ne pourra pas être récupérée.", "permanently-delete-metadata": "La suppression permanente de cette <0>{{entityName}} supprimera ses métadonnées de façon permanente d'{{brandName}}.", "permanently-delete-metadata-and-dependents": "La suppression permanente de cette {{entityName}} supprimera ses métadonnées ainsi que les métadonnées de {{dependents}} de façon permanente d'{{brandName}}.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "Evolution de la taille des actifs dans l'organisation.", "smart-sampling-hint": "Optimise les ressources en fonction de la taille des données", "soft-delete-archive-message": "Cette action désactivera l'accès à {{entity}}. Vous pourrez le restaurer plus tard depuis les Archives.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "La suppression logique désactivera le {{entity}}. Cela désactivera toute découverte, lecture ou écriture sur le {{entity}}.", "soft-delete-message-for-n-entities": "La suppression logique désactivera ces {{count}} {{entity}}. Cela désactivera toutes les opérations de découverte, de lecture ou d'écriture sur eux.", "something-went-wrong": "Quelque chose s'est mal passé", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/gl-es.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/gl-es.json index 12b310e4817c..9269c7cf8184 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/gl-es.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/gl-es.json @@ -3637,6 +3637,7 @@ "password-error-message": "O contrasinal debe ter un mínimo de 8 e un máximo de 56 caracteres e conter polo menos unha maiúscula (A-Z), unha minúscula (a-z), un número e un carácter especial (como !, %, @ ou #)", "password-pattern-error": "O contrasinal debe ter un mínimo de 8 e un máximo de 56 caracteres, cun carácter especial, unha maiúscula e unha minúscula", "path-of-the-dbt-files-stored": "Ruta do cartafol onde se almacenan os ficheiros dbt", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "A eliminación permanente deste <0>{{entityName}} provocará a perda da configuración da canalización e non se poderá recuperar.", "permanently-delete-metadata": "Eliminar permanentemente este <0>{{entityName}} eliminará os seus metadatos de {{brandName}} e non poderá recuperarse.", "permanently-delete-metadata-and-dependents": "Eliminar permanentemente este {{entityName}} eliminará os seus metadatos, así como os metadatos de {{dependents}} de {{brandName}} de forma permanente.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "Evolución do tamaño dos activos na organización.", "smart-sampling-hint": "Optimiza os recursos segundo o tamaño dos datos", "soft-delete-archive-message": "Esta acción desactivará o acceso a {{entity}}. Poderás restauralo máis tarde desde Arquivos.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "A eliminación suave desactivará {{entity}}. Isto desactivará calquera operación de descubrimento, lectura ou escritura en {{entity}}.", "soft-delete-message-for-n-entities": "A eliminación suave desactivará estes {{count}} {{entity}}. Isto desactivará calquera operación de descubrimento, lectura ou escritura sobre eles.", "something-went-wrong": "Algo saíu mal", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json index 930f2ba2fe87..a85f4d3148b4 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json @@ -3637,6 +3637,7 @@ "password-error-message": "יש להזין סיסמה באורך של 8 עד 15 תווים ולכלול לפחות אות גדולה אחת (A-Z), אות קטנה אחת (a-z), מספר אחד ותו מיוחד (כמו !, %, @, או #)", "password-pattern-error": "יש להזין סיסמה באורך של 8 עד 56 תווים, עם תו מיוחד אחד, אות גדולה אחת ואות קטנה אחת", "path-of-the-dbt-files-stored": "נתיב לתיקייה בה נשמרים קבצי ה-dbt", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "מחיקה קבועה של <0>{{entityName}} תגרום לאובדן תצורת הצינור, ולא ניתן יהיה לשחזר אותה.", "permanently-delete-metadata": "מחיקה של {{entityName}} תסיר את המטה-דאטה שלו מ-{{brandName}} לצמיתות.", "permanently-delete-metadata-and-dependents": "מחיקה של {{entityName}} תסיר את המטה-דאטה שלו, כמו גם את המטה-דאטה של {{dependents}} מ-{{brandName}} לצמיתות.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "אבולוציה של גודל הנכסים בארגון.", "smart-sampling-hint": "מייעל משאבים בהתאם לגודל הנתונים", "soft-delete-archive-message": "פעולה זו תשבית את הגישה אל {{entity}}. תוכל לשחזר אותו מאוחר יותר מהארכיון.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "מחיקה רכה תשבית את {{entity}}. הפעולה תשבית כל קריאה או כתיבת הפעולות על {{entity}}.", "soft-delete-message-for-n-entities": "מחיקה רכה תשבית את {{count}} {{entity}} אלה. פעולה זו תשבית כל פעולות גילוי, קריאה או כתיבה עליהם.", "something-went-wrong": "משהו השתבש", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json index 118d12366aa3..a51d847ef28a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json @@ -3637,6 +3637,7 @@ "password-error-message": "パスワードは8文字以上66文字以下で、大文字 (A-Z)、小文字 (a-z)、数字、特殊文字 (!、%、@、# など) をそれぞれ少なくとも1文字含める必要があります。", "password-pattern-error": "パスワードは8~56文字で、1つの特殊文字、大文字1つ、小文字1つが含まれている必要があります。", "path-of-the-dbt-files-stored": "dbtファイルが保存されているフォルダのパス", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "この <0>{{entityName}} を完全に削除すると、パイプライン設定が失われ、元に戻すことはできません。", "permanently-delete-metadata": "この <0>{{entityName}} を完全に削除すると、{{brandName}} からメタデータが完全に削除されます。", "permanently-delete-metadata-and-dependents": "{{entityName}} を完全に削除すると、そのメタデータおよび {{dependents}} のメタデータも {{brandName}} から完全に削除されます。", @@ -3783,6 +3784,7 @@ "size-evolution-description": "組織内アセットのサイズの推移。", "smart-sampling-hint": "データサイズに基づいてリソースを最適化します", "soft-delete-archive-message": "この操作により、{{entity}}へのアクセスが無効になります。後でアーカイブから復元できます。", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "ソフトデリートは{{entity}}を非アクティブ化します。これにより、データの探索や{{entity}}に対する読み取りおよび書き込み操作が無効になります。", "soft-delete-message-for-n-entities": "ソフト削除すると、これらの {{count}} 件の{{entity}}が無効化されます。これにより、それらに対する検出、読み取り、書き込みの操作が無効になります。", "something-went-wrong": "問題が発生しました。", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ko-kr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ko-kr.json index b6dfede562e2..fc84cb10fe8f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ko-kr.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ko-kr.json @@ -3637,6 +3637,7 @@ "password-error-message": "비밀번호는 최소 8자에서 최대 56자 길이여야 하며, 최소 하나의 대문자(A-Z), 하나의 소문자(a-z), 하나의 숫자, 그리고 하나의 특수 문자(!, %, @, # 등)를 포함해야 합니다", "password-pattern-error": "비밀번호는 최소 8자에서 최대 56자 길이여야 하며, 하나의 특수 문자, 하나의 대문자, 하나의 소문자를 포함해야 합니다", "path-of-the-dbt-files-stored": "dbt 파일이 저장된 폴더의 경로", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "이 <0>{{entityName}}을(를) 영구적으로 삭제하면 파이프라인 구성이 손실되며 복구할 수 없습니다.", "permanently-delete-metadata": "이 <0>{{entityName}}을(를) 영구적으로 삭제하면 {{brandName}}에서 해당 메타데이터가 제거되며 복구할 수 없습니다.", "permanently-delete-metadata-and-dependents": "이 {{entityName}}을(를) 영구적으로 삭제하면 해당 메타데이터와 {{dependents}}의 메타데이터가 {{brandName}}에서 영구적으로 제거됩니다.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "조직의 자산 크기 변화.", "smart-sampling-hint": "데이터 크기에 따라 리소스를 최적화합니다", "soft-delete-archive-message": "이 작업은 {{entity}}에 대한 액세스를 비활성화합니다. 나중에 보관함에서 복원할 수 있습니다.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "소프트 삭제는 {{entity}}를 비활성화합니다. 이는 {{entity}}에 대한 모든 검색, 읽기 또는 쓰기 작업을 비활성화합니다.", "soft-delete-message-for-n-entities": "소프트 삭제하면 {{count}}개의 {{entity}}이(가) 비활성화됩니다. 이렇게 하면 해당 항목에 대한 검색, 읽기 또는 쓰기 작업이 비활성화됩니다.", "something-went-wrong": "문제가 발생했습니다", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/mr-in.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/mr-in.json index 38b274cf6258..6af776409180 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/mr-in.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/mr-in.json @@ -3637,6 +3637,7 @@ "password-error-message": "पासवर्ड किमान 8 आणि कमाल 56 वर्णांचा असावा आणि त्यात किमान एक मोठा अक्षर (A-Z), एक लहान अक्षर (a-z), एक संख्या आणि एक विशेष वर्ण (जसे की !, %, @, किंवा #) असावा", "password-pattern-error": "पासवर्ड किमान 8 आणि कमाल 56 वर्णांचा असावा, ज्यात एक विशेष, एक मोठा, एक लहान अक्षर असावा", "path-of-the-dbt-files-stored": "dbt फाइल्स जिथे संग्रहित केल्या आहेत त्या फोल्डरचा पथ", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "हे <0>{{entityName}} कायमचे मिटवल्याने पाइपलाइन संरचना गमावली जाईल आणि ती पुनर्प्राप्त केली जाऊ शकत नाही.", "permanently-delete-metadata": "हे <0>{{entityName}} कायमचे मिटवल्याने त्याचे मेटाडेटा {{brandName}} मधून काढले जाईल आणि ते पुनर्प्राप्त केले जाऊ शकत नाही.", "permanently-delete-metadata-and-dependents": "हे {{entityName}} कायमचे मिटवल्याने त्याचे मेटाडेटा तसेच {{dependents}} चे मेटाडेटा {{brandName}} मधून कायमचे काढले जाईल.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "संस्थेतील ॲसेट्सच्या आकाराची उत्क्रांती.", "smart-sampling-hint": "डेटाच्या आकारावर आधारित संसाधने अनुकूलित करते", "soft-delete-archive-message": "या क्रियेमुळे {{entity}} वरील प्रवेश अक्षम होईल. आपण नंतर ते संग्रहणातून पुनर्संचयित करू शकता.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "सॉफ्ट डिलीट केल्याने {{entity}} निष्क्रिय होईल. हे {{entity}} वर कोणतीही शोध, वाचन किंवा लेखन ऑपरेशन्स अक्षम करेल.", "soft-delete-message-for-n-entities": "सॉफ्ट डिलीट केल्याने हे {{count}} {{entity}} निष्क्रिय होतील. यामुळे त्यांच्यावरील कोणतेही शोध, वाचन किंवा लेखन ऑपरेशन अक्षम होतील.", "something-went-wrong": "काहीतरी चुकले", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json index 26df82e43c83..a2b78ee412c1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json @@ -3637,6 +3637,7 @@ "password-error-message": "Het wachtwoord moet minimaal 8 en maximaal 56 tekens lang zijn en ten minste één hoofdletter (A-Z), één kleine letter (a-z), één cijfer en één speciaal teken (zoals !, %, @ of #) bevatten", "password-pattern-error": "Wachtwoord moet minimaal 8 en maximaal 56 tekens lang zijn, met één speciaal teken, één hoofdletter, één kleine letter", "path-of-the-dbt-files-stored": "Pad naar de map waarin de dbt-bestanden zijn opgeslagen", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "Als u deze <0>{{entityName}} definitief verwijdert, gaat de pijplijnconfiguratie verloren en kan deze niet worden hersteld.", "permanently-delete-metadata": "Het permanent verwijderen van deze <0>{{entityName}} verwijdert de metadata ervan permanent uit {{brandName}}.", "permanently-delete-metadata-and-dependents": "Het permanent verwijderen van deze {{entityName}} verwijdert de metadata ervan, evenals de metadata van {{dependents}} permanent uit {{brandName}}.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "Ontwikkeling assethoeveelheid in de organisatie.", "smart-sampling-hint": "Optimaliseert resources op basis van gegevensgrootte", "soft-delete-archive-message": "Deze actie schakelt de toegang tot {{entity}} uit. U kunt het later herstellen vanuit Archieven.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "Zacht verwijderen zal de {{entity}} deactiveren. Hierdoor worden alle ontdekkings-, lees- of schrijfoperaties op {{entity}} uitgeschakeld.", "soft-delete-message-for-n-entities": "Zacht verwijderen deactiveert deze {{count}} {{entity}}. Dit schakelt alle ontdekkings-, lees- of schrijfbewerkingen op hen uit.", "something-went-wrong": "Er is iets misgegaan", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json index 764cb0ed654f..5e6170611873 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pr-pr.json @@ -3637,6 +3637,7 @@ "password-error-message": "رمز عبور باید حداقل 8 و حداکثر 56 کاراکتر باشد و حداقل یک کاراکتر بزرگ (A-Z)، یک کاراکتر کوچک (a-z)، یک عدد و یک کاراکتر خاص (مثل !، %، @، یا #) داشته باشد.", "password-pattern-error": "رمز عبور باید حداقل 8 و حداکثر 56 کاراکتر، با یک کاراکتر خاص، یک حرف بزرگ و یک حرف کوچک باشد.", "path-of-the-dbt-files-stored": "مسیر پوشه‌ای که فایل‌های dbt در آن ذخیره شده‌اند.", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "حذف دائمی این <0>{{entityName}} منجر به از دست رفتن پیکربندی پایپ‌لاین می‌شود و قابل بازیابی نیست.", "permanently-delete-metadata": "حذف دائم این <0>{{entityName}} منجر به حذف متادیتای آن از {{brandName}} می‌شود و قابل بازیابی نخواهد بود.", "permanently-delete-metadata-and-dependents": "حذف دائمی این {{entityName}} منجر به حذف متادیتای آن و همچنین متادیتای {{dependents}} از {{brandName}} به‌طور دائم می‌شود.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "تحول اندازه دارایی‌ها در سازمان.", "smart-sampling-hint": "Optimizes yer resources based on the size o' yer data, arrr", "soft-delete-archive-message": "Esta ação irá desativar o acesso a {{entity}}. Você poderá restaurá-lo mais tarde a partir de Arquivos.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "حذف نرم، {{entity}} را غیرفعال می‌کند. این اقدام هرگونه عملیات کشف، خواندن یا نوشتن روی {{entity}} را غیرفعال خواهد کرد.", "soft-delete-message-for-n-entities": "Soft deleting will deactivate these {{count}} {{entity}}. This will disable any discovery, read or write operations on them.", "something-went-wrong": "یک خطا رخ داده است.", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json index 47cd49f093e5..9385ec00163d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json @@ -3637,6 +3637,7 @@ "password-error-message": "A senha deve ter no mínimo 8 e no máximo 56 caracteres e conter pelo menos uma letra maiúscula (A-Z), uma letra minúscula (a-z), um número e um caractere especial (como !, %, @ ou #)", "password-pattern-error": "A senha deve ter no mínimo 8 e no máximo 56 caracteres, com pelo menos um caractere especial, uma letra maiúscula e uma letra minúscula", "path-of-the-dbt-files-stored": "Caminho da pasta onde os arquivos dbt são armazenados", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "A exclusão permanente de <0>{{entityName}} resultará na perda da configuração do pipeline e não poderá ser recuperada.", "permanently-delete-metadata": "Excluir permanentemente este(a) <0>{{entityName}} removerá seus metadados do {{brandName}} permanentemente.", "permanently-delete-metadata-and-dependents": "Excluir permanentemente este(a) {{entityName}} removerá seus metadados, bem como os metadados de {{dependents}} do {{brandName}} permanentemente.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "Evolução do tamanho dos ativos na organização.", "smart-sampling-hint": "Otimiza recursos com base no tamanho dos dados", "soft-delete-archive-message": "Esta ação irá desativar o acesso a {{entity}}. Você poderá restaurá-lo mais tarde a partir de Arquivos.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "A exclusão suave desativará o {{entity}}. Isso desabilitará qualquer operação de descoberta, leitura ou gravação no {{entity}}.", "soft-delete-message-for-n-entities": "A exclusão suave desativará estes {{count}} {{entity}}. Isso desabilitará quaisquer operações de descoberta, leitura ou escrita sobre eles.", "something-went-wrong": "Algo deu errado", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-pt.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-pt.json index b861ab7d09ff..5b4914fac9d0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-pt.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-pt.json @@ -3637,6 +3637,7 @@ "password-error-message": "A senha deve ter no mínimo 8 e no máximo 56 caracteres e conter pelo menos uma letra maiúscula (A-Z), uma letra minúscula (a-z), um número e um caracter especial (como !, %, @ ou #)", "password-pattern-error": "A senha deve ter no mínimo 8 e no máximo 56 caracteres, com pelo menos um caracter especial, uma letra maiúscula e uma letra minúscula", "path-of-the-dbt-files-stored": "Caminho da pasta onde os arquivos dbt são armazenados", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "A exclusão permanente deste <0>{{entityName}} resultará na perda da configuração do pipeline e não poderá ser recuperada.", "permanently-delete-metadata": "Excluir permanentemente este(a) <0>{{entityName}} removerá seus metadados do {{brandName}} permanentemente.", "permanently-delete-metadata-and-dependents": "Excluir permanentemente este(a) {{entityName}} removerá seus metadados, bem como os metadados de {{dependents}} do {{brandName}} permanentemente.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "Evolução do tamanho dos ativos na organização.", "smart-sampling-hint": "Otimiza os recursos com base no tamanho dos dados", "soft-delete-archive-message": "Esta ação irá desativar o acesso a {{entity}}. Pode restaurá-lo mais tarde a partir de Arquivos.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "A exclusão suave desativará o {{entity}}. Isso desabilitará qualquer operação de descoberta, leitura ou gravação no {{entity}}.", "soft-delete-message-for-n-entities": "A eliminação suave irá desativar estes {{count}} {{entity}}. Isto irá desativar quaisquer operações de descoberta, leitura ou escrita sobre eles.", "something-went-wrong": "Algo deu errado", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json index 88f1b2b32266..5aa0b4167794 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json @@ -3637,6 +3637,7 @@ "password-error-message": "Пароль должен содержать не менее 8 и не более 56 символов, включая как минимум один символ верхнего регистра (A-Z), один символ нижнего регистра (az), одну цифру и один специальный символ (например, !, %, @ или #). )", "password-pattern-error": "Пароль должен состоять минимум из 8 и максимум из 56 символов, включая один специальный, один верхний и один нижний регистр.", "path-of-the-dbt-files-stored": "Путь к папке, в которой хранятся файлы dbt", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "Безвозвратное удаление <0>{{entityName}} приведет к потере конфигурации конвейера, и его нельзя будет восстановить.", "permanently-delete-metadata": "Внимание! Удаление объекта <0>{{entityName}} невозможно отменить — все метаданные будут утеряны.", "permanently-delete-metadata-and-dependents": "Внимание! Удаление объекта {{entityName}} невозможно отменить — все метаданные, включая {{dependers}} будут утеряны.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "Размер эволюции объектов в организации.", "smart-sampling-hint": "Оптимизирует ресурсы в зависимости от объёма данных", "soft-delete-archive-message": "Это действие отключит доступ к {{entity}}. Вы сможете восстановить его позже из Архива.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "Мягкое удаление деактивирует объект «{{entity}}». Обнаружение объекта, чтение или запись его данных отключатся.", "soft-delete-message-for-n-entities": "Мягкое удаление деактивирует {{count}} {{entity}}. Это отключит все операции обнаружения, чтения или записи для них.", "something-went-wrong": "Что-то пошло не так", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/sv-se.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/sv-se.json index 837a4e1c7f96..e2dacd7db215 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/sv-se.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/sv-se.json @@ -3637,6 +3637,7 @@ "password-error-message": "Lösenordet måste vara minst 8 och högst 56 tecken långt och innehålla minst ett versalt tecken (A-Z), ett gement tecken (a-z), en siffra och ett specialtecken (såsom !, %, @ eller #)", "password-pattern-error": "Lösenordet måste vara minst 8 och högst 56 tecken, med ett specialtecken, ett versalt och ett gement tecken", "path-of-the-dbt-files-stored": "Sökväg till mappen där dbt-filerna lagras", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "Att permanent ta bort denna <0>{{entityName}} resulterar i förlust av pipelinekonfigurationen, och den kan inte återställas.", "permanently-delete-metadata": "Att permanent ta bort denna <0>{{entityName}} resulterar i att dess metadata tas bort från {{brandName}}, och den kan inte återställas.", "permanently-delete-metadata-and-dependents": "Att permanent ta bort denna {{entityName}} tar bort dess metadata samt metadatan för {{dependents}} permanent från {{brandName}}.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "Storleksutveckling av tillgångar i organisationen.", "smart-sampling-hint": "Optimerar resurser baserat på datastorlek", "soft-delete-archive-message": "Den här åtgärden inaktiverar åtkomsten till {{entity}}. Du kan återställa det senare från Arkiv.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "Mjuk borttagning inaktiverar {{entity}}. Detta inaktiverar all upptäckt, läs- eller skrivoperationer på {{entity}}.", "soft-delete-message-for-n-entities": "Mjuk radering inaktiverar dessa {{count}} {{entity}}. Det inaktiverar all sökning, läs- och skrivoperationer på dem.", "something-went-wrong": "Något gick fel", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/th-th.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/th-th.json index fafe21f7313e..3f66366f5fde 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/th-th.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/th-th.json @@ -3637,6 +3637,7 @@ "password-error-message": "รหัสผ่านต้องมีความยาวขั้นต่ำ 8 ตัวและสูงสุด 56 ตัว และต้องมีอย่างน้อยหนึ่งตัวอักษรพิมพ์ใหญ่ (A-Z), หนึ่งตัวอักษรพิมพ์เล็ก (a-z), หนึ่งตัวเลข, และหนึ่งอักขระพิเศษ (เช่น !, %, @, หรือ #)", "password-pattern-error": "รหัสผ่านต้องมีความยาวขั้นต่ำ 8 ตัวและสูงสุด 56 ตัว มีอักขระพิเศษหนึ่งตัว, ตัวอักษรพิมพ์ใหญ่หนึ่งตัว, ตัวอักษรพิมพ์เล็กหนึ่งตัว", "path-of-the-dbt-files-stored": "เส้นทางของโฟลเดอร์ที่จัดเก็บไฟล์ dbt", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "การลบ <0>{{entityName}} นี้อย่างถาวรจะทำให้การตั้งค่าท่อสูญหายและไม่สามารถกู้คืนได้", "permanently-delete-metadata": "การลบ <0>{{entityName}} นี้อย่างถาวรจะทำให้ข้อมูลเมตาของมันถูกลบออกจาก {{brandName}} และไม่สามารถกู้คืนได้", "permanently-delete-metadata-and-dependents": "การลบ {{entityName}} นี้อย่างถาวรจะทำให้ข้อมูลเมตาของมันและข้อมูลเมตาของ {{dependents}} ถูกลบออกจาก {{brandName}} อย่างถาวร", @@ -3783,6 +3784,7 @@ "size-evolution-description": "การพัฒนาขนาดของสินทรัพย์ในองค์กร", "smart-sampling-hint": "เพิ่มประสิทธิภาพทรัพยากรตามขนาดของข้อมูล", "soft-delete-archive-message": "การดำเนินการนี้จะปิดการเข้าถึง {{entity}} คุณสามารถกู้คืนได้ภายหลังจากที่เก็บถาวร", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "การลบแบบนุ่มนวลจะทำให้ {{entity}} ถูกปิดการใช้งาน ซึ่งจะปิดการค้นหา, อ่าน หรือการเขียนข้อมูลใน {{entity}}", "soft-delete-message-for-n-entities": "การลบแบบ Soft Delete จะปิดการใช้งาน {{count}} {{entity}} เหล่านี้ ซึ่งจะปิดการใช้งานการค้นหา การอ่าน หรือการเขียนทั้งหมดบนรายการเหล่านั้น", "something-went-wrong": "เกิดข้อผิดพลาดบางอย่าง", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/tr-tr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/tr-tr.json index 8e311a8f08be..09d5c56ff776 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/tr-tr.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/tr-tr.json @@ -3637,6 +3637,7 @@ "password-error-message": "Şifre en az 8 ve en fazla 56 karakter uzunluğunda olmalı ve en az bir büyük harf (A-Z), bir küçük harf (a-z), bir rakam ve bir özel karakter ( !, %, @ veya # gibi) içermelidir.", "password-pattern-error": "Şifre en az 8 ve en fazla 56 karakterden oluşmalı, bir özel karakter, bir büyük harf, bir küçük harf içermelidir", "path-of-the-dbt-files-stored": "dbt dosyalarının saklandığı klasörün yolu", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "Bu <0>{{entityName}} kalıcı olarak silinmesi, iş akışı yapılandırmasının kaybolmasına neden olacak ve kurtarılamayacaktır.", "permanently-delete-metadata": "Bu <0>{{entityName}} kalıcı olarak silinmesi, metadatasının {{brandName}}'dan kaldırılmasına neden olacak ve kurtarılamayacaktır.", "permanently-delete-metadata-and-dependents": "Bu {{entityName}} kalıcı olarak silinmesi, metadatasının yanı sıra {{dependents}} metadatasını da {{brandName}}'dan kalıcı olarak kaldıracaktır.", @@ -3783,6 +3784,7 @@ "size-evolution-description": "Kuruluştaki varlıkların boyut evrimi.", "smart-sampling-hint": "Kaynakları veri boyutuna göre optimize eder", "soft-delete-archive-message": "Bu işlem {{entity}} öğesine erişimi devre dışı bırakacaktır. Daha sonra Arşivler'den geri yükleyebilirsiniz.", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "Geçici silme işlemi, {{entity}} öğesini devre dışı bırakacaktır. Bu, {{entity}} üzerindeki tüm keşif, okuma veya yazma işlemlerini devre dışı bırakacaktır.", "soft-delete-message-for-n-entities": "Geçici silme, bu {{count}} {{entity}} öğesini devre dışı bırakacak. Bu, bunlar üzerindeki tüm keşif, okuma veya yazma işlemlerini devre dışı bırakacaktır.", "something-went-wrong": "Bir şeyler ters gitti", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json index e0a506f3edfe..c9c321534bbc 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json @@ -3637,6 +3637,7 @@ "password-error-message": "密码必须为8到56个字符, 至少包括一个大写字母(A-Z)、一个小写字母(a-z), 和一个特殊字符(例如:!, %, @, or #)", "password-pattern-error": "密码必须为8到56个字符, 至少包括一个特殊字符、一个大写字母、一个小写字母", "path-of-the-dbt-files-stored": "存储 dbt 文件的文件夹路径", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "永久删除此 <0>{{entityName}} 将导致管道配置丢失,并且无法恢复。", "permanently-delete-metadata": "永久删除此<0>{{entityName}}将永久从 {{brandName}} 中删除其元数据", "permanently-delete-metadata-and-dependents": "永久删除此{{entityName}}将永久从 {{brandName}} 中删除其元数据以及{{dependents}}的元数据", @@ -3783,6 +3784,7 @@ "size-evolution-description": "组织中资产规模的变化", "smart-sampling-hint": "根据数据大小优化资源", "soft-delete-archive-message": "此操作将禁用对 {{entity}} 的访问。您可以稍后从存档中将其恢复。", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "软删除将停用{{entity}}, 这将禁用{{entity}}上的任何发现、读取或写入操作", "soft-delete-message-for-n-entities": "软删除将停用这 {{count}} 个{{entity}}。这将禁止对其进行任何发现、读取或写入操作。", "something-went-wrong": "出现了一些问题", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-tw.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-tw.json index 93469b16e390..e9f4c9c53b1e 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-tw.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-tw.json @@ -3637,6 +3637,7 @@ "password-error-message": "密碼長度必須介於 8 到 56 個字元之間,並包含至少一個大寫字母 (A-Z)、一個小寫字母 (a-z)、一個數字和一個特殊字元(如 !、%、@ 或 #)", "password-pattern-error": "密碼長度必須介於 8 到 56 個字元之間,並包含一個特殊字元、一個大寫字母和一個小寫字母", "path-of-the-dbt-files-stored": "儲存 dbt 檔案的資料夾路徑", + "permanently-delete-common-message": "Delete this {{entity}} and all its metadata forever. This can't be undone.", "permanently-delete-ingestion-pipeline": "永久刪除 <0>{{entityName}} 將導致管線組態遺失,且無法復原。", "permanently-delete-metadata": "永久刪除 <0>{{entityName}} 將導致其元資料從 {{brandName}} 中移除,且無法復原。", "permanently-delete-metadata-and-dependents": "永久刪除此 {{entityName}} 將從 {{brandName}} 中永久移除其元資料,以及 {{dependents}} 的元資料。", @@ -3783,6 +3784,7 @@ "size-evolution-description": "組織中資產的大小演進。", "smart-sampling-hint": "根據資料大小最佳化資源", "soft-delete-archive-message": "此操作將停用對 {{entity}} 的存取權限。您稍後可以從封存中還原它。", + "soft-delete-common-message": "Turn off this {{entity}}. You can restore it later.", "soft-delete-message-for-entity": "軟刪除將停用 {{entity}}。這將停用對 {{entity}} 的任何探索、讀取或寫入操作。", "soft-delete-message-for-n-entities": "軟刪除將停用這 {{count}} 個{{entity}}。這將停用對其的任何探索、讀取或寫入操作。", "something-went-wrong": "發生錯誤", diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/AlertDetailsPage/AlertDetailsPage.test.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/AlertDetailsPage/AlertDetailsPage.test.tsx index 678dc5185567..e8f68b4461ae 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/AlertDetailsPage/AlertDetailsPage.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/AlertDetailsPage/AlertDetailsPage.test.tsx @@ -101,8 +101,8 @@ jest.mock( () => jest.fn().mockImplementation(() =>
AlertRecentEventsTab
) ); -jest.mock('../../components/common/DeleteWidget/DeleteWidgetModal', () => - jest.fn().mockImplementation(() =>
DeleteWidgetModal
) +jest.mock('../../components/common/DeleteWidget/DeleteEntityModal', () => + jest.fn().mockImplementation(() =>
DeleteEntityModal
) ); jest.mock('../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder', () => @@ -181,7 +181,7 @@ describe('AlertDetailsPage', () => { expect(screen.getByTestId('delete-button')).toBeInTheDocument(); expect(screen.getByText('label.configuration')).toBeInTheDocument(); expect(screen.getByText('label.recent-event-plural')).toBeInTheDocument(); - expect(screen.getByText('DeleteWidgetModal')).toBeInTheDocument(); + expect(screen.getByText('DeleteEntityModal')).toBeInTheDocument(); }); it('should render the description if alert description is present', async () => { diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/AlertDetailsPage/components/AlertDetailsContent.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/AlertDetailsPage/components/AlertDetailsContent.tsx index 657198d250dc..7d3fb48bad45 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/AlertDetailsPage/components/AlertDetailsContent.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/AlertDetailsPage/components/AlertDetailsContent.tsx @@ -16,7 +16,7 @@ import { Button, Card, Col, Row, Skeleton, Space, Tabs, Tooltip } from 'antd'; import { useTranslation } from 'react-i18next'; import { ReactComponent as EditIcon } from '../../../assets/svg/edit-new.svg'; import { ReactComponent as DeleteIcon } from '../../../assets/svg/ic-delete.svg'; -import DeleteWidgetModal from '../../../components/common/DeleteWidget/DeleteWidgetModal'; +import DeleteEntityModal from '../../../components/common/DeleteWidget/DeleteEntityModal'; import DescriptionV1 from '../../../components/common/EntityDescription/DescriptionV1'; import { OwnerLabel } from '../../../components/common/OwnerLabel/OwnerLabel.component'; import TitleBreadcrumb from '../../../components/common/TitleBreadcrumb/TitleBreadcrumb.component'; @@ -164,7 +164,7 @@ function AlertDetailsContent({ /> - ({ )), })); -jest.mock('../../components/common/DeleteWidget/DeleteWidgetModal', () => +jest.mock('../../components/common/DeleteWidget/DeleteEntityModal', () => jest.fn().mockReturnValue(
Delete Modal
) ); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/KPIList.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/KPIList.tsx index 09e89c268cf1..4660614d99ac 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/KPIList.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/KPIList.tsx @@ -20,7 +20,7 @@ import { useTranslation } from 'react-i18next'; import { Link, useNavigate } from 'react-router-dom'; import { ReactComponent as EditIcon } from '../../assets/svg/edit-new.svg'; import { ReactComponent as IconDelete } from '../../assets/svg/ic-delete.svg'; -import DeleteWidgetModal from '../../components/common/DeleteWidget/DeleteWidgetModal'; +import DeleteEntityModal from '../../components/common/DeleteWidget/DeleteEntityModal'; import ErrorPlaceHolder from '../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder'; import { PagingHandlerParams } from '../../components/common/NextPrevious/NextPrevious.interface'; import Table from '../../components/common/Table/Table'; @@ -244,7 +244,7 @@ const KPIList = () => { /> {selectedKpi && ( - { +jest.mock('../../components/common/DeleteWidget/DeleteEntityModal', () => { return jest .fn() .mockImplementation(({ visible }) => - visible ?

DeleteWidgetModal

: null + visible ?

DeleteEntityModal

: null ); }); @@ -273,7 +273,7 @@ describe('Notification Alerts Page Tests', () => { userEvent.click(deleteButton); }); - const deleteModal = await screen.findByText('DeleteWidgetModal'); + const deleteModal = await screen.findByText('DeleteEntityModal'); expect(deleteModal).toBeInTheDocument(); }); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/NotificationListPage/NotificationListPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/NotificationListPage/NotificationListPage.tsx index 828d81e9f346..24742d5e9cea 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/NotificationListPage/NotificationListPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/NotificationListPage/NotificationListPage.tsx @@ -18,7 +18,7 @@ import { useTranslation } from 'react-i18next'; import { Link, useNavigate } from 'react-router-dom'; import { ReactComponent as EditIcon } from '../../assets/svg/edit-new.svg'; import { ReactComponent as DeleteIcon } from '../../assets/svg/ic-delete.svg'; -import DeleteWidgetModal from '../../components/common/DeleteWidget/DeleteWidgetModal'; +import DeleteEntityModal from '../../components/common/DeleteWidget/DeleteEntityModal'; import ErrorPlaceHolder from '../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder'; import { PagingHandlerParams } from '../../components/common/NextPrevious/NextPrevious.interface'; import Table from '../../components/common/Table/Table'; @@ -387,7 +387,7 @@ const NotificationListPage = () => { /> - ({ default: jest.fn().mockImplementation(() =>
NextPrevious
), })); -jest.mock('../../components/common/DeleteWidget/DeleteWidgetModal', () => { +jest.mock('../../components/common/DeleteWidget/DeleteEntityModal', () => { return jest .fn() .mockImplementation(({ visible }) => - visible ?

DeleteWidgetModal

: null + visible ?

DeleteEntityModal

: null ); }); @@ -314,7 +314,7 @@ describe('Observability Alerts Page Tests', () => { fireEvent.click(deleteButton); - const deleteModal = await screen.findByText('DeleteWidgetModal'); + const deleteModal = await screen.findByText('DeleteEntityModal'); expect(deleteModal).toBeInTheDocument(); }); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/ObservabilityAlertsPage/ObservabilityAlertsPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/ObservabilityAlertsPage/ObservabilityAlertsPage.tsx index 22aae6f15be8..3c425aa1d0f4 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/ObservabilityAlertsPage/ObservabilityAlertsPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/ObservabilityAlertsPage/ObservabilityAlertsPage.tsx @@ -12,7 +12,7 @@ */ import { Col, Row } from 'antd'; import { useTranslation } from 'react-i18next'; -import DeleteWidgetModal from '../../components/common/DeleteWidget/DeleteWidgetModal'; +import DeleteEntityModal from '../../components/common/DeleteWidget/DeleteEntityModal'; import PageLayoutV1 from '../../components/PageLayoutV1/PageLayoutV1'; import { EntityType } from '../../enums/entity.enum'; import { getEntityName } from '../../utils/EntityNameUtils'; @@ -74,7 +74,7 @@ const ObservabilityAlertsPage = () => { /> - { +jest.mock('../../../components/common/DeleteWidget/DeleteEntityModal', () => { return jest .fn() - .mockImplementation(() =>
DeleteWidgetModal.component
); + .mockImplementation(() =>
DeleteEntityModal.component
); }); jest.mock( diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/PoliciesListPage/PoliciesListPage.test.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/PoliciesListPage/PoliciesListPage.test.tsx index 70974f8db8ab..f7048196643c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/PoliciesListPage/PoliciesListPage.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/PoliciesListPage/PoliciesListPage.test.tsx @@ -59,7 +59,7 @@ jest.mock('react-router-dom', () => ({ )), })); -jest.mock('../../../components/common/DeleteWidget/DeleteWidgetModal', () => +jest.mock('../../../components/common/DeleteWidget/DeleteEntityModal', () => jest.fn().mockReturnValue(
Delete Widget
) ); jest.mock( diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/PoliciesListPage/PoliciesListPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/PoliciesListPage/PoliciesListPage.tsx index 535006687722..945458b384b2 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/PoliciesListPage/PoliciesListPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/PoliciesListPage/PoliciesListPage.tsx @@ -19,7 +19,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Link, useNavigate } from 'react-router-dom'; import { ReactComponent as IconDelete } from '../../../assets/svg/ic-delete.svg'; -import DeleteWidgetModal from '../../../components/common/DeleteWidget/DeleteWidgetModal'; +import DeleteEntityModal from '../../../components/common/DeleteWidget/DeleteEntityModal'; import ErrorPlaceHolder from '../../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder'; import { PagingHandlerParams } from '../../../components/common/NextPrevious/NextPrevious.interface'; import Table from '../../../components/common/Table/Table'; @@ -335,7 +335,7 @@ const PoliciesListPage = () => { size="small" /> {selectedPolicy && deletePolicyPermission && ( - ({ .fn() .mockImplementation(() => Promise.resolve(ROLES_LIST_WITH_PAGING)), })); -jest.mock('../../../components/common/DeleteWidget/DeleteWidgetModal', () => +jest.mock('../../../components/common/DeleteWidget/DeleteEntityModal', () => jest .fn() .mockReturnValue(
DeletWdigetModal
) diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/RolesListPage/RolesListPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/RolesListPage/RolesListPage.tsx index 11a1ee4dd58a..ff080a798eed 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/RolesListPage/RolesListPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/RolesListPage/RolesListPage.tsx @@ -19,7 +19,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Link, useNavigate } from 'react-router-dom'; import { ReactComponent as IconDelete } from '../../../assets/svg/ic-delete.svg'; -import DeleteWidgetModal from '../../../components/common/DeleteWidget/DeleteWidgetModal'; +import DeleteEntityModal from '../../../components/common/DeleteWidget/DeleteEntityModal'; import ErrorPlaceHolder from '../../../components/common/ErrorWithPlaceholder/ErrorPlaceHolder'; import { PagingHandlerParams } from '../../../components/common/NextPrevious/NextPrevious.interface'; import Table from '../../../components/common/Table/Table'; @@ -333,7 +333,7 @@ const RolesListPage = () => { size="small" /> {selectedRole && ( - {

- { handleSearch(''); // Update current count when Create / Delete operation performed From 17c9c7937c4520f3e5d0606764b16aa47f472a1d Mon Sep 17 00:00:00 2001 From: anuj-kumary Date: Mon, 6 Jul 2026 14:44:21 +0530 Subject: [PATCH 2/9] nit --- .../e2e/Features/DataQuality/TestLibrary.spec.ts | 5 +++++ .../e2e/Features/FailedTestCaseSampleData.spec.ts | 2 ++ .../Glossary/GlossaryCRUDOperations.spec.ts | 12 ++---------- .../Glossary/GlossaryMiscOperations.spec.ts | 4 ++++ .../e2e/Features/Glossary/GlossaryWorkflow.spec.ts | 2 ++ .../e2e/Features/SampleDataTableOperations.spec.ts | 7 ++++++- .../e2e/Pages/DataProductAndSubdomains.spec.ts | 6 +++++- .../ui/playwright/e2e/Pages/DataProducts.spec.ts | 7 ++++++- .../e2e/Pages/DomainUIInteractions.spec.ts | 8 +++++++- .../ui/playwright/e2e/Pages/Domains.spec.ts | 7 +++---- .../ui/playwright/e2e/Pages/Glossary.spec.ts | 3 +++ .../ui/playwright/e2e/Pages/Policies.spec.ts | 5 ----- .../ui/playwright/e2e/Pages/Roles.spec.ts | 10 ---------- .../main/resources/ui/playwright/utils/entity.ts | 14 ++++++++++++++ .../main/resources/ui/playwright/utils/glossary.ts | 2 ++ .../resources/ui/playwright/utils/testCases.ts | 1 + 16 files changed, 62 insertions(+), 33 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataQuality/TestLibrary.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataQuality/TestLibrary.spec.ts index a4ac9e790c9a..328501f93827 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataQuality/TestLibrary.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/DataQuality/TestLibrary.spec.ts @@ -18,6 +18,7 @@ import { toastNotification, uuid, } from '../../../utils/common'; +import { fillDeleteConfirmationIfPresent } from '../../../utils/entity'; import { findSystemTestDefinition } from '../../../utils/testCases'; const TEST_DEFINITION_NAME = `AaroCustomTestDefinition${uuid()}`; @@ -277,6 +278,7 @@ test.describe( ); // Click confirm delete + await fillDeleteConfirmationIfPresent(page); await page.getByTestId('confirm-button').click(); const response = await deleteTestDefinitionResponse; @@ -747,6 +749,7 @@ test.describe( response.request().method() === 'DELETE' ); + await fillDeleteConfirmationIfPresent(page); await page.getByTestId('confirm-button').click(); const response = await deleteResponse; @@ -1055,6 +1058,7 @@ test.describe( response.request().method() === 'DELETE' ); + await fillDeleteConfirmationIfPresent(page); await page.getByTestId('confirm-button').click(); const response = await deleteResponse; @@ -1223,6 +1227,7 @@ test.describe( response.request().method() === 'GET' ); + await fillDeleteConfirmationIfPresent(page); await page.getByTestId('confirm-button').click(); const deleteResult = await deleteResponse; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/FailedTestCaseSampleData.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/FailedTestCaseSampleData.spec.ts index a17a8048fe4b..53739ddaef79 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/FailedTestCaseSampleData.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/FailedTestCaseSampleData.spec.ts @@ -15,6 +15,7 @@ import { expect, test } from '@playwright/test'; import { PLAYWRIGHT_INGESTION_TAG_OBJ } from '../../constant/config'; import { TableClass } from '../../support/entity/TableClass'; import { getApiContext, redirectToHomePage, uuid } from '../../utils/common'; +import { fillDeleteConfirmationIfPresent } from '../../utils/entity'; import { getFailedRowsData, visitDataQualityTab } from '../../utils/testCases'; // use the admin user to login @@ -118,6 +119,7 @@ test( const deleteSampleData = page.waitForResponse( '/api/v1/dataQuality/testCases/*/failedRowsSample' ); + await fillDeleteConfirmationIfPresent(page); await page.click('[data-testid="confirm-button"]'); await deleteSampleData; await page.locator('[data-testid="sample-data-manage-button"]').waitFor({ diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryCRUDOperations.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryCRUDOperations.spec.ts index fc22708fcd7f..2ce832e5b08c 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryCRUDOperations.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryCRUDOperations.spec.ts @@ -408,16 +408,8 @@ test.describe('Glossary CRUD Operations', () => { state: 'visible', }); - const confirmInput = page.locator(); - - if ( - await confirmInput.isVisible({ timeout: 2000 }).catch(() => false) - ) { - await confirmInput.fill('DELETE'); - - const confirmBtn = page.getByTestId('confirm-button'); - await confirmBtn.click(); - } + const confirmBtn = page.getByTestId('confirm-button'); + await confirmBtn.click(); } } diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryMiscOperations.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryMiscOperations.spec.ts index 82eaa427053f..3477216aea69 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryMiscOperations.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryMiscOperations.spec.ts @@ -16,6 +16,7 @@ import { TableClass } from '../../../support/entity/TableClass'; import { Glossary } from '../../../support/glossary/Glossary'; import { GlossaryTerm } from '../../../support/glossary/GlossaryTerm'; import { getApiContext, redirectToHomePage } from '../../../utils/common'; +import { fillDeleteConfirmationIfPresent } from '../../../utils/entity'; import { dragAndDropTerm, performExpandAll, @@ -97,6 +98,7 @@ test.describe('Glossary Miscellaneous Operations', () => { // Confirm deletion const deleteRes = page.waitForResponse('/api/v1/glossaries/async/*'); + await fillDeleteConfirmationIfPresent(page); await page.getByTestId('confirm-button').click(); await deleteRes; @@ -246,6 +248,7 @@ test.describe('Glossary Miscellaneous Operations', () => { // Confirm deletion const deleteRes = page.waitForResponse('/api/v1/glossaryTerms/async/*'); + await fillDeleteConfirmationIfPresent(page); await page.getByTestId('confirm-button').click(); await deleteRes; @@ -386,6 +389,7 @@ test.describe('Glossary Miscellaneous Operations', () => { // Confirm deletion const deleteRes = page.waitForResponse('/api/v1/glossaryTerms/async/*'); + await fillDeleteConfirmationIfPresent(page); await page.getByTestId('confirm-button').click(); await deleteRes; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryWorkflow.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryWorkflow.spec.ts index ae8ef77c053b..3ada1963b75f 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryWorkflow.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryWorkflow.spec.ts @@ -21,6 +21,7 @@ import { getApiContext, redirectToHomePage, } from '../../../utils/common'; +import { fillDeleteConfirmationIfPresent } from '../../../utils/entity'; import { openAddGlossaryTermModal, performExpandAll, @@ -652,6 +653,7 @@ test('should delete parent term and cascade delete children', async ({ await expect(page.locator('[role="dialog"]')).toBeVisible(); const deleteRes = page.waitForResponse('/api/v1/glossaryTerms/async/*'); + await fillDeleteConfirmationIfPresent(page); await page.getByTestId('confirm-button').click(); await deleteRes; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/SampleDataTableOperations.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/SampleDataTableOperations.spec.ts index e89a35a23c5c..a3952c0ff710 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/SampleDataTableOperations.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/SampleDataTableOperations.spec.ts @@ -14,7 +14,10 @@ import { expect } from '@playwright/test'; import { TableClass } from '../../support/entity/TableClass'; import { performAdminLogin } from '../../utils/admin'; -import { waitForAllLoadersToDisappear } from '../../utils/entity'; +import { + fillDeleteConfirmationIfPresent, + waitForAllLoadersToDisappear, +} from '../../utils/entity'; import { addSampleDataViaApi, navigateToSampleDataTab, @@ -203,6 +206,7 @@ test.describe('Sample Data Tab - Download and Delete Functionality', () => { await test.step('Type DELETE to enable confirm button', async () => { const confirmButton = page.getByTestId('confirm-button'); + await page.getByTestId('confirmation-text-input').fill('DELETE'); await expect(confirmButton).toBeEnabled(); }); @@ -254,6 +258,7 @@ test.describe('Sample Data Tab - Download and Delete Functionality', () => { response.status() === 200 ); + await fillDeleteConfirmationIfPresent(page); await page.getByTestId('confirm-button').click(); await deleteResponse; await refetchResponse; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProductAndSubdomains.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProductAndSubdomains.spec.ts index ea728ddf5415..7e69be5c3b28 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProductAndSubdomains.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProductAndSubdomains.spec.ts @@ -35,7 +35,10 @@ import { selectDataProduct, selectDomain, } from '../../utils/domain'; -import { waitForAllLoadersToDisappear } from '../../utils/entity'; +import { + fillDeleteConfirmationIfPresent, + waitForAllLoadersToDisappear, +} from '../../utils/entity'; import { waitForSearchIndexed } from '../../utils/polling'; import { sidebarClick } from '../../utils/sidebar'; @@ -800,6 +803,7 @@ test.describe('Multiple Subdomains Tests', () => { await expect(page.getByRole('dialog')).toBeVisible(); const deleteRes = page.waitForResponse('/api/v1/domains/*'); + await fillDeleteConfirmationIfPresent(page); await page.getByTestId('confirm-button').click(); await deleteRes; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProducts.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProducts.spec.ts index b9f7e1264ff3..51a51f0dd06a 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProducts.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DataProducts.spec.ts @@ -30,7 +30,11 @@ import { removeAssetsFromDataProduct, selectDataProduct, } from '../../utils/domain'; -import { followEntity, waitForAllLoadersToDisappear } from '../../utils/entity'; +import { + fillDeleteConfirmationIfPresent, + followEntity, + waitForAllLoadersToDisappear, +} from '../../utils/entity'; import { sidebarClick } from '../../utils/sidebar'; import { selectTagInTagSuggestion } from '../../utils/tag'; @@ -192,6 +196,7 @@ test.describe('Data Products', () => { ).toBeVisible(); const deleteRes = page.waitForResponse('/api/v1/dataProducts/*'); + await fillDeleteConfirmationIfPresent(page); await page.getByTestId('confirm-button').click(); await deleteRes; }); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DomainUIInteractions.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DomainUIInteractions.spec.ts index 10507e311471..700ee199ee58 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DomainUIInteractions.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/DomainUIInteractions.spec.ts @@ -26,7 +26,10 @@ import { selectDataProduct, selectDomain, } from '../../utils/domain'; -import { waitForAllLoadersToDisappear } from '../../utils/entity'; +import { + fillDeleteConfirmationIfPresent, + waitForAllLoadersToDisappear, +} from '../../utils/entity'; import { waitForSearchIndexed } from '../../utils/polling'; import { sidebarClick } from '../../utils/sidebar'; @@ -375,6 +378,7 @@ test.describe('Data Product UI Operations', () => { await expect(page.getByRole('dialog')).toBeVisible(); const deleteRes = page.waitForResponse('/api/v1/dataProducts/*'); + await fillDeleteConfirmationIfPresent(page); await page.getByTestId('confirm-button').click(); await deleteRes; @@ -513,6 +517,7 @@ test.describe('Subdomain Management', () => { await expect(page.getByRole('dialog')).toBeVisible(); const deleteRes = page.waitForResponse('/api/v1/domains/*'); + await fillDeleteConfirmationIfPresent(page); await page.getByTestId('confirm-button').click(); await deleteRes; @@ -844,6 +849,7 @@ test.describe('Delete Domain with Dependencies', () => { await expect(page.getByRole('dialog')).toBeVisible(); const deleteRes = page.waitForResponse('/api/v1/domains/*'); + await fillDeleteConfirmationIfPresent(page); await page.getByTestId('confirm-button').click(); await deleteRes; } finally { diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts index 6cb9bb5db4e8..f76f50e7f08e 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts @@ -229,10 +229,6 @@ test.describe('Domains', () => { .getByText(`Delete domain "${domain.data.displayName}"`) ).toBeVisible(); - await expect(confirmationInput).toBeVisible(); - await confirmationInput.click(); - await confirmationInput.fill('DELETE'); - const deleteRes = page.waitForResponse('/api/v1/domains/*'); const confirmButton = page.getByTestId('confirm-button'); await expect(confirmButton).toBeVisible(); @@ -1388,6 +1384,9 @@ test.describe('Domains', () => { await expect(deleteButton).toBeVisible(); await deleteButton.click(); + const confirmationInput = page.locator( + '[data-testid="confirmation-text-input"]' + ); await expect(confirmationInput).toBeVisible(); await confirmationInput.click(); await confirmationInput.fill('DELETE'); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts index a83f513a4f1e..29ca7f2ede1f 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts @@ -2131,6 +2131,9 @@ test.describe('Glossary tests', () => { await expect(page.getByTestId('body-text')).toContainText('DELETE'); + const confirmationInput = page.locator( + '[data-testid="confirmation-text-input"]' + ); await expect(confirmationInput).toBeVisible(); await confirmationInput.fill('DELETE'); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Policies.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Policies.spec.ts index b6e9147f395c..cc52f6095e8a 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Policies.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Policies.spec.ts @@ -322,10 +322,6 @@ test.describe( await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); - // Type 'DELETE' in the confirmation text input - await page.fill('DELETE'); - - // Click on confirm button await page.locator('[data-testid="confirm-button"]').click(); // Validate deleted policy @@ -410,7 +406,6 @@ test.describe( await page.getByTestId('manage-button').click(); await page.getByTestId('delete-button').click(); - await page.fill('DELETE'); await page.locator('[data-testid="confirm-button"]').click(); await expect(policyLocator).not.toBeVisible(); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Roles.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Roles.spec.ts index f3fe1b69e0d6..c8bd7efa1b92 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Roles.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Roles.spec.ts @@ -503,11 +503,6 @@ test.describe('Roles page tests', PLAYWRIGHT_BASIC_TEST_TAG_OBJ, () => { // Wait for delete button to be visible and click it await expect(roleLocator).toBeVisible(); - // Wait for confirmation modal to be visible - const confirmationInput = page.locator(); - await expect(confirmationInput).toBeVisible(); - await confirmationInput.fill('DELETE'); - const confirmButton = page.locator('[data-testid="confirm-button"]'); await expect(confirmButton).toBeVisible(); await expect(confirmButton).toBeEnabled(); @@ -567,11 +562,6 @@ test.describe('Roles page tests', PLAYWRIGHT_BASIC_TEST_TAG_OBJ, () => { await expect(deleteButton).toBeVisible(); await deleteButton.click(); - // Wait for confirmation modal - const confirmationInput = page.locator(); - await expect(confirmationInput).toBeVisible(); - await confirmationInput.fill('DELETE'); - const confirmButton = page.locator('[data-testid="confirm-button"]'); await expect(confirmButton).toBeVisible(); await expect(confirmButton).toBeEnabled(); 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 34241b8354de..de3467652b66 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts @@ -2618,3 +2618,17 @@ export const validateCopiedLinkFormat = ({ isValid: true, }; }; + +/** + * Types the DELETE confirmation only when the delete modal renders a + * confirmation text input. The radio-based DeleteEntityModal has no input, + * while the simple EntityDeleteModal still requires typing DELETE, so this + * guard keeps both flows working. + */ +export const fillDeleteConfirmationIfPresent = async (page: Page) => { + await page.getByTestId('confirm-button').waitFor({ state: 'visible' }); + const confirmInput = page.getByTestId('confirmation-text-input'); + if (await confirmInput.isVisible()) { + await confirmInput.fill('DELETE'); + } +}; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/glossary.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/glossary.ts index 7551ddb610d3..a544e9772002 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/glossary.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/glossary.ts @@ -399,6 +399,8 @@ export const deleteGlossary = async (page: Page, glossary: GlossaryData) => { glossary.displayName ); + await page.fill('[data-testid="confirmation-text-input"]', 'DELETE'); + const deleteGlossary = page.waitForResponse( (response) => response.url().includes('/api/v1/glossaries/') && diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/testCases.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/testCases.ts index 593852e2be8e..1c725c5c20fa 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/testCases.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/testCases.ts @@ -189,6 +189,7 @@ export const confirmIngestionPipelineHardDelete = async (page: Page) => { const deleteResponse = page.waitForResponse( '/api/v1/services/ingestionPipelines/*?hardDelete=true' ); + await page.getByTestId('confirmation-text-input').fill('DELETE'); await page.getByTestId('confirm-button').click(); await deleteResponse; }; From 20c64042f04f90fdbade5b2dfae662df5d75aa41 Mon Sep 17 00:00:00 2001 From: anuj-kumary Date: Mon, 6 Jul 2026 15:36:19 +0530 Subject: [PATCH 3/9] fix(test): mock DeleteEntityModal in UserListPageV1 unit test The migration from EntityDeleteModal to DeleteEntityModal introduced a dependency on Dialog, Modal, ModalOverlay, RadioButton, RadioGroup from @openmetadata/ui-core-components. These sub-components were not covered by the existing @openmetadata/ui-core-components mock in the test, causing all tests to fail with "Cannot read properties of undefined (reading 'Header')". Mock DeleteEntityModal directly (same pattern used in ManageButton.test.tsx, CustomMetricGraphs.test.tsx, DataQualityTab.test.tsx) rather than expanding the @openmetadata/ui-core-components mock with Dialog sub-components. Co-Authored-By: Claude Sonnet 4.6 --- .../ui/src/pages/UserListPage/UserListPageV1.test.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/UserListPage/UserListPageV1.test.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/UserListPage/UserListPageV1.test.tsx index 87206bc9efcd..d5c17a436b0c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/UserListPage/UserListPageV1.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/UserListPage/UserListPageV1.test.tsx @@ -161,6 +161,10 @@ jest.mock( } ); +jest.mock('../../components/common/DeleteWidget/DeleteEntityModal', () => { + return jest.fn().mockImplementation(() =>
DeleteEntityModal
); +}); + describe('Test UserListPage component', () => { let mockTableComponent: jest.Mock; From a775a5460965ace95b94bcc007670c9cf125a86b Mon Sep 17 00:00:00 2001 From: anuj-kumary Date: Mon, 6 Jul 2026 18:27:45 +0530 Subject: [PATCH 4/9] nit --- .../common/DeleteWidget/DeleteEntityModal.tsx | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx index 8cbd1a06ef68..90bbf75b1969 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx @@ -252,7 +252,7 @@ const DeleteEntityModal = ({ {t('label.delete')} "{entityName}" {entityTypeName} - + + {option.description} + + } key={option.type} - label={option.title} + label={ + + {option.title} + + } size="md" value={option.type} /> From d5f38b8d532f9776558bafd90e86db617945f528 Mon Sep 17 00:00:00 2001 From: anuj-kumary Date: Mon, 6 Jul 2026 19:23:16 +0530 Subject: [PATCH 5/9] fix the spacing for delete modal --- .../components/common/DeleteWidget/DeleteEntityModal.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx index 90bbf75b1969..5e62ec0d0563 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx @@ -252,8 +252,9 @@ const DeleteEntityModal = ({ {t('label.delete')} "{entityName}" {entityTypeName} - + setDeletionType(value as DeleteType)}> @@ -291,7 +292,7 @@ const DeleteEntityModal = ({ ))} - +
- +
From 40dd0b9a823c771dbe366137600c4c757fc1b152 Mon Sep 17 00:00:00 2001 From: anuj-kumary Date: Mon, 6 Jul 2026 19:58:03 +0530 Subject: [PATCH 6/9] fix(tests): replace stale ant-modal selector with delete-modal testid in Policies spec Co-Authored-By: Claude Sonnet 4.6 --- .../src/main/resources/ui/playwright/e2e/Pages/Policies.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Policies.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Policies.spec.ts index cc52f6095e8a..aed5ea0cb1f7 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Policies.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Policies.spec.ts @@ -320,7 +320,7 @@ test.describe( await deleteButton.waitFor({ state: 'visible' }); await deleteButton.click(); - await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); + await expect(page.getByTestId('delete-modal')).toBeVisible(); await page.locator('[data-testid="confirm-button"]').click(); From 76494659e11ed67889adb16db896aa10c66c2d26 Mon Sep 17 00:00:00 2001 From: anuj-kumary Date: Mon, 6 Jul 2026 20:15:34 +0530 Subject: [PATCH 7/9] fix(ui): wrap async delete in try/finally to prevent modal stuck on error Co-Authored-By: Claude Sonnet 4.6 --- .../common/DeleteWidget/DeleteEntityModal.tsx | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx index 5e62ec0d0563..6e7a23e98d9d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/DeleteWidget/DeleteEntityModal.tsx @@ -186,17 +186,20 @@ const DeleteEntityModal = ({ }; if (isAsyncDelete) { setIsLoading(true); - await handleOnAsyncEntityDeleteConfirm({ - entityName, - entityId: entityId ?? '', - entityType, - deleteType: deletionType, - prepareType, - isRecursiveDelete: isRecursiveDelete ?? false, - afterDeleteAction, - }); - setIsLoading(false); - handleOnEntityDeleteCancel(); + try { + await handleOnAsyncEntityDeleteConfirm({ + entityName, + entityId: entityId ?? '', + entityType, + deleteType: deletionType, + prepareType, + isRecursiveDelete: isRecursiveDelete ?? false, + afterDeleteAction, + }); + } finally { + setIsLoading(false); + handleOnEntityDeleteCancel(); + } } else { onDelete ? onDelete(values) : handleOnEntityDeleteConfirm(values); } From 94509341a6d5f0cad991c7bf46390bf2e4cd1c8e Mon Sep 17 00:00:00 2001 From: anuj-kumary Date: Tue, 7 Jul 2026 00:19:12 +0530 Subject: [PATCH 8/9] fix(playwright): update stale ant-modal selectors after DeleteEntityModal migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace .ant-modal-header/.ant-modal-title/[role="dialog"].ant-modal selectors with data-testid="delete-modal". Remove hard-delete-option clicks (use data-testid="hard-delete" radio), drop confirmation-text-input fills and toBeDisabled/not.toBeDisabled assertions that no longer apply — the new DeleteEntityModal does not gate the confirm button on text input. Co-Authored-By: Claude Sonnet 4.6 --- .../playwright/e2e/Features/Dashboards.spec.ts | 4 ++-- .../e2e/Features/TeamsHierarchy.spec.ts | 17 +---------------- .../e2e/Flow/PersonaDeletionUserProfile.spec.ts | 9 +-------- .../ui/playwright/e2e/Flow/PersonaFlow.spec.ts | 15 +-------------- .../ui/playwright/e2e/Pages/Domains.spec.ts | 13 +------------ .../main/resources/ui/playwright/utils/alert.ts | 4 ---- .../ui/playwright/utils/customMetric.ts | 2 -- 7 files changed, 6 insertions(+), 58 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Dashboards.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Dashboards.spec.ts index 0d6acf07d6ec..55bb207c366d 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Dashboards.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Dashboards.spec.ts @@ -130,9 +130,9 @@ test.describe( await page.click('[data-testid="manage-button"]'); await page.click('[data-testid="delete-button"]'); - await page.locator('[role="dialog"].ant-modal').waitFor(); + await page.getByTestId('delete-modal').waitFor(); - await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); + await expect(page.getByTestId('delete-modal')).toBeVisible(); const deleteResponse = page.waitForResponse( `/api/v1/${EntityTypeEndpoint.Dashboard}/async/*?hardDelete=false&recursive=true` diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsHierarchy.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsHierarchy.spec.ts index 424005e22ccf..397ad57048c9 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsHierarchy.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/TeamsHierarchy.spec.ts @@ -11,7 +11,6 @@ * limitations under the License. */ import { expect, test } from '@playwright/test'; -import { DELETE_TERM } from '../../constant/common'; import { PLAYWRIGHT_BASIC_TEST_TAG_OBJ } from '../../constant/config'; import { GlobalSettingOptions } from '../../constant/settings'; import { redirectToHomePage, uuid } from '../../utils/common'; @@ -119,26 +118,12 @@ test.describe( await page.click('[data-testid="delete-button-title"]'); - await expect(page.locator('.ant-modal-header')).toContainText( - businessTeamName - ); - - await page.click(`[data-testid="hard-delete-option"]`); - - await expect( - page.locator('[data-testid="confirm-button"]') - ).toBeDisabled(); - - await page.fill(DELETE_TERM); + await page.click(`[data-testid="hard-delete"]`); const deleteResponse = page.waitForResponse( `/api/v1/teams/*?hardDelete=true&recursive=true` ); - await expect( - page.locator('[data-testid="confirm-button"]') - ).not.toBeDisabled(); - await page.click('[data-testid="confirm-button"]'); await deleteResponse; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaDeletionUserProfile.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaDeletionUserProfile.spec.ts index 75f03940aa31..f1c1bdbb78a3 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaDeletionUserProfile.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaDeletionUserProfile.spec.ts @@ -138,21 +138,14 @@ test.describe.serial('User profile works after persona deletion', () => { await page.getByTestId('manage-button').click(); await page.getByTestId('delete-button-title').click(); - await expect(page.locator('.ant-modal-header')).toContainText( - PERSONA_DETAILS.displayName - ); - - await page.getByTestId('hard-delete-option').click(); + await page.getByTestId('hard-delete').click(); const confirmButton = page.getByTestId('confirm-button'); - await expect(confirmButton).toBeDisabled(); const deleteResponse = page.waitForResponse( `/api/v1/personas/*?hardDelete=true&recursive=false` ); - await expect(confirmButton).toBeEnabled(); - await confirmButton.click(); await deleteResponse; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaFlow.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaFlow.spec.ts index 8d66057977ec..f6180a4e94cd 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaFlow.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/PersonaFlow.spec.ts @@ -11,7 +11,6 @@ * limitations under the License. */ -import { DELETE_TERM } from '../../constant/common'; import { GlobalSettingOptions } from '../../constant/settings'; import { TableClass } from '../../support/entity/TableClass'; import { expect, test } from '../../support/fixtures/userPages'; @@ -275,24 +274,12 @@ test.describe.serial('Persona operations', () => { await page.click('[data-testid="delete-button-title"]'); - await expect(page.locator('.ant-modal-header')).toContainText( - PERSONA_DETAILS.displayName - ); - - await page.click(`[data-testid="hard-delete-option"]`); - - await expect(page.locator('[data-testid="confirm-button"]')).toBeDisabled(); - - await page.fill(DELETE_TERM); + await page.click(`[data-testid="hard-delete"]`); const deleteResponse = page.waitForResponse( `/api/v1/personas/*?hardDelete=true&recursive=false` ); - await expect( - page.locator('[data-testid="confirm-button"]') - ).not.toBeDisabled(); - await page.click('[data-testid="confirm-button"]'); await deleteResponse; diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts index f76f50e7f08e..e3a8115ab320 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Domains.spec.ts @@ -223,11 +223,7 @@ test.describe('Domains', () => { await deleteButton.click(); // Verify delete modal is visible - await expect( - page - .locator('.ant-modal-title') - .getByText(`Delete domain "${domain.data.displayName}"`) - ).toBeVisible(); + await expect(page.getByTestId('delete-modal')).toBeVisible(); const deleteRes = page.waitForResponse('/api/v1/domains/*'); const confirmButton = page.getByTestId('confirm-button'); @@ -1384,13 +1380,6 @@ test.describe('Domains', () => { await expect(deleteButton).toBeVisible(); await deleteButton.click(); - const confirmationInput = page.locator( - '[data-testid="confirmation-text-input"]' - ); - await expect(confirmationInput).toBeVisible(); - await confirmationInput.click(); - await confirmationInput.fill('DELETE'); - const dpListRes = page.waitForResponse( '/api/v1/search/query?q=&index=dataProduct*' ); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/alert.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/alert.ts index 28ce4907f20e..dd3cb11eb26f 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/alert.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/alert.ts @@ -199,10 +199,6 @@ export const deleteAlertSteps = async ( ) => { await page.getByTestId(`alert-delete-${name}`).click(); - await expect(page.locator('.ant-modal-header')).toHaveText( - `Delete subscription "${displayName}"` - ); - const deleteAlert = page.waitForResponse( (response) => response.request().method() === 'DELETE' && response.status() === 200 diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/customMetric.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/customMetric.ts index 228eac8e5d49..2579784902f2 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/customMetric.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/customMetric.ts @@ -147,8 +147,6 @@ export const deleteCustomMetric = async ({ await page.click(`[data-testid="${metric.name}-custom-metrics-menu"]`); await page.getByRole('menuitemradio', { name: 'Delete' }).click(); - await expect(page.locator('.ant-modal-header')).toContainText(metric.name); - const deleteMetricResponse = page.waitForResponse( isColumnMetric ? `/api/v1/tables/*/customMetric/${metric.column}/${metric.name}*` From 699b7a9b44a5e7e0e33b4abd0dfb3ae74621d284 Mon Sep 17 00:00:00 2001 From: anuj-kumary Date: Tue, 7 Jul 2026 00:31:59 +0530 Subject: [PATCH 9/9] fix(playwright): replace old hard/soft-delete-option testids in utility helpers Update all utility functions that interact with the delete modal via ManageButton to use the new DeleteEntityModal testids: wait on delete-modal instead of [role="dialog"].ant-modal, click hard-delete/soft-delete radio buttons instead of hard-delete-option/soft-delete-option, remove stale .ant-modal-title checks, and collapse redundant check(hard-delete)/click(hard-delete-option) pairs to a single click(hard-delete). Co-Authored-By: Claude Sonnet 4.6 --- .../e2e/Flow/ApiServiceRest.spec.ts | 7 ++---- .../ui/playwright/e2e/Pages/Tags.spec.ts | 2 +- .../ui/playwright/e2e/Pages/TestSuite.spec.ts | 2 +- .../main/resources/ui/playwright/utils/bot.ts | 2 +- .../resources/ui/playwright/utils/entity.ts | 16 +++----------- .../ui/playwright/utils/serviceIngestion.ts | 5 ++--- .../resources/ui/playwright/utils/team.ts | 11 +++------- .../resources/ui/playwright/utils/user.ts | 22 ++++--------------- 8 files changed, 17 insertions(+), 50 deletions(-) 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 2f5ea64774dc..f5b1b9e28bd4 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 @@ -166,12 +166,9 @@ test.describe('API service', PLAYWRIGHT_INGESTION_TAG_OBJ, () => { await page.getByTestId('manage-button').click(); await page.getByTestId('delete-button').click(); - await page.locator('[role="dialog"].ant-modal').waitFor(); + await page.getByTestId('delete-modal').waitFor(); - await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); - - await page.click('[data-testid="hard-delete-option"]'); - await page.check('[data-testid="hard-delete"]'); + await page.click('[data-testid="hard-delete"]'); const deleteResponse = page.waitForResponse( '/api/v1/services/apiServices/async/*?hardDelete=true&recursive=true' diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Tags.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Tags.spec.ts index 330a04659ac4..00ee9690e732 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Tags.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Tags.spec.ts @@ -493,7 +493,7 @@ test('Classification Page', async ({ page }) => { await page.click('[data-testid="delete-button"]'); - await page.click('[data-testid="hard-delete-option"]'); + await page.click('[data-testid="hard-delete"]'); const deleteClassification = page.waitForResponse( (response) => diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestSuite.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestSuite.spec.ts index 00ad8c7e7f0c..5d5b1c0fff65 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestSuite.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/TestSuite.spec.ts @@ -362,7 +362,7 @@ test( await ownerPage.click('[data-testid="delete-button"]'); // Click on Permanent/Hard delete option - await ownerPage.click('[data-testid="hard-delete-option"]'); + await ownerPage.click('[data-testid="hard-delete"]'); const deleteResponse = ownerPage.waitForResponse( '/api/v1/dataQuality/testSuites/*?hardDelete=true&recursive=true' ); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts index 99f3cda08e40..c28861d1872b 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/bot.ts @@ -135,7 +135,7 @@ export const deleteBot = async (page: Page) => { // Click on delete button await page.getByTestId(`bot-delete-${botName}`).click(); - await page.getByTestId('hard-delete-option').click(); + await page.getByTestId('hard-delete').click(); const deleteResponse = page.waitForResponse(`/api/v1/bots/*`); 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 de3467652b66..35b71f6a1547 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts @@ -2127,10 +2127,7 @@ export const softDeleteEntity = async ( await page.click('[data-testid="manage-button"]'); await page.click('[data-testid="delete-button"]'); - await page.locator('[role="dialog"].ant-modal').waitFor(); - - await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); - await expect(page.locator('.ant-modal-title')).toContainText(displayName); + await page.getByTestId('delete-modal').waitFor(); const deleteResponse = page.waitForResponse( `/api/v1/${endPoint}/async/*?hardDelete=false&recursive=true` @@ -2219,16 +2216,9 @@ export const hardDeleteEntity = async ( await page.getByTestId('delete-button').waitFor(); await page.click('[data-testid="delete-button"]'); - await page.locator('[role="dialog"].ant-modal').waitFor(); - - await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); - - await expect( - page.locator('[data-testid="delete-modal"] .ant-modal-title') - ).toHaveText(new RegExp(entityName)); + await page.getByTestId('delete-modal').waitFor(); - await page.click('[data-testid="hard-delete-option"]'); - await page.check('[data-testid="hard-delete"]'); + await page.click('[data-testid="hard-delete"]'); const deleteResponse = page.waitForResponse( `/api/v1/${endPoint}/async/*?hardDelete=true&recursive=true` ); 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 be3b68aa7f45..fed07087cb07 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/serviceIngestion.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/serviceIngestion.ts @@ -94,9 +94,8 @@ export const deleteService = async ( await page.locator('[data-menu-id*="delete-button"]').waitFor(); await page.click('[data-testid="delete-button-title"]'); - // Clicking on permanent delete radio button and checking the service name - await page.click('[data-testid="hard-delete-option"]'); - await page.click(`[data-testid="hard-delete-option"] >> text=${serviceName}`); + // Clicking on permanent delete radio button + await page.click('[data-testid="hard-delete"]'); const deleteResponse = page.waitForResponse((response) => response diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/team.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/team.ts index 7709b0f6b505..1b41a9412823 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/team.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/team.ts @@ -119,9 +119,7 @@ export const softDeleteTeam = async (page: Page) => { .click(); await page.getByTestId('delete-button').click(); - await page.waitForLoadState('domcontentloaded'); - - await page.click('[data-testid="soft-delete-option"]'); + await page.getByTestId('delete-modal').waitFor(); const deleteResponse = page.waitForResponse( '/api/v1/teams/*?hardDelete=false&recursive=true' @@ -140,12 +138,9 @@ export const hardDeleteTeam = async (page: Page, teamName: string) => { .click(); await page.getByTestId('delete-button').click(); - await page.locator('[role="dialog"].ant-modal').waitFor(); - - await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); + await page.getByTestId('delete-modal').waitFor(); - await page.click('[data-testid="hard-delete-option"]'); - await page.check('[data-testid="hard-delete"]'); + await page.click('[data-testid="hard-delete"]'); const deleteResponse = page.waitForResponse( '/api/v1/teams/*?hardDelete=true&recursive=true' diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts index 89da997515a7..22833ca780bc 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts @@ -186,10 +186,7 @@ export const softDeleteUserProfilePage = async ( await page.getByText('Delete Profile').click(); - await page.locator('[role="dialog"].ant-modal').waitFor(); - - await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); - await expect(page.locator('.ant-modal-title')).toContainText(displayName); + await page.getByTestId('delete-modal').waitFor(); const deleteResponse = page.waitForResponse( '/api/v1/users/*?hardDelete=false&recursive=true' @@ -232,13 +229,9 @@ export const hardDeleteUserProfilePage = async ( ) => { await page.getByTestId('user-profile-manage-btn').click(); await page.getByText('Delete Profile').click(); - await page.locator('[role="dialog"].ant-modal').waitFor(); + await page.getByTestId('delete-modal').waitFor(); - await expect(page.locator('[role="dialog"].ant-modal')).toBeVisible(); - await expect(page.locator('.ant-modal-title')).toContainText(displayName); - - await page.click('[data-testid="hard-delete-option"]'); - await page.check('[data-testid="hard-delete"]'); + await page.click('[data-testid="hard-delete"]'); const deleteResponse = page.waitForResponse( '/api/v1/users/*?hardDelete=true&recursive=true' @@ -463,14 +456,7 @@ export const permanentDeleteUser = async ( // Click on delete user button await page.click(`[data-testid="delete-user-btn-${username}"]`); - if (!isUserSoftDeleted) { - // Modal opens with soft-delete as default; wait for the form's - // initialization effect before switching, otherwise the click races - // with setFieldsValue and the selection gets clobbered. - await page - .locator('.ant-radio-wrapper-checked [data-testid="soft-delete"]') - .waitFor(); - } + await page.getByTestId('delete-modal').waitFor(); // Click on hard delete await page.click('[data-testid="hard-delete"]');