diff --git a/openmetadata-ui/src/main/resources/ui/cypress/constants/constants.js b/openmetadata-ui/src/main/resources/ui/cypress/constants/constants.js index 7dfbbe8b2d4..b69c0ac0d6d 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/constants/constants.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/constants/constants.js @@ -244,11 +244,13 @@ export const NEW_GLOSSARY_TERMS = { name: 'Purchase', description: 'This is the Purchase', synonyms: 'buy,collect,acquire', + fullyQualifiedName: 'Business Glossary.Purchase', }, term_2: { name: 'Sales', description: 'This is the Sales', synonyms: 'give,disposal,deal', + fullyQualifiedName: 'Business Glossary.Sales', }, }; export const GLOSSARY_TERM_WITH_DETAILS = { @@ -259,6 +261,7 @@ export const GLOSSARY_TERM_WITH_DETAILS = { relatedTerms: 'Sales', reviewer: 'Colin Ho', inheritedReviewer: 'Aaron Johnson', + fullyQualifiedName: 'Business Glossary.Accounts', }; export const NEW_GLOSSARY_1_TERMS = { @@ -266,11 +269,13 @@ export const NEW_GLOSSARY_1_TERMS = { name: 'Features', description: 'This is the Features', synonyms: 'data,collect,time', + fullyQualifiedName: 'Product Glossary.Features', }, term_2: { name: 'Uses', description: 'This is the Uses', synonyms: 'home,business,adventure', + fullyQualifiedName: 'Product Glossary.Uses', }, }; diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Glossary.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Glossary.spec.js index e15aa48b862..1a802276e97 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Glossary.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Glossary.spec.js @@ -21,7 +21,6 @@ import { } from '../../common/common'; import { DELETE_TERM, - GLOSSARY_TERM_WITH_DETAILS, NEW_GLOSSARY, NEW_GLOSSARY_1, NEW_GLOSSARY_1_TERMS, @@ -29,19 +28,19 @@ import { SEARCH_ENTITY_TABLE, } from '../../constants/constants'; -const visitGlossaryTermPage = (termName) => { - cy.get(`[data-row-key="${termName}"]`) +const visitGlossaryTermPage = (termName, fqn) => { + cy.get(`[data-row-key="${fqn}"]`) .scrollIntoView() .should('be.visible') .contains(termName) .should('be.visible') .click(); - cy.get('.ant-tabs [id*=tab-summary]').should('be.visible').click(); + cy.get('.ant-tabs .glossary-overview-tab').should('be.visible').click(); verifyResponseStatusCode('@getGlossaryTerms', 200); }; const checkDisplayName = (displayName) => { - cy.get('[data-testid="glossary-display-name"]') + cy.get('[data-testid="entity-header-display-name"]') .scrollIntoView() .should('exist') .and('be.visible') @@ -76,7 +75,7 @@ const fillGlossaryTermDetails = (term, glossary, isMutually = false) => { .should('be.visible') .click(); } - cy.get('[data-testid="references"] > .ant-space-item > .button-comp') + cy.get('[data-testid="add-reference"]') .scrollIntoView() .should('be.visible') .click(); @@ -97,17 +96,15 @@ const createGlossaryTerm = (term, glossary, isMutually = false) => { .should('be.visible') .click(); - cy.get(`[data-row-key="${term.name}"]`) + cy.get(`[data-row-key="${glossary.name}.${term.name}"]`) .scrollIntoView() .should('be.visible') .contains(term.name) .should('be.visible'); }; -const deleteGlossaryTerm = ({ name }) => { - visitGlossaryTermPage(name); - - cy.get('[data-testid="inactive-link"]').contains(name).should('be.visible'); +const deleteGlossaryTerm = ({ name, fullyQualifiedName }) => { + visitGlossaryTermPage(name, fullyQualifiedName); cy.get('[data-testid="manage-button"]').should('be.visible').click(); cy.get('[data-testid="delete-button"]') @@ -140,15 +137,18 @@ const deleteGlossaryTerm = ({ name }) => { .should('not.contain', name); }; -const goToAssetsTab = (term) => { - visitGlossaryTermPage(term); +const goToAssetsTab = (name, fqn) => { + visitGlossaryTermPage(name, fqn); - cy.get('[data-testid="inactive-link"]').contains(term).should('be.visible'); cy.get('[data-testid="assets"]').should('be.visible').click(); cy.get('.ant-tabs-tab-active').contains('Assets').should('be.visible'); }; -describe.skip('Glossary page should work properly', () => { +const selectActiveGlossary = (glossaryName) => { + cy.get('.ant-menu-item').contains(glossaryName).should('be.visible').click(); +}; + +describe('Glossary page should work properly', () => { beforeEach(() => { cy.login(); @@ -200,13 +200,6 @@ describe.skip('Glossary page should work properly', () => { .click(); interceptURL('GET', '/api/v1/tags?limit=1000', 'fetchTags'); - interceptURL( - 'GET', - `/api/v1/search/query?q=*${encodeURI( - NEW_GLOSSARY.reviewer - )}*&from=0&size=15&index=user_search_index`, - 'getReviewer' - ); cy.get('[data-testid="tags-container"] .ant-select-selection-overflow') .scrollIntoView() .should('be.visible') @@ -223,7 +216,6 @@ describe.skip('Glossary page should work properly', () => { cy.get('[data-testid="searchbar"]') .should('be.visible') .type(NEW_GLOSSARY.reviewer); - verifyResponseStatusCode('@getReviewer', 200); cy.get(`[title="${NEW_GLOSSARY.reviewer}"]`) .scrollIntoView() .should('be.visible') @@ -313,38 +305,42 @@ describe.skip('Glossary page should work properly', () => { }); it('Verify and Remove Tags from Glossary', () => { + selectActiveGlossary(NEW_GLOSSARY.name); // Verify Tags which is added at the time of creating glossary - cy.get('[data-testid="tags-card-container"]') + cy.get('[data-testid="tag-container"]') .contains('Personal') .should('be.visible'); + cy.wait(5000); + // Remove Tag - cy.get('[data-testid="tags-wrapper"] [data-testid="add-tag"]') - .should('be.visible') + cy.get('[data-testid="tags-input-container"] [data-testid="edit-button"]') + .should('exist') + .and('be.visible') .click(); cy.get('.ant-select-selection-item-remove').should('be.visible').click(); interceptURL('PATCH', '/api/v1/glossaries/*', 'updateGlossary'); cy.get('[data-testid="saveAssociatedTag"]').should('be.visible').click(); verifyResponseStatusCode('@updateGlossary', 200); - cy.get('[data-testid="tags-wrapper"]') - .contains('Tags') - .should('be.visible'); + cy.get('[data-testid="add-tag"]').should('be.visible'); }); it('Verify added glossary details', () => { cy.get('[data-testid="glossary-left-panel"]') .contains(NEW_GLOSSARY.name) .should('be.visible'); + selectActiveGlossary(NEW_GLOSSARY.name); + cy.wait(2000); checkDisplayName(NEW_GLOSSARY.name); + cy.get('[data-testid="viewer-container"]') .invoke('text') .then((text) => { expect(text).to.contain(NEW_GLOSSARY.description); }); - cy.get('[data-testid="reviewer-card-container"]').should('be.visible'); - cy.get(`[data-testid="user-tag"]`) + cy.get(`[data-testid="glossary-reviewer-name"]`) .invoke('text') .then((text) => { expect(text).to.contain(NEW_GLOSSARY.reviewer); @@ -360,6 +356,9 @@ describe.skip('Glossary page should work properly', () => { .contains(NEW_GLOSSARY_1.name) .should('be.visible'); + selectActiveGlossary(NEW_GLOSSARY_1.name); + cy.wait(2000); + checkDisplayName(NEW_GLOSSARY_1.name); cy.get('[data-testid="viewer-container"]') .invoke('text') @@ -368,33 +367,27 @@ describe.skip('Glossary page should work properly', () => { }); }); - it.skip('Create glossary term should work properly', () => { + it('Create glossary term should work properly', () => { const terms = Object.values(NEW_GLOSSARY_TERMS); + selectActiveGlossary(NEW_GLOSSARY.name); terms.forEach((term) => createGlossaryTerm(term, NEW_GLOSSARY, true)); // Glossary term for Product glossary - cy.log('One finished'); - cy.get('.ant-menu-item') - .contains(NEW_GLOSSARY_1.name) - .should('be.visible') - .click(); + + selectActiveGlossary(NEW_GLOSSARY_1.name); const ProductTerms = Object.values(NEW_GLOSSARY_1_TERMS); ProductTerms.forEach((term) => createGlossaryTerm(term, NEW_GLOSSARY_1)); }); - it.skip('Updating data of glossary should work properly', () => { + it('Updating data of glossary should work properly', () => { + selectActiveGlossary(NEW_GLOSSARY.name); const newDescription = 'Updated description'; // updating tags - cy.get('[data-testid="tag-container"]') + cy.get('[data-testid="tags-input-container"] [data-testid="add-tag"]') .should('exist') .and('be.visible') - .within(() => { - cy.get('[data-testid="add-tag"]') - .should('exist') - .and('be.visible') - .click(); - }); + .click(); cy.get('[data-testid="tag-selector"]') .scrollIntoView() @@ -431,8 +424,10 @@ describe.skip('Glossary page should work properly', () => { .should('be.visible'); }); - it.skip('Update glossary term synonyms', () => { + it('Update glossary term synonyms', () => { + selectActiveGlossary(NEW_GLOSSARY.name); const uSynonyms = ['pick up', 'take', 'obtain']; + const { name, fullyQualifiedName } = NEW_GLOSSARY_TERMS.term_1; interceptURL( 'GET', `/api/v1/glossaryTerms/name/*.${NEW_GLOSSARY_TERMS.term_1.name}?fields=*`, @@ -443,33 +438,38 @@ describe.skip('Glossary page should work properly', () => { '/api/v1/permissions/glossaryTerm/*', 'waitForTermPermission' ); - visitGlossaryTermPage(NEW_GLOSSARY_TERMS.term_1.name); + + visitGlossaryTermPage(name, fullyQualifiedName); verifyResponseStatusCode('@getGlossaryTerm', 200); verifyResponseStatusCode('@waitForTermPermission', 200); // updating synonyms - cy.get('[data-testid="section-synonyms"]') + cy.get('[data-testid="synonyms-container"]') .scrollIntoView() .should('be.visible'); cy.wait(200); - cy.get('[data-testid="section-synonyms"]') + cy.get('[data-testid="synonyms-container"]') .find('[data-testid="edit-button"]') .scrollIntoView() .should('be.visible') .click(); - cy.get('.ant-select-selector').should('be.visible'); - cy.get('.ant-select-clear > .anticon > svg') + cy.get('[data-testid="synonyms-container"] .ant-select-selector').should( + 'be.visible' + ); + cy.get( + '[data-testid="synonyms-container"] .ant-select-selection-item-remove' + ) .should('exist') - .click({ force: true }); + .click({ force: true, multiple: true }); cy.get('.ant-select-selection-overflow') .should('exist') .type(uSynonyms.join('{enter}')); interceptURL('PATCH', '/api/v1/glossaryTerms/*', 'saveSynonyms'); - cy.get('[data-testid="save-btn"]').should('be.visible').click(); + cy.get('[data-testid="save-synonym-btn"]').should('be.visible').click(); verifyResponseStatusCode('@saveSynonyms', 200); cy.get('[data-testid="synonyms-container"]') @@ -481,13 +481,15 @@ describe.skip('Glossary page should work properly', () => { }); }); - it.skip('Update glossary term reference and related terms', () => { + it('Update glossary term reference', () => { + selectActiveGlossary(NEW_GLOSSARY.name); const newRef = { name: 'take', url: 'https://take.com' }; - const term2 = NEW_GLOSSARY_TERMS.term_2.name; + const { name, fullyQualifiedName } = NEW_GLOSSARY_TERMS.term_1; + // Navigate to glossary term interceptURL( 'GET', - `/api/v1/glossaryTerms/name/*.${NEW_GLOSSARY_TERMS.term_1.name}?fields=*`, + `/api/v1/glossaryTerms/name/*.${name}?fields=*`, 'getGlossaryTerm' ); interceptURL( @@ -495,17 +497,19 @@ describe.skip('Glossary page should work properly', () => { '/api/v1/permissions/glossaryTerm/*', 'waitForTermPermission' ); - visitGlossaryTermPage(NEW_GLOSSARY_TERMS.term_1.name); + visitGlossaryTermPage(name, fullyQualifiedName); verifyResponseStatusCode('@getGlossaryTerm', 200); verifyResponseStatusCode('@waitForTermPermission', 200); - cy.get('[data-testid="section-references"]').should('be.visible'); + cy.get('[data-testid="section-References"]').should('be.visible'); cy.wait(200); // updating References - cy.get('[data-testid="section-references"]') + cy.get('[data-testid="section-References"]') .find('[data-testid="edit-button"]') .should('exist') .click(); - cy.get('[data-testid="add-button"]').should('be.visible').click(); + cy.get('[data-testid="add-references-button"]') + .should('be.visible') + .click(); cy.get('#references_1_name').should('be.visible').type(newRef.name); cy.get('#references_1_endpoint').should('be.visible').type(newRef.url); interceptURL('PATCH', '/api/v1/glossaryTerms/*', 'saveGlossaryTermData'); @@ -516,12 +520,33 @@ describe.skip('Glossary page should work properly', () => { .should('be.visible') .invoke('attr', 'href') .should('eq', newRef.url); + }); - // add relented term - cy.get('[data-testid="section-related-terms"]') + it('Update glossary related terms', () => { + selectActiveGlossary(NEW_GLOSSARY.name); + const term2 = NEW_GLOSSARY_TERMS.term_2.name; + const { name, fullyQualifiedName } = NEW_GLOSSARY_TERMS.term_1; + interceptURL('PATCH', '/api/v1/glossaryTerms/*', 'saveGlossaryTermData'); + // Navigate to glossary term + interceptURL( + 'GET', + `/api/v1/glossaryTerms/name/*.${name}?fields=*`, + 'getGlossaryTerm' + ); + interceptURL( + 'GET', + '/api/v1/permissions/glossaryTerm/*', + 'waitForTermPermission' + ); + visitGlossaryTermPage(name, fullyQualifiedName); + verifyResponseStatusCode('@getGlossaryTerm', 200); + verifyResponseStatusCode('@waitForTermPermission', 200); + + // add related term + cy.get('[data-testid="related-term-container"]') .scrollIntoView() .should('be.visible'); - cy.get('[data-testid="section-related-terms"] [data-testid="edit-button"]') + cy.get('[data-testid="related-term-add-button"]') .scrollIntoView() .should('be.visible') .click({ force: true }); @@ -537,7 +562,9 @@ describe.skip('Glossary page should work properly', () => { .should('be.visible') .click(); - cy.get('[data-testid="save-btn"]').should('be.visible').click(); + cy.get('[data-testid="save-related-term-btn"]') + .should('be.visible') + .click(); verifyResponseStatusCode('@saveGlossaryTermData', 200); cy.get('[data-testid="related-term-container"]') @@ -545,17 +572,19 @@ describe.skip('Glossary page should work properly', () => { .should('be.visible'); }); - it.skip('Updating description and tags of glossary term should work properly', () => { + it('Updating description and tags of glossary term should work properly', () => { + selectActiveGlossary(NEW_GLOSSARY.name); interceptURL('GET', '/api/v1/permissions/*/*', 'permissionApi'); interceptURL('GET', '/api/v1/search/query?*', 'glossaryAPI'); - const term = NEW_GLOSSARY_TERMS.term_1.name; + const newDescription = 'Updated description'; - visitGlossaryTermPage(term); + const { name, fullyQualifiedName } = NEW_GLOSSARY_TERMS.term_1; + visitGlossaryTermPage(name, fullyQualifiedName); verifyResponseStatusCode('@permissionApi', 200); verifyResponseStatusCode('@glossaryAPI', 200); // updating tags - cy.get('[data-testid="tag-container"]') + cy.get('[data-testid="tag-container"] [data-testid="add-tag"]') .scrollIntoView() .should('be.visible') .click(); @@ -591,11 +620,10 @@ describe.skip('Glossary page should work properly', () => { cy.get('[data-testid="viewer-container"]') .contains(newDescription) .should('be.visible'); - - cy.get('[data-testid="inactive-link"]').contains(term).should('be.visible'); }); - it.skip('Assets Tab should work properly', () => { + it('Assets Tab should work properly', () => { + selectActiveGlossary(NEW_GLOSSARY.name); const glossary = NEW_GLOSSARY.name; const term1 = NEW_GLOSSARY_TERMS.term_1.name; const term2 = NEW_GLOSSARY_TERMS.term_2.name; @@ -611,9 +639,13 @@ describe.skip('Glossary page should work properly', () => { .should('be.visible') .click(); - goToAssetsTab(term3); - cy.contains('No assets available.').should('be.visible'); - cy.get('[data-testid="no-data-image"]').should('be.visible'); + goToAssetsTab( + NEW_GLOSSARY_1_TERMS.term_1.name, + NEW_GLOSSARY_1_TERMS.term_1.fullyQualifiedName + ); + cy.contains('Adding a new Asset is easy, just give it a spin!').should( + 'be.visible' + ); visitEntityDetailsPage(entity.term, entity.serviceName, entity.entity); // Add tag to breadcrumb @@ -733,176 +765,26 @@ describe.skip('Glossary page should work properly', () => { .contains(NEW_GLOSSARY_1.name) .should('be.visible') .click(); - goToAssetsTab(term3); + goToAssetsTab( + NEW_GLOSSARY_1_TERMS.term_1.name, + NEW_GLOSSARY_1_TERMS.term_1.fullyQualifiedName + ); cy.get(`[data-testid="${entity.serviceName}-${entity.term}"]`) .contains(entity.term) .should('be.visible'); }); - it.skip('Create glossaryTerm with tags, related terms, synonyms, references and reviewer & verify API payload', () => { - interceptURL( - 'GET', - '/api/v1/search/query?q=*&from=0&size=10&index=glossary_search_index', - 'searchGlossaryTerm' - ); - - interceptURL('GET', '/api/v1/users/*?fields=profile', 'getProfile'); - fillGlossaryTermDetails(GLOSSARY_TERM_WITH_DETAILS, NEW_GLOSSARY); - // Add Tags - interceptURL('GET', '/api/v1/tags?limit=1000', 'fetchTags'); - cy.get('[data-testid="tags-container"] .ant-select-selection-overflow') - .scrollIntoView() - .should('be.visible') - .type(GLOSSARY_TERM_WITH_DETAILS.tag); - verifyResponseStatusCode('@fetchTags', 200); - cy.get(`[title="${GLOSSARY_TERM_WITH_DETAILS.tag}"]`) - .should('be.visible') - .click(); - cy.get('#right-panel').click(); - - // Add Related terms - cy.get('[data-testid="add-related-terms"]') - .scrollIntoView() - .should('be.visible') - .click(); - cy.get('.ant-modal-body').should('be.visible'); - cy.get('[data-testid="searchbar"]') - .should('be.visible') - .type(GLOSSARY_TERM_WITH_DETAILS.relatedTerms); - cy.get('[data-testid="searchbar"]').should( - 'have.value', - GLOSSARY_TERM_WITH_DETAILS.relatedTerms - ); - verifyResponseStatusCode('@searchGlossaryTerm', 200); - - cy.get('[data-testid="user-card-container"]') - .contains(GLOSSARY_TERM_WITH_DETAILS.relatedTerms) - .parents('[data-testid="user-card-container"]') - .find('[data-testid="checkboxAddUser"]') - .should('be.visible') - .click(); - // cy.get('').should('be.visible').click(); - cy.get('[data-testid="saveButton"]').should('be.visible').click(); - cy.get('.ant-modal-body').should('not.exist'); - - interceptURL( - 'GET', - `/api/v1/search/query?q=*${encodeURI( - GLOSSARY_TERM_WITH_DETAILS.reviewer - )}*&from=0&size=15&index=user_search_index`, - 'searchReviewer' - ); - - // Add reviewer - cy.get('[data-testid="add-reviewers"]') - .scrollIntoView() - .should('be.visible') - .click(); - - // cy.get('.ant-modal-body').should('be.visible'); - cy.get('[data-testid="searchbar"]') - .should('be.visible') - .type(GLOSSARY_TERM_WITH_DETAILS.reviewer); - - verifyResponseStatusCode('@searchReviewer', 200); - - cy.get(`[title="${GLOSSARY_TERM_WITH_DETAILS.reviewer}"]`) - .scrollIntoView() - .should('be.visible') - .click(); - - cy.get('[data-testid="selectable-list-update-btn"]') - .should('be.visible') - .click(); - - interceptURL('POST', '/api/v1/glossaryTerms', 'createGlossaryTerms'); - cy.get('[data-testid="save-glossary-term"]') - .scrollIntoView() - .should('be.visible') - .click(); - - cy.wait('@createGlossaryTerms').then(({ request }) => { - const synonym = GLOSSARY_TERM_WITH_DETAILS.synonyms.split(','); - - expect(request.body).to.have.all.keys( - 'description', - 'displayName', - 'mutuallyExclusive', - 'name', - 'glossary', - 'references', - 'relatedTerms', - 'reviewers', - 'tags', - 'synonyms' - ); - expect(request.body.displayName).equals(GLOSSARY_TERM_WITH_DETAILS.name); - expect(request.body.name).equals(GLOSSARY_TERM_WITH_DETAILS.name); - expect(request.body.description).equals( - GLOSSARY_TERM_WITH_DETAILS.description - ); - expect(request.body.mutuallyExclusive).equals(false); - expect(request.body.glossary).equals(NEW_GLOSSARY.name); - expect(request.body.reviewers).has.length(2); - expect(request.body.references).has.length(1); - expect(request.body.references[0]).to.have.all.keys('name', 'endpoint'); - expect(request.body.synonyms).has.length(synonym.length); - expect(request.body.synonyms).to.deep.equal(synonym); - expect(request.body.tags).has.length(1); - expect(request.body.tags[0]).to.deep.equal({ - labelType: 'Manual', - state: 'Confirmed', - tagFQN: 'PersonalData.Personal', - source: 'Classification', - }); - }); - }); - - it.skip('Verify details of created glossaryTerm', () => { - interceptURL( - 'GET', - `/api/v1/glossaryTerms/name/*.${GLOSSARY_TERM_WITH_DETAILS.name}?fields=*`, - 'getGlossaryTerm' - ); - interceptURL( - 'GET', - '/api/v1/permissions/glossaryTerm/*', - 'waitForTermPermission' - ); - visitGlossaryTermPage(GLOSSARY_TERM_WITH_DETAILS.name); - - verifyResponseStatusCode('@getGlossaryTerm', 200); - verifyResponseStatusCode('@waitForTermPermission', 200); - cy.get('[data-testid="glossary-term"] > :nth-child(1)') - .scrollIntoView() - .as('glossaryTermDetailsPanel'); - cy.get('@glossaryTermDetailsPanel').contains('admin').should('be.visible'); - cy.get('[data-testid="user-tag"]') - .contains(GLOSSARY_TERM_WITH_DETAILS.reviewer) - .should('be.visible'); - cy.get('@glossaryTermDetailsPanel') - .find(`[data-testid="user-tag"]`) - .contains(GLOSSARY_TERM_WITH_DETAILS.inheritedReviewer) - .should('be.visible'); - cy.get('[data-testid="add-tag"]') - .contains(GLOSSARY_TERM_WITH_DETAILS.tag) - .should('be.visible'); - }); - - it.skip('Remove Glossary term from entity should work properly', () => { + it('Remove Glossary term from entity should work properly', () => { const glossaryName = NEW_GLOSSARY_1.name; - const term = NEW_GLOSSARY_1_TERMS.term_1.name; + const { name, fullyQualifiedName } = NEW_GLOSSARY_1_TERMS.term_1; const entity = SEARCH_ENTITY_TABLE.table_3; - cy.get('.ant-menu-item') - .contains(NEW_GLOSSARY_1.name) - .should('be.visible') - .click(); + selectActiveGlossary(NEW_GLOSSARY_1.name); interceptURL('GET', '/api/v1/search/query*', 'assetTab'); // go assets tab - goToAssetsTab(term); + goToAssetsTab(name, fullyQualifiedName); verifyResponseStatusCode('@assetTab', 200); interceptURL('GET', '/api/v1/feed*', 'entityDetails'); @@ -933,17 +815,17 @@ describe.skip('Glossary page should work properly', () => { verifyResponseStatusCode('@removeTags', 200); cy.get('[data-testid="entity-tags"]') - .should('not.contain', term) + .should('not.contain', name) .and('not.contain', 'Personal'); // Remove the added column tag from entity interceptURL('PATCH', '/api/v1/tables/*', 'removeSchemaTags'); - cy.get(`[data-testid="remove-${glossaryName}.${term}-tag"]`) + cy.get(`[data-testid="remove-${glossaryName}.${name}-tag"]`) .should('be.visible') .click(); verifyResponseStatusCode('@removeSchemaTags', 200); cy.get('[data-testid="tags"]') - .should('not.contain', term) + .should('not.contain', name) .and('not.contain', 'Personal'); cy.get('[data-testid="governance"]') @@ -957,33 +839,29 @@ describe.skip('Glossary page should work properly', () => { cy.wait(500); - cy.get('.ant-menu-item') - .contains(NEW_GLOSSARY_1.name) - .should('be.visible') - .click(); + selectActiveGlossary(NEW_GLOSSARY_1.name); - goToAssetsTab(term); - cy.contains('No assets available.').should('be.visible'); - cy.get('[data-testid="no-data-image"]').should('be.visible'); + goToAssetsTab(name, fullyQualifiedName); + cy.contains('Adding a new Asset is easy, just give it a spin!').should( + 'be.visible' + ); }); - it.skip('Delete glossary term should work properly', () => { + it('Delete glossary term should work properly', () => { const terms = Object.values(NEW_GLOSSARY_TERMS); - + selectActiveGlossary(NEW_GLOSSARY.name); terms.forEach(deleteGlossaryTerm); + // Glossary term for Product glossary - - cy.get('.ant-menu-item') - .contains(NEW_GLOSSARY_1.name) - .should('be.visible') - .click(); - + selectActiveGlossary(NEW_GLOSSARY_1.name); Object.values(NEW_GLOSSARY_1_TERMS).forEach(deleteGlossaryTerm); }); it('Delete glossary should work properly', () => { [NEW_GLOSSARY.name, NEW_GLOSSARY_1.name].forEach((glossary) => { verifyResponseStatusCode('@fetchGlossaries', 200); + cy.get('.ant-menu-item').contains(glossary).should('be.visible').click(); + cy.wait(200); cy.get('[data-testid="manage-button"]').should('be.visible').click(); cy.get('[data-testid="delete-button"]') diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/edit-new.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/edit-new.svg index 3994b81a9f0..c51d4a93793 100644 --- a/openmetadata-ui/src/main/resources/ui/src/assets/svg/edit-new.svg +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/edit-new.svg @@ -1,12 +1,12 @@ - - + + - + - + diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-down-up-arrow.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-down-up-arrow.svg new file mode 100644 index 00000000000..ae905d2235c --- /dev/null +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-down-up-arrow.svg @@ -0,0 +1,4 @@ + + + + diff --git a/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-up-down-arrow.svg b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-up-down-arrow.svg index 92083e77a36..95c0da82f37 100644 --- a/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-up-down-arrow.svg +++ b/openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-up-down-arrow.svg @@ -1,4 +1,4 @@ - + - \ No newline at end of file + diff --git a/openmetadata-ui/src/main/resources/ui/src/components/EntityHeaderTitle/EntityHeaderTitle.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/EntityHeaderTitle/EntityHeaderTitle.component.tsx index a94adf5c839..f039441c266 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/EntityHeaderTitle/EntityHeaderTitle.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/EntityHeaderTitle/EntityHeaderTitle.component.tsx @@ -10,7 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Space, Typography } from 'antd'; +import { Col, Row, Typography } from 'antd'; import React from 'react'; interface props { @@ -21,23 +21,24 @@ interface props { const EntityHeaderTitle = ({ icon, name, displayName }: props) => { return ( - - - {icon} -
+ + {icon} + +
{name} + className="m-b-0 d-block entity-header-display-name text-lg font-bold" + data-testid="entity-header-display-name" + ellipsis={{ tooltip: true }}> {displayName}
- - + +
); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryHeaderButtons/GlossaryHeaderButtons.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryHeaderButtons/GlossaryHeaderButtons.component.tsx index bd0448258df..dfddad13729 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryHeaderButtons/GlossaryHeaderButtons.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryHeaderButtons/GlossaryHeaderButtons.component.tsx @@ -12,6 +12,7 @@ */ import { DownOutlined } from '@ant-design/icons'; import { Button, Col, Dropdown, Row, Space, Tooltip, Typography } from 'antd'; +import { ReactComponent as EditIcon } from 'assets/svg/edit-new.svg'; import { ReactComponent as ExportIcon } from 'assets/svg/ic-export.svg'; import { ReactComponent as ImportIcon } from 'assets/svg/ic-import.svg'; import { ReactComponent as IconDropdown } from 'assets/svg/menu.svg'; @@ -21,6 +22,7 @@ import EntityNameModal from 'components/Modals/EntityNameModal/EntityNameModal.c import { OperationPermission } from 'components/PermissionProvider/PermissionProvider.interface'; import VersionButton from 'components/VersionButton/VersionButton.component'; import { FQN_SEPARATOR_CHAR } from 'constants/char.constants'; +import { DE_ACTIVE_COLOR } from 'constants/constants'; import { EntityReference, Glossary } from 'generated/entity/data/glossary'; import { GlossaryTerm } from 'generated/entity/data/glossaryTerm'; import { cloneDeep, toString } from 'lodash'; @@ -177,7 +179,7 @@ const GlossaryHeaderButtons = ({ setShowActions(false); }}> - + @@ -245,8 +247,8 @@ const GlossaryHeaderButtons = ({ setIsNameEditing(true); setShowActions(false); }}> - - + + - + @@ -303,7 +305,7 @@ const GlossaryHeaderButtons = ({ if (permission.Create) { return isGlossary ? ( - + )}
} doc={GLOSSARIES_DOCS} @@ -299,7 +294,12 @@ const GlossaryTermTab = ({ type="text" onClick={toggleExpandAll}> - + {expandedRowKeys.length === childGlossaryTerms.length ? ( + + ) : ( + + )} + {expandedRowKeys.length === childGlossaryTerms.length ? t('label.collapse-all') : t('label.expand-all')} @@ -319,6 +319,7 @@ const GlossaryTermTab = ({ loading={isTableLoading} pagination={false} rowKey="fullyQualifiedName" + scroll={{ x: true }} size="small" tableLayout="auto" onRow={onTableRow} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryV1.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryV1.component.tsx index 284cd250354..34177e4e9f1 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryV1.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Glossary/GlossaryV1.component.tsx @@ -65,6 +65,7 @@ const GlossaryV1 = ({ useState(DEFAULT_ENTITY_PERMISSION); const [glossaryTerms, setGlossaryTerms] = useState([]); + const { id } = selectedData ?? {}; const handleCancelGlossaryExport = () => history.push(getGlossaryPath(selectedData.name)); @@ -129,15 +130,11 @@ const GlossaryV1 = ({ }; const loadGlossaryTerms = useCallback(() => { - fetchGlossaryTerm( - isGlossaryActive - ? { glossary: selectedData.id } - : { parent: selectedData.id } - ); - }, [selectedData, isGlossaryActive]); + fetchGlossaryTerm(isGlossaryActive ? { glossary: id } : { parent: id }); + }, [id, isGlossaryActive]); useEffect(() => { - if (selectedData) { + if (id) { loadGlossaryTerms(); if (isGlossaryActive) { isVersionsView @@ -149,7 +146,7 @@ const GlossaryV1 = ({ : fetchGlossaryTermPermission(); } } - }, [selectedData, isGlossaryActive, isVersionsView]); + }, [id, isGlossaryActive, isVersionsView]); return isImportAction ? ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryDetailsRightPanel/GlossaryDetailsRightPanel.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryDetailsRightPanel/GlossaryDetailsRightPanel.component.tsx index 7cbfd858583..8f4ec1bc1eb 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryDetailsRightPanel/GlossaryDetailsRightPanel.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryDetailsRightPanel/GlossaryDetailsRightPanel.component.tsx @@ -10,7 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Button, Card, Space, Typography } from 'antd'; +import { Button, Card, Col, Row, Space, Typography } from 'antd'; import { ReactComponent as EditIcon } from 'assets/svg/edit-new.svg'; import { ReactComponent as PlusIcon } from 'assets/svg/plus-primary.svg'; import ProfilePicture from 'components/common/ProfilePicture/ProfilePicture'; @@ -86,11 +86,11 @@ const GlossaryDetailsRightPanel = ({ return ( - - - + + +
{t('label.owner')} @@ -108,35 +108,34 @@ const GlossaryDetailsRightPanel = ({ /> )} - - - {selectedData.owner && getEntityName(selectedData.owner) ? ( - - - - {getEntityName(selectedData.owner)} - - - ) : ( - - {t('label.no-entity', { - entity: t('label.owner-lowercase'), - })} - - )} - - - - +
+ + {selectedData.owner && getEntityName(selectedData.owner) ? ( + + + + {getEntityName(selectedData.owner)} + + + ) : ( + + {t('label.no-entity', { + entity: t('label.owner-lowercase'), + })} + + )} + + +
+ className="tw-text-base font-medium" + data-testid="glossary-reviewer-heading-name"> {t('label.reviewer-plural')} {hasEditReviewerAccess && @@ -151,14 +150,15 @@ const GlossaryDetailsRightPanel = ({ className="cursor-pointer flex-center" data-testid="edit-reviewer-button" icon={} + size="small" type="text" /> )} - - +
+
{selectedData.reviewers && selectedData.reviewers.length > 0 && ( - + {selectedData.reviewers.map((reviewer) => ( )} - - - - {isGlossary && ( - - +
+ + +
+ {isGlossary && ( - - - )} - + )} +
+ +
); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryDetailsRightPanel/GlossaryDetailsRightPanel.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryDetailsRightPanel/GlossaryDetailsRightPanel.test.tsx index 797c6c17be7..d9f4401fc4f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryDetailsRightPanel/GlossaryDetailsRightPanel.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryDetailsRightPanel/GlossaryDetailsRightPanel.test.tsx @@ -54,7 +54,7 @@ describe('GlossaryDetailsRightPanel', () => { ); expect(getByTestId('glossary-owner-name')).toHaveTextContent('label.owner'); - expect(getByTestId('glossary-display-name')).toHaveTextContent( + expect(getByTestId('glossary-reviewer-heading-name')).toHaveTextContent( 'label.reviewer-plural' ); expect(getByTestId('glossary-tags-name')).toHaveTextContent( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/GlossaryTermReferencesModal.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/GlossaryTermReferencesModal.component.tsx index d30c9cd07e4..9031f987187 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/GlossaryTermReferencesModal.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/GlossaryTermReferencesModal.component.tsx @@ -54,7 +54,7 @@ const GlossaryTermReferencesModal = ({ {t('label.cancel')} , diff --git a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/GlossaryOverviewTab.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/GlossaryOverviewTab.component.tsx index c1cd5f2abc9..3515467c0aa 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/GlossaryOverviewTab.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/GlossaryOverviewTab.component.tsx @@ -85,26 +85,22 @@ const GlossaryOverviewTab = ({ /> - + {!isGlossary && ( <> - - - + - - - + - + @@ -109,18 +109,25 @@ const GlossaryTermReferences = ({ <>
{references.map((ref) => ( - - - - - {ref?.name} - - + + + +
+ + {ref?.name} +
+
+
))} {permissions.EditAll && references.length === 0 && ( diff --git a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/GlossaryTermSynonyms.tsx b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/GlossaryTermSynonyms.tsx index 36613167365..105775c205a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/GlossaryTermSynonyms.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/GlossaryTermSynonyms.tsx @@ -12,7 +12,7 @@ */ import { CheckOutlined, CloseOutlined } from '@ant-design/icons'; -import { Button, Select, Space, Tooltip, Typography } from 'antd'; +import { Button, Select, Tooltip, Typography } from 'antd'; import { ReactComponent as EditIcon } from 'assets/svg/edit-new.svg'; import TagButton from 'components/TagButton/TagButton.component'; import { DE_ACTIVE_COLOR } from 'constants/constants'; @@ -86,65 +86,62 @@ const GlossaryTermSynonyms = ({ }, [glossaryTerm]); return ( -
- -
- - {t('label.synonym-plural')} - - {permissions.EditAll && synonyms.length > 0 && ( - -
- - {isViewMode ? ( - getSynonyms() - ) : ( - - setSynonyms(value)} + /> + <> +
+ )}
); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/RelatedTerms.tsx b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/RelatedTerms.tsx index 6759a96fc5c..6dde78afd08 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/RelatedTerms.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryTerms/tabs/RelatedTerms.tsx @@ -12,7 +12,7 @@ */ import { CheckOutlined, CloseOutlined } from '@ant-design/icons'; -import { Button, Select, Space, Spin, Tooltip, Typography } from 'antd'; +import { Button, Select, Spin, Tooltip, Typography } from 'antd'; import { ReactComponent as EditIcon } from 'assets/svg/edit-new.svg'; import { ReactComponent as IconFlatDoc } from 'assets/svg/ic-flat-doc.svg'; import TagButton from 'components/TagButton/TagButton.component'; @@ -131,97 +131,91 @@ const RelatedTerms = ({ }, [glossaryTerm]); return ( -
- -
- - {t('label.related-term-plural')} - - {permissions.EditAll && selectedOption.length > 0 && ( - -
- - {isIconVisible ? ( -
- {permissions.EditAll && selectedOption.length === 0 && ( - } - label={t('label.add')} - onClick={() => { - setIsIconVisible(false); - }} - /> - )} +
+
+ + {t('label.related-term-plural')} + + {permissions.EditAll && selectedOption.length > 0 && ( + +
- {selectedOption.map((entity: EntityReference) => ( - } - key={entity.fullyQualifiedName} - label={toString(entity.displayName)} - onClick={() => { - handleRelatedTermClick(entity.fullyQualifiedName || ''); - }} - /> - ))} -
- ) : ( - - : null} + options={formatOptions(options)} + placeholder={t('label.add-entity', { + entity: t('label.related-term-plural'), + })} + value={selectedOption} + onChange={(_, data) => { + setSelectedOption(data as EntityReference[]); + }} + onFocus={() => suggestionSearch()} + onSearch={debounceOnSearch} + /> + <> +
+ )}
); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryVersion/GlossaryVersion.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryVersion/GlossaryVersion.component.tsx index 7be17e2e407..d802d46f026 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/GlossaryVersion/GlossaryVersion.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/GlossaryVersion/GlossaryVersion.component.tsx @@ -10,7 +10,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Space } from 'antd'; import { AxiosError } from 'axios'; import PageContainer from 'components/containers/PageContainer'; import EntityVersionTimeLine from 'components/EntityVersionTimeLine/EntityVersionTimeLine'; @@ -29,6 +28,7 @@ import { getGlossaryVersionsList, } from 'rest/glossaryAPI'; import { + getGlossaryPath, getGlossaryTermsVersionsPath, getGlossaryVersionsPath, } from 'utils/RouterUtils'; @@ -78,6 +78,11 @@ const GlossaryVersion = ({ isGlossary = false }: GlossaryVersionProps) => { history.push(path); }; + const onBackHandler = () => { + const path = getGlossaryPath(selectedData?.fullyQualifiedName); + history.push(path); + }; + useEffect(() => { fetchVersionsInfo(); fetchActiveVersion(); @@ -85,26 +90,24 @@ const GlossaryVersion = ({ isGlossary = false }: GlossaryVersionProps) => { return ( -
- - - +
+
); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Tag/Tags/tags.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Tag/Tags/tags.tsx index b07973b8502..e5007b31c61 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Tag/Tags/tags.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Tag/Tags/tags.tsx @@ -61,7 +61,7 @@ const Tags: FunctionComponent = ({ return (
{ if (source) { diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainer/tags-container.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainer/tags-container.interface.ts index 34aa62bd3b6..2aaea1966f7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainer/tags-container.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainer/tags-container.interface.ts @@ -28,4 +28,5 @@ export type TagsContainerProps = { containerClass?: string; onSelectionChange?: (selectedTags: Array) => void; onCancel?: (event: React.MouseEvent) => void; + onAddButtonClick?: () => void; }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainer/tags-container.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainer/tags-container.tsx index d6c22ba97f1..5e76f97b424 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainer/tags-container.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Tag/TagsContainer/tags-container.tsx @@ -38,6 +38,7 @@ const TagsContainer: FunctionComponent = ({ tagList, onCancel, onSelectionChange, + onAddButtonClick, className, containerClass, showTags = true, @@ -141,19 +142,17 @@ const TagsContainer: FunctionComponent = ({ ); return ( - +
{showTags && !editable && ( {showAddTagButton && ( - + @@ -165,7 +164,7 @@ const TagsContainer: FunctionComponent = ({ <> <>
); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TagButton/TagButton.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TagButton/TagButton.component.tsx index 6ecd9e607fe..5a555b421a0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TagButton/TagButton.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TagButton/TagButton.component.tsx @@ -11,7 +11,7 @@ * limitations under the License. */ import { CloseOutlined } from '@ant-design/icons'; -import { Space } from 'antd'; +import { Tooltip } from 'antd'; import classNames from 'classnames'; import React from 'react'; @@ -20,6 +20,7 @@ interface TagButtonProps { icon?: React.ReactNode; className?: string; isRemovable?: boolean; + dataTestId?: string; onClick?: () => void; removeTag?: ( event: React.MouseEvent, @@ -34,23 +35,26 @@ const TagButton: React.FC = ({ className = '', isRemovable = false, removeTag, + dataTestId = label, }) => { const buttonClassNames = classNames( - 'tag-button-container tw-inline-flex text-xs font-medium rounded-4 whitespace-nowrap tw-bg-white tw-border tw-items-center tw-mr-2 tw-mt-1 tw-font-semibold', + 'tag-button-container tw-inline-flex text-xs font-medium rounded-4 whitespace-nowrap tw-bg-white tw-border tw-items-center tw-mr-2 tw-mt-2 tw-font-semibold', { 'tw-pl-2': isRemovable }, { 'tw-px-2': !isRemovable }, className ); return ( -
- - {icon} - {label} - +
+ +
+ {icon && {icon}} + {label} +
+
{isRemovable && ( = ({ tags = [], editable, onTagsUpdate }) => { } }; - return ( -
- -
- - {t('label.tag-plural')} - - {editable && tags.length > 0 && ( -
+ const addButtonHandler = () => { + setIsEditTags(true); + if (isEmpty(tagDetails.options) || tagDetails.isError) { + fetchTags(); + } + }; - {editable ? ( -
{ - setIsEditTags(true); - if (isEmpty(tagDetails.options) || tagDetails.isError) { - fetchTags(); - } - }}> - setIsEditTags(false)} - onSelectionChange={handleTagSelection} - /> -
- ) : ( - + useEffect(() => { + fetchTags(); + }, []); + + return ( +
+
+ + {t('label.tag-plural')} + + {editable && tags.length > 0 && ( +
+ setIsEditTags(false)} + onSelectionChange={handleTagSelection} + />
); }; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicSchema/TopicSchema.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicSchema/TopicSchema.tsx index 40d72d0d1ba..600f5fea667 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicSchema/TopicSchema.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TopicDetails/TopicSchema/TopicSchema.tsx @@ -188,6 +188,7 @@ const TopicSchemaFields: FC = ({ direction={styleFlag ? 'vertical' : 'horizontal'} onClick={() => handleAddTagClick(record)}> { hasPermission={glossaryPermission} path={ROUTES.GLOSSARY_DETAILS_WITH_ACTION} /> - @@ -467,6 +461,12 @@ const AuthenticatedAppRouter: FunctionComponent = () => { component={AddGlossaryTermPage} path={ROUTES.ADD_GLOSSARY_TERMS} /> + { onClick={handleAddGlossaryClick}>
- {t('label.add-entity', { entity: t('label.glossary') })} + {t('label.add')}
diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.component.tsx index 7ae769dc1ec..f844bb89186 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/Glossary/GlossaryPage/GlossaryPage.component.tsx @@ -43,6 +43,7 @@ import { import { checkPermission } from 'utils/PermissionsUtils'; import { getGlossaryPath, getGlossaryTermsPath } from 'utils/RouterUtils'; import { showErrorToast, showSuccessToast } from 'utils/ToastUtils'; +import Fqn from '../../../utils/Fqn'; import GlossaryLeftPanel from '../GlossaryLeftPanel/GlossaryLeftPanel.component'; const GlossaryPage = () => { @@ -63,7 +64,7 @@ const GlossaryPage = () => { setIsRightPanelLoading(true); setSelectedData(undefined); if (glossaryFqn) { - return glossaryFqn.split(FQN_SEPARATOR_CHAR).length === 1; + return Fqn.split(glossaryFqn).length === 1; } return true; diff --git a/openmetadata-ui/src/main/resources/ui/src/styles/components/glossary.less b/openmetadata-ui/src/main/resources/ui/src/styles/components/glossary.less index 37bc4221d53..f423badb7a5 100644 --- a/openmetadata-ui/src/main/resources/ui/src/styles/components/glossary.less +++ b/openmetadata-ui/src/main/resources/ui/src/styles/components/glossary.less @@ -79,11 +79,18 @@ } .term-reference-tag { + height: 24px; .ant-tag-close-icon { padding-left: 0.5rem; padding-right: 0.5rem; color: @primary-color; } + span { + white-space: nowrap; + max-width: 150px; + overflow: hidden; + text-overflow: ellipsis; + } } .glossary-tabs { @@ -95,13 +102,26 @@ .tag-button-container { height: 24px; -} - -.glossary-overview-tab { - margin-right: 8px !important; + span { + white-space: nowrap; + max-width: 150px; + overflow: hidden; + text-overflow: ellipsis; + } } .glossary-subheading { font-size: 16px; font-weight: 500; } + +.glossary-select { + width: calc(100% - 64px); +} + +.tags-input-container { + .tags-item { + margin-top: 8px; + margin-right: 8px; + } +}