mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-27 18:36:08 +00:00
fix the glossary terms not showing when expand click (#16239)
* fix the glossary terms not showing when expand click * supported cypress to check term after click on expand icon of term
This commit is contained in:
parent
db3bff19af
commit
1ca86f8889
@ -1318,8 +1318,14 @@ describe('Glossary page should work properly', { tags: 'Governance' }, () => {
|
||||
NEW_GLOSSARY_TERMS.term_2.name,
|
||||
NEW_GLOSSARY_TERMS.term_1.name
|
||||
);
|
||||
// verify the term is moved under the parent term
|
||||
cy.get('[data-testid="expand-collapse-all-button"]').click();
|
||||
|
||||
// clicking on the expand icon to view the child term
|
||||
cy.get(
|
||||
`[data-row-key=${Cypress.$.escapeSelector(
|
||||
NEW_GLOSSARY_TERMS.term_1.fullyQualifiedName
|
||||
)}] [data-testid="expand-icon"] > svg`
|
||||
).click();
|
||||
|
||||
cy.get(
|
||||
`.ant-table-row-level-1[data-row-key="${Cypress.$.escapeSelector(
|
||||
NEW_GLOSSARY_TERMS.term_1.fullyQualifiedName
|
||||
|
@ -188,7 +188,8 @@ const TreeAsyncSelectList: FC<Omit<AsyncSelectListProps, 'fetchOptions'>> = ({
|
||||
...searchOptions,
|
||||
...(initialOptions ?? []),
|
||||
] as ModifiedGlossaryTerm[],
|
||||
value
|
||||
value,
|
||||
false
|
||||
);
|
||||
|
||||
return initialData
|
||||
|
@ -148,13 +148,19 @@ export const getGlossaryBreadcrumbs = (fqn: string) => {
|
||||
return breadcrumbList;
|
||||
};
|
||||
|
||||
// This function finds and gives you the glossary term you're looking for.
|
||||
// You can then use this term or update its information in the Glossary or Term with it's reference created
|
||||
// Reference will only be created if withReference is true
|
||||
export const findGlossaryTermByFqn = (
|
||||
list: ModifiedGlossaryTerm[],
|
||||
fullyQualifiedName: string
|
||||
fullyQualifiedName: string,
|
||||
withReference = true
|
||||
): GlossaryTerm | Glossary | ModifiedGlossary | null => {
|
||||
for (const item of list) {
|
||||
if ((item.fullyQualifiedName ?? item.value) === fullyQualifiedName) {
|
||||
return {
|
||||
return withReference
|
||||
? item
|
||||
: {
|
||||
...item,
|
||||
fullyQualifiedName: item.fullyQualifiedName ?? item.data?.tagFQN,
|
||||
...(item.data ?? {}),
|
||||
|
Loading…
x
Reference in New Issue
Block a user