Replaced old entity delete modal with untitles delete modal#29760
Replaced old entity delete modal with untitles delete modal#29760anuj-kumary wants to merge 20 commits into
Conversation
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 <noreply@anthropic.com>
Resolves modify/delete conflict on KnowledgeCenter.spec.ts (deleted in main as part of the KnowledgeCenter→ContextCenter rename; our branch had a minor modification — accepted main's deletion). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…o DeleteEntityModal Replace EntityDeleteModal (AntD type-in-DELETE modal) with DeleteEntityModal (MUI radio-button modal) in TagPage, TagsPage, and DataProductsDetailsPage so Playwright tests no longer time out waiting for the removed #deleteTextInput. Also remove stale #deleteTextInput fill from testCases.ts deleteTestCase and replace .ant-modal-title assertion in ExploreDiscovery.spec.ts with delete-modal waitFor. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…lete flows Replace DeleteEntityModal (radio-button modal) with the simpler DeleteModal (single confirm button) wherever only permanent delete is offered, matching the pattern already used by Workflow delete: - GlossaryHeader: glossary delete - GlossaryV1: glossary / glossary-term delete - TagPage: tag delete - TagsPage: classification delete - DataProductsDetailsPage: data product delete - DataQualityTab: test case delete (adds explicit API handler) Also updates testCases.ts to wait for confirm-button instead of delete-modal since DeleteModal uses modal-footer/confirm-button testids. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tion Align tests with the DeleteModal (single-confirm) and DeleteEntityModal (radio-button) patterns after migrating glossary, tag, and classification delete flows: - glossary.ts deleteGlossary: replace delete-confirmation-modal waitFor with delete-modal, and replace confirmation-text-input fill with hard-delete radio click (ManageButton → DeleteEntityModal flow) - glossary.ts deleteGlossaryOrTerm: add hard-delete click before confirm so the async hard-delete endpoint is triggered correctly - Glossary.spec.ts: remove stale body-text/confirmation-text-input checks, add delete-modal waitFor + hard-delete click - Tags.spec.ts permanentDeleteModal: replace .ant-modal-content with modal-footer waitFor (DeleteModal uses MUI, no ant classes) - Tags.spec.ts: replace .ant-modal-content waitFor with confirm-button waitFor on tag delete row action Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code Review
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Gitar
|



Describe your changes:
Fixes #29730
Replaced old entity delete modal with untitles delete modal
Screen.Recording.2026-07-07.at.3.36.41.PM.mov
Screen.Recording.2026-07-07.at.3.37.17.PM.mov
Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Summary by Gitar
DeleteWidgetModalwith the newDeleteEntityModalcomponent across various pages and components.DeleteEntityModal.tsxand its corresponding test fileDeleteEntityModal.test.tsxto standardize entity deletion workflows.permanently-delete-common-messageandsoft-delete-common-messageto support the new modal's messaging.DataQualityTab.test.tsx,ManageButton.test.tsx,AlertDetailsPage.test.tsx, etc.) to reflect the component migration.This will update automatically on new commits.
Greptile Summary
This PR replaces
DeleteWidgetModal(Ant Design-based, requires typing "DELETE" to confirm) with a newDeleteEntityModalcomponent (from@openmetadata/ui-core-components, radio-button selection only) across the majority of entity deletion flows, and with the simplerDeleteModalfor confirmation-only cases (glossaries, tags, classifications). Playwright E2E tests and unit tests are updated accordingly to remove the text-fill step.DeleteEntityModal.tsx: Radio-group for soft/hard delete, no text confirmation, try/finally cleanup on both the sync and async delete paths, and adata-testid="delete-modal"anchor for tests.DeleteWidgetModal.tsxis deleted.ManageButtonand entity list pages (Roles, Policies, Users, KPI, etc.) migrate toDeleteEntityModal; entity detail pages with custom delete logic (GlossaryHeader, GlossaryV1, TagPage, TagsPage) andDataQualityTabmigrate to the simplerDeleteModalwith a localonDeletehandler..ant-modal,.ant-modal-title) and the oldhard-delete-optiondata-testids are replaced withdelete-modal,hard-delete, etc.; a newfillDeleteConfirmationIfPresentguard is added for flows that still use the old confirmation-input modal (ingestion pipelines).Confidence Score: 4/5
Safe to merge with minor caveats — the deletion UX change is broad but well-structured and the async cleanup paths are correct.
The migration spans 94 files and correctly addresses the stale Ant Design selectors, the async delete try/finally cleanup, and the removal of text confirmation across all migrated paths. The mixed pattern (DeleteEntityModal vs DeleteModal + local handler) is internally consistent. Two small gaps: DataQualityTab's local handleDeleteTestCase passes undefined instead of false for the isSoftDelete callback arg, and softDeleteEntity in the Playwright utils relies entirely on the modal's default selection rather than explicitly clicking the soft-delete radio.
DataQualityTab.tsx (afterDeleteAction argument), entity.ts softDeleteEntity helper (implicit default reliance), and Tags.spec.ts (mixed DeleteModal/DeleteEntityModal paths).
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[User clicks Delete] --> B{Which component?} B --> C[ManageButton / Entity list pages\nRoles, Policies, Users, KPI,\nDomainDetails, BotList, etc.] B --> D[Simple entity delete\nGlossaryHeader, GlossaryV1,\nTagPage, TagsPage] B --> E[DataQualityTab\ntest case delete] C --> F[DeleteEntityModal\nRadio: soft-delete / hard-delete\nNo text confirmation\ndata-testid=delete-modal] D --> G[DeleteModal\nSimple confirm\ndata-testid=modal-footer\ndata-testid=cancel-button] E --> H[DeleteModal\n+ local handleDeleteTestCase\ncalls deleteEntity directly\nhardDelete=true] F --> I{isAsyncDelete?} I -- Yes --> J[handleOnAsyncEntityDeleteConfirm\ntry/finally cleanup] I -- No --> K{onDelete prop?} K -- Yes --> L[Custom onDelete handler] K -- No --> M[internal deleteEntity call\ntry/finally cleanup] style F fill:#d4edda,stroke:#28a745 style G fill:#d1ecf1,stroke:#17a2b8 style H fill:#d1ecf1,stroke:#17a2b8%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% flowchart TD A[User clicks Delete] --> B{Which component?} B --> C[ManageButton / Entity list pages\nRoles, Policies, Users, KPI,\nDomainDetails, BotList, etc.] B --> D[Simple entity delete\nGlossaryHeader, GlossaryV1,\nTagPage, TagsPage] B --> E[DataQualityTab\ntest case delete] C --> F[DeleteEntityModal\nRadio: soft-delete / hard-delete\nNo text confirmation\ndata-testid=delete-modal] D --> G[DeleteModal\nSimple confirm\ndata-testid=modal-footer\ndata-testid=cancel-button] E --> H[DeleteModal\n+ local handleDeleteTestCase\ncalls deleteEntity directly\nhardDelete=true] F --> I{isAsyncDelete?} I -- Yes --> J[handleOnAsyncEntityDeleteConfirm\ntry/finally cleanup] I -- No --> K{onDelete prop?} K -- Yes --> L[Custom onDelete handler] K -- No --> M[internal deleteEntity call\ntry/finally cleanup] style F fill:#d4edda,stroke:#28a745 style G fill:#d1ecf1,stroke:#17a2b8 style H fill:#d1ecf1,stroke:#17a2b8Comments Outside Diff (1)
openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts, line 2222-2231 (link)hard-delete-optiondata-testid insoftDeleteEntity/hardDeleteEntityBoth
softDeleteEntity(line ~2130) andhardDeleteEntity(line 2222) still assert on[role="dialog"].ant-modaland.ant-modal-titlewhich are Ant Design class names. The newDeleteEntityModaluses@openmetadata/ui-core-componentsand will not render these classes, so thesewaitFor/expectcalls will time out every time.Additionally,
hardDeleteEntitystill clicks[data-testid="hard-delete-option"](line 2230). In the old modal this mapped to the innerTypography.Paragraphrendered as${option.type}-option. The newRadioButtononly setsdata-testid={option.type}(i.e.,"hard-delete"), so"hard-delete-option"no longer exists and the click will not find any element. The same stale selector is present inserviceIngestion.ts,bot.ts,user.ts,team.ts, and several spec files.Reviews (14): Last reviewed commit: "fix lint checks" | Re-trigger Greptile