Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(glossaryTermLabels): fix glossary term labels missing and add cypress test #4171

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion datahub-web-react/src/app/search/SearchFilterLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const SearchFilterLabel = ({ aggregation, field }: Props) => {
<>
<Tag closable={false}>
<BookOutlined style={{ marginRight: '3%' }} />
{term.name}
{term.properties?.name}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use entityRegistry.getDisplayName(EntityType.GlossaryTerm, term)

</Tag>
({countText})
</>
Expand Down
19 changes: 19 additions & 0 deletions smoke-test/tests/cypress/cypress/integration/search/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,23 @@ describe('search', () => {
// table description
cy.contains('table containing all the users created on a single day');
});

it('can search and get glossary term facets with proper labels', () => {
cy.login();
cy.visit('/dataset/urn:li:dataset:(urn:li:dataPlatform:hive,cypress_logging_events,PROD)');
cy.contains('cypress_logging_events');

cy.contains('Add Term').click();

cy.focused().type('CypressTermLabeled');

cy.get('.ant-select-item-option-content').within(() => cy.contains('CypressNode.CypressTermLabeled').click({force: true}));

cy.get('[data-testid="add-tag-term-from-modal-btn"]').click({force: true});
cy.get('[data-testid="add-tag-term-from-modal-btn"]').should('not.exist');

cy.contains('CypressTermLabeled');
cy.visit('http://localhost:9002/search?query=cypress')
cy.contains('CypressTermlabeled')
});
})