From b03411470d076b1b21dd1f73f09f69e5e7a3d6b1 Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Thu, 16 Jun 2022 22:05:22 +0530 Subject: [PATCH] Fixed: Glossary-tag issue and added skipped cypress tests (#5476) * Fixed glossary tag issue and added skip test related to glossary * align the icon of tags and fixed failing cypress test --- .../integration/Pages/Glossary.spec.js | 32 +++++++++---------- .../common/entityPageInfo/EntityPageInfo.tsx | 10 +++--- .../resources/ui/src/interface/types.d.ts | 1 + .../resources/ui/src/utils/GlossaryUtils.ts | 4 +-- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/cypress/integration/Pages/Glossary.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/integration/Pages/Glossary.spec.js index 621f3679c29..18f8f032394 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/integration/Pages/Glossary.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/integration/Pages/Glossary.spec.js @@ -310,8 +310,8 @@ describe('Glossary page should work properly', () => { .contains(term2) .should('be.visible'); }); - // Todo: remove skip once glossary term deletion bug is fixed - it.skip('Assets Tab should work properly', () => { + + it('Assets Tab should work properly', () => { const term = NEW_GLOSSARY_TERMS.term_1.name; const entity = SEARCH_ENTITY_TABLE.table_3.term; goToAssetsTab(term); @@ -334,7 +334,7 @@ describe('Glossary page should work properly', () => { .should('be.visible'); }); - it.skip('Remove Glossary term from entity should work properly', () => { + it('Remove Glossary term from entity should work properly', () => { const term = NEW_GLOSSARY_TERMS.term_1.name; const entity = SEARCH_ENTITY_TABLE.table_3.term; // go assets tab @@ -345,36 +345,36 @@ describe('Glossary page should work properly', () => { .click(); cy.wait(500); // redirect to entity detail page - cy.get( - '[data-testid="tags-wrapper"] > [data-testid="tag-container"] > .tw-flex > .tw-ml-1 > [data-testid="image"]' - ) + cy.get('[data-testid="entity-tags"]') + .find('[data-testid="edit-button"]') .scrollIntoView() .should('be.visible') .click(); - cy.get(':nth-child(1) > [data-testid="remove"]') + cy.get(':nth-child(1) > .css-xb97g8') .scrollIntoView() .should('be.visible') .click(); - cy.get(':nth-child(1) > [data-testid="remove"]') + cy.get(':nth-child(1) > .css-xb97g8') .scrollIntoView() .should('be.visible') .click(); cy.get('[data-testid="saveAssociatedTag"]').scrollIntoView().click(); cy.get( - '[data-testid="tag-container"] > .tw-flex > .tw-opacity-0 > [data-testid="image"]' + ':nth-child(1) > :nth-child(5) > [data-testid="tags-wrapper"] > :nth-child(1) > :nth-child(1) > [data-testid="tag-container"] > div' ) .scrollIntoView() - .should('exist') - .click(); - cy.get(':nth-child(1) > [data-testid="remove"]') - .scrollIntoView() - .should('exist') + .should('be.visible') .click(); - cy.get(':nth-child(1) > [data-testid="remove"]') + cy.get(':nth-child(1) > .css-xb97g8') .scrollIntoView() - .should('exist') + .should('be.visible') + .click(); + + cy.get(':nth-child(1) > .css-xb97g8') + .scrollIntoView() + .should('be.visible') .click(); cy.get('[data-testid="saveAssociatedTag"]').scrollIntoView().click(); cy.get( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/common/entityPageInfo/EntityPageInfo.tsx b/openmetadata-ui/src/main/resources/ui/src/components/common/entityPageInfo/EntityPageInfo.tsx index 40489ff9d50..6c3457038ea 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/common/entityPageInfo/EntityPageInfo.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/common/entityPageInfo/EntityPageInfo.tsx @@ -271,7 +271,7 @@ const EntityPageInfo = ({ if (!isUndefined(entityFieldThreads)) { return !isUndefined(tagThread) ? (

onThreadLinkSelect?.(tagThread.entityLink)}> @@ -283,7 +283,7 @@ const EntityPageInfo = ({

) : (

onThreadLinkSelect?.( @@ -420,7 +420,7 @@ const EntityPageInfo = ({ ))}

{(!isEditable || !isTagEditable || deleted) && ( <> @@ -478,7 +478,9 @@ const EntityPageInfo = ({ handleTagSelection(tags); }}> {tags.length || tier ? ( -