diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Teams.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Teams.spec.js index bc5c196e0e4..e50418fc07e 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Teams.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Teams.spec.js @@ -78,7 +78,7 @@ describe('Teams flow should work properly', () => { it('Add user to created team', () => { - interceptURL('GET', '/api/v1/users*', 'getUsers'); + interceptURL('GET', `/api/v1/users?fields=teams,roles&team=${TEAM_DETAILS.name}&limit=15`, 'getUsers'); interceptURL('GET', `/api/v1/teams/name/${TEAM_DETAILS.name}?*`,'getSelectedTeam') //Click on created team cy.get(`[data-row-key="${TEAM_DETAILS.name}"]`) @@ -87,10 +87,7 @@ describe('Teams flow should work properly', () => { cy.wait("@getSelectedTeam").then(() =>{ cy.get('[data-testid="team-heading"]') - .should('be.visible') - .within(() => { - cy.contains(TEAM_DETAILS.name).should('be.visible'); - }) + .should('be.visible').and('contain', TEAM_DETAILS.name) }); verifyResponseStatusCode('@getUsers', 200); //Clicking on users tab diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx index 26c4df6ad3a..4ab362dbd2d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx @@ -1385,10 +1385,10 @@ const TeamDetailsV1 = ({ closable={false} confirmLoading={isModalLoading} okText={t('label.confirm')} + open={!isUndefined(selectedEntity.record)} title={`${t('label.remove-entity', { entity: getEntityName(selectedEntity?.record), })} ${t('label.from-lowercase')} ${getEntityName(currentTeam)}`} - visible={!isUndefined(selectedEntity.record)} onCancel={() => setEntity(undefined)} onOk={async () => { await handleAttributeDelete( @@ -1398,10 +1398,10 @@ const TeamDetailsV1 = ({ setEntity(undefined); }}> - {t('message.sure-to-remove')}{' '} - {`${getEntityName( - selectedEntity.record - )} t('label.from-lowercase') ${getEntityName(currentTeam)}?`} + {t('message.are-you-sure-you-want-to-remove-child-from-parent', { + child: getEntityName(selectedEntity.record), + parent: getEntityName(currentTeam), + })} )} 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 353d899c4b8..8d102d05d04 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 @@ -521,6 +521,7 @@ "are-you-sure-delete-tag": "Are you sure you want to delete the {{type}} \"{{tagName}}\"?", "are-you-sure-to-revoke-access": "Are you sure you want to revoke access for JWT token?", "are-you-sure-want-to-text": "Are you sure you want to {{text}}", + "are-you-sure-you-want-to-remove-child-from-parent": "Are you sure you want to remove the {{child}} from {{parent}}?", "are-you-want-to-restore": "Are you sure you want to restore", "assess-data-reliability-with-data-profiler-lineage": "Assess data reliability with data profiler, lineage, sample data, and more", "assigned-you-a-new-task-lowercase": "assigned you a new task", diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/PoliciesDetailPage/PoliciesDetailPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/PoliciesDetailPage/PoliciesDetailPage.tsx index cdf19ceacdb..9ce1a01e4b2 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/PoliciesDetailPage/PoliciesDetailPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/PoliciesPage/PoliciesDetailPage/PoliciesDetailPage.tsx @@ -542,19 +542,20 @@ const PoliciesDetailPage = () => { closable={false} confirmLoading={isloadingOnSave} okText={t('label.confirm')} + open={!isUndefined(selectedEntity.record)} title={`${t('label.remove-entity', { entity: getEntityName(selectedEntity.record), })} ${t('label.from-lowercase')} ${getEntityName(policy)}`} - visible={!isUndefined(selectedEntity.record)} onCancel={() => setEntity(undefined)} onOk={async () => { await handleDelete(selectedEntity.record, selectedEntity.attribute); setEntity(undefined); }}> - {` ${t('message.sure-to-remove')} ${getEntityName( - selectedEntity.record - )} ${t('label.from-lowercase')} ${getEntityName(policy)}?`} + {t('message.are-you-sure-you-want-to-remove-child-from-parent', { + child: getEntityName(selectedEntity.record), + parent: getEntityName(policy), + })} )} diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/RolesDetailPage/RolesDetailPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/RolesDetailPage/RolesDetailPage.tsx index 6759418b0db..ae09add300d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/RolesDetailPage/RolesDetailPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/RolesPage/RolesDetailPage/RolesDetailPage.tsx @@ -357,20 +357,20 @@ const RolesDetailPage = () => { closable={false} confirmLoading={isLoadingOnSave} okText={t('label.confirm')} + open={!isUndefined(selectedEntity.record)} title={`${t('label.remove-entity', { entity: getEntityName(selectedEntity.record), })} ${t('label.from-lowercase')} ${getEntityName(role)}`} - visible={!isUndefined(selectedEntity.record)} onCancel={() => setEntity(undefined)} onOk={async () => { await handleDelete(selectedEntity.record, selectedEntity.attribute); setEntity(undefined); }}> - {t('message.sure-to-remove')}{' '} - {`${getEntityName(selectedEntity.record)} ${t( - 'label.from-lowercase' - )} ${getEntityName(role)}?`} + {t('message.are-you-sure-you-want-to-remove-child-from-parent', { + child: getEntityName(selectedEntity.record), + parent: getEntityName(role), + })} )}