mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-23 00:18:06 +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)
|
.contains(term2)
|
||||||
.should('be.visible');
|
.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 term = NEW_GLOSSARY_TERMS.term_1.name;
|
||||||
const entity = SEARCH_ENTITY_TABLE.table_3.term;
|
const entity = SEARCH_ENTITY_TABLE.table_3.term;
|
||||||
goToAssetsTab(term);
|
goToAssetsTab(term);
|
||||||
@ -334,7 +334,7 @@ describe('Glossary page should work properly', () => {
|
|||||||
.should('be.visible');
|
.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 term = NEW_GLOSSARY_TERMS.term_1.name;
|
||||||
const entity = SEARCH_ENTITY_TABLE.table_3.term;
|
const entity = SEARCH_ENTITY_TABLE.table_3.term;
|
||||||
// go assets tab
|
// go assets tab
|
||||||
@ -345,36 +345,36 @@ describe('Glossary page should work properly', () => {
|
|||||||
.click();
|
.click();
|
||||||
cy.wait(500);
|
cy.wait(500);
|
||||||
// redirect to entity detail page
|
// redirect to entity detail page
|
||||||
cy.get(
|
cy.get('[data-testid="entity-tags"]')
|
||||||
'[data-testid="tags-wrapper"] > [data-testid="tag-container"] > .tw-flex > .tw-ml-1 > [data-testid="image"]'
|
.find('[data-testid="edit-button"]')
|
||||||
)
|
|
||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.click();
|
.click();
|
||||||
cy.get(':nth-child(1) > [data-testid="remove"]')
|
cy.get(':nth-child(1) > .css-xb97g8')
|
||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.click();
|
.click();
|
||||||
cy.get(':nth-child(1) > [data-testid="remove"]')
|
cy.get(':nth-child(1) > .css-xb97g8')
|
||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.click();
|
.click();
|
||||||
cy.get('[data-testid="saveAssociatedTag"]').scrollIntoView().click();
|
cy.get('[data-testid="saveAssociatedTag"]').scrollIntoView().click();
|
||||||
|
|
||||||
cy.get(
|
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()
|
.scrollIntoView()
|
||||||
.should('exist')
|
.should('be.visible')
|
||||||
.click();
|
|
||||||
cy.get(':nth-child(1) > [data-testid="remove"]')
|
|
||||||
.scrollIntoView()
|
|
||||||
.should('exist')
|
|
||||||
.click();
|
.click();
|
||||||
|
|
||||||
cy.get(':nth-child(1) > [data-testid="remove"]')
|
cy.get(':nth-child(1) > .css-xb97g8')
|
||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
.should('exist')
|
.should('be.visible')
|
||||||
|
.click();
|
||||||
|
|
||||||
|
cy.get(':nth-child(1) > .css-xb97g8')
|
||||||
|
.scrollIntoView()
|
||||||
|
.should('be.visible')
|
||||||
.click();
|
.click();
|
||||||
cy.get('[data-testid="saveAssociatedTag"]').scrollIntoView().click();
|
cy.get('[data-testid="saveAssociatedTag"]').scrollIntoView().click();
|
||||||
cy.get(
|
cy.get(
|
||||||
|
@ -271,7 +271,7 @@ const EntityPageInfo = ({
|
|||||||
if (!isUndefined(entityFieldThreads)) {
|
if (!isUndefined(entityFieldThreads)) {
|
||||||
return !isUndefined(tagThread) ? (
|
return !isUndefined(tagThread) ? (
|
||||||
<p
|
<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"
|
data-testid="tag-thread"
|
||||||
onClick={() => onThreadLinkSelect?.(tagThread.entityLink)}>
|
onClick={() => onThreadLinkSelect?.(tagThread.entityLink)}>
|
||||||
<span className="tw-flex">
|
<span className="tw-flex">
|
||||||
@ -283,7 +283,7 @@ const EntityPageInfo = ({
|
|||||||
</p>
|
</p>
|
||||||
) : (
|
) : (
|
||||||
<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"
|
data-testid="start-tag-thread"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
onThreadLinkSelect?.(
|
onThreadLinkSelect?.(
|
||||||
@ -420,7 +420,7 @@ const EntityPageInfo = ({
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<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">
|
data-testid="entity-tags">
|
||||||
{(!isEditable || !isTagEditable || deleted) && (
|
{(!isEditable || !isTagEditable || deleted) && (
|
||||||
<>
|
<>
|
||||||
@ -478,7 +478,9 @@ const EntityPageInfo = ({
|
|||||||
handleTagSelection(tags);
|
handleTagSelection(tags);
|
||||||
}}>
|
}}>
|
||||||
{tags.length || tier ? (
|
{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
|
<SVGIcons
|
||||||
alt="edit"
|
alt="edit"
|
||||||
icon="icon-edit"
|
icon="icon-edit"
|
||||||
|
@ -248,6 +248,7 @@ declare module 'Models' {
|
|||||||
name: string;
|
name: string;
|
||||||
displayName: string;
|
displayName: string;
|
||||||
fullyQualifiedName: string;
|
fullyQualifiedName: string;
|
||||||
|
fqdn?: string;
|
||||||
type: string;
|
type: string;
|
||||||
id: string;
|
id: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
|
@ -68,9 +68,7 @@ export const fetchGlossaryTerms = (): Promise<FormattedGlossaryTermData[]> => {
|
|||||||
export const getGlossaryTermlist = (
|
export const getGlossaryTermlist = (
|
||||||
terms: Array<FormattedGlossaryTermData> = []
|
terms: Array<FormattedGlossaryTermData> = []
|
||||||
): Array<string> => {
|
): Array<string> => {
|
||||||
return terms.map(
|
return terms.map((term: FormattedGlossaryTermData) => term.fqdn || '');
|
||||||
(term: FormattedGlossaryTermData) => term?.fullyQualifiedName
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user