From 09d1e9cadd40ba32402468edf422026b2a12d40e Mon Sep 17 00:00:00 2001 From: karanh37 <33024356+karanh37@users.noreply.github.com> Date: Wed, 12 Jul 2023 11:07:30 +0530 Subject: [PATCH] fix: ui feedbacks (#12356) * fix: glossary rename issue * fix: owner label redirections * fix: feedbacks * fix: feedbacks * fix: alignment issues of mydata, following and recently_viewed * fix: feedbacks * fix: remove maxlength * fix: unit tests * fix unit tests * fix: cypress tests * fix: cypress tests * fix: review comments --- .../resources/ui/cypress/common/common.js | 5 +- .../e2e/Flow/AddAndRemoveTierAndOwner.spec.js | 22 +++++++-- .../ui/cypress/e2e/Pages/Service.spec.js | 1 - .../CustomControls.component.tsx | 5 +- .../EntityLineage/CustomEdge.component.tsx | 8 +-- .../components/EntityLineage/custom-node.less | 13 +++-- .../EntityLineage/entityLineage.style.less | 10 ++-- .../src/components/EntityList/EntityList.tsx | 2 +- .../explore-search-card.less | 8 +++ .../MyDataWidget/MyDataWidget.component.tsx | 2 +- .../TableDataCardBody/TableDataCardBody.tsx | 2 +- .../Team/TeamDetails/TeamDetailsV1.tsx | 49 ++++++------------- .../recently-viewed/RecentlyViewed.tsx | 2 +- .../recently-viewed/recently-viewed.less | 7 --- .../ui/src/locale/languages/en-us.json | 2 +- .../ui/src/locale/languages/es-es.json | 2 +- .../ui/src/locale/languages/ja-jp.json | 2 +- .../ui/src/locale/languages/pt-br.json | 2 +- .../ElasticSearchReIndex.style.less | 6 ++- .../GlossaryPage/GlossaryPage.component.tsx | 12 ++--- .../GlossaryPage/GlossaryPage.test.tsx | 4 -- .../TestSuiteDetailsPage.component.tsx | 43 +++------------- .../TestSuiteDetailsPage.test.tsx | 3 -- .../ui/src/pages/database-details/index.tsx | 4 +- .../resources/ui/src/pages/service/index.tsx | 44 +++-------------- .../ui/src/styles/components/menu.less | 5 -- 26 files changed, 96 insertions(+), 169 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/cypress/common/common.js b/openmetadata-ui/src/main/resources/ui/cypress/common/common.js index cdc7261d0c9..91c1b440092 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/common/common.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/common/common.js @@ -1014,9 +1014,12 @@ export const updateOwner = () => { cy.get('[data-testid="hiden-layer"]').should('exist').click(); interceptURL('GET', '/api/v1/users?limit=15', 'getUsers'); // Clicking on edit owner button - cy.get('[data-testid="add-user"]').should('be.visible').click(); + cy.get('[data-testid="edit-owner"]').should('be.visible').click(); + + cy.get('.user-team-select-popover').contains('Users').click(); cy.get('[data-testid="selectable-list"]') + .eq(1) .find(`[title="${text.trim()}"]`) .click(); diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/AddAndRemoveTierAndOwner.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/AddAndRemoveTierAndOwner.spec.js index f8372bd66ce..621edbee792 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/AddAndRemoveTierAndOwner.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Flow/AddAndRemoveTierAndOwner.spec.js @@ -205,14 +205,28 @@ describe('Add and Remove Owner and Tier', () => { verifyResponseStatusCode('@getOrganization', 200); verifyResponseStatusCode('@teamPermission', 200); - cy.get('[data-testid="add-user"]').should('be.visible').click(); - verifyResponseStatusCode('@getUsers', 200); - cy.get(`.ant-popover [title="${OWNER}"]`).should('be.visible').click(); + interceptURL( + 'GET', + 'api/v1/search/query?q=**%20AND%20isBot:false&from=0&size=0&index=user_search_index', + 'waitForUsers' + ); + + // Click on edit owner button + cy.get('[data-testid="edit-owner"]').click(); + verifyResponseStatusCode('@waitForUsers', 200); + + cy.get('.user-team-select-popover').contains('Users').click(); + + cy.get('[data-testid="selectable-list"]') + .eq(1) + .find(`[title="${OWNER}"]`) + .click(); + verifyResponseStatusCode('@patchOwner', 200); cy.get('[data-testid="owner-link"]') .should('be.visible') .should('contain', OWNER); - cy.get('[data-testid="add-user"]').should('be.visible').click(); + cy.get('[data-testid="edit-owner"]').should('be.visible').click(); verifyResponseStatusCode('@getUsers', 200); cy.get('[data-testid="remove-owner"]').should('be.visible').click(); verifyResponseStatusCode('@patchOwner', 200); diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Service.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Service.spec.js index 00d54bcb0c1..3725ecc6c9a 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Service.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Service.spec.js @@ -105,7 +105,6 @@ describe('Services page should work properly', () => { verifyResponseStatusCode('@updateService', 200); - cy.get('[data-testid="owner-dropdown"]').should('have.text', service.Owner); // Checking if description exists after assigning the owner cy.get(':nth-child(1) > .link-title').click(); // need wait here diff --git a/openmetadata-ui/src/main/resources/ui/src/components/EntityLineage/CustomControls.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/EntityLineage/CustomControls.component.tsx index 184ab12a39e..f9a37170d53 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/EntityLineage/CustomControls.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/EntityLineage/CustomControls.component.tsx @@ -148,7 +148,7 @@ const CustomControls: FC = ({ ); @@ -270,8 +270,7 @@ const CustomControls: FC = ({ className={classNames( 'custom-control-edit-button h-8 w-8 rounded-full p-x-xss', { - 'bg-primary': !isEditMode, - 'bg-primary-hover-lite': isEditMode, + 'bg-primary': isEditMode, } )} data-testid="edit-lineage" diff --git a/openmetadata-ui/src/main/resources/ui/src/components/EntityLineage/CustomEdge.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/EntityLineage/CustomEdge.component.tsx index f18e0786d9c..76afaf78bc5 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/EntityLineage/CustomEdge.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/EntityLineage/CustomEdge.component.tsx @@ -122,10 +122,9 @@ export const CustomEdge = ({ return (