mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-23 08:28:10 +00:00
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
This commit is contained in:
parent
08501fa63f
commit
b03411470d
@ -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(
|
||||
|
@ -271,7 +271,7 @@ const EntityPageInfo = ({
|
||||
if (!isUndefined(entityFieldThreads)) {
|
||||
return !isUndefined(tagThread) ? (
|
||||
<p
|
||||
className="link-text tw-ml-1 tw-w-8 tw-flex-none"
|
||||
className="link-text tw-m-0 tw-ml-1 tw-w-8 tw-flex-none"
|
||||
data-testid="tag-thread"
|
||||
onClick={() => onThreadLinkSelect?.(tagThread.entityLink)}>
|
||||
<span className="tw-flex">
|
||||
@ -283,7 +283,7 @@ const EntityPageInfo = ({
|
||||
</p>
|
||||
) : (
|
||||
<p
|
||||
className="link-text tw-self-start tw-w-8 tw-ml-1 tw-flex-none"
|
||||
className="link-text tw-self-start tw-w-8 tw-m-0 tw-ml-1 tw-flex-none"
|
||||
data-testid="start-tag-thread"
|
||||
onClick={() =>
|
||||
onThreadLinkSelect?.(
|
||||
@ -420,7 +420,7 @@ const EntityPageInfo = ({
|
||||
))}
|
||||
</div>
|
||||
<div
|
||||
className="tw-flex tw-flex-wrap tw-pt-1 tw-ml-7 tw-group"
|
||||
className="tw-flex tw-items-center tw-flex-wrap tw-pt-1 tw-ml-7 tw-group"
|
||||
data-testid="entity-tags">
|
||||
{(!isEditable || !isTagEditable || deleted) && (
|
||||
<>
|
||||
@ -478,7 +478,9 @@ const EntityPageInfo = ({
|
||||
handleTagSelection(tags);
|
||||
}}>
|
||||
{tags.length || tier ? (
|
||||
<button className=" tw-ml-1 focus:tw-outline-none">
|
||||
<button
|
||||
className=" tw-ml-1 focus:tw-outline-none"
|
||||
data-testid="edit-button">
|
||||
<SVGIcons
|
||||
alt="edit"
|
||||
icon="icon-edit"
|
||||
|
@ -248,6 +248,7 @@ declare module 'Models' {
|
||||
name: string;
|
||||
displayName: string;
|
||||
fullyQualifiedName: string;
|
||||
fqdn?: string;
|
||||
type: string;
|
||||
id: string;
|
||||
description?: string;
|
||||
|
@ -68,9 +68,7 @@ export const fetchGlossaryTerms = (): Promise<FormattedGlossaryTermData[]> => {
|
||||
export const getGlossaryTermlist = (
|
||||
terms: Array<FormattedGlossaryTermData> = []
|
||||
): Array<string> => {
|
||||
return terms.map(
|
||||
(term: FormattedGlossaryTermData) => term?.fullyQualifiedName
|
||||
);
|
||||
return terms.map((term: FormattedGlossaryTermData) => term.fqdn || '');
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user