Merge pull request #18867 from tperehinets/maxDepth

Added maxDepth to catalogGraphParams
This commit is contained in:
Fredrik Adelöw
2023-08-07 15:14:40 +02:00
committed by GitHub
3 changed files with 8 additions and 2 deletions
@@ -133,7 +133,7 @@ describe('<CatalogGraphCard/>', () => {
expect(button).toBeInTheDocument();
expect(button.closest('a')).toHaveAttribute(
'href',
'/catalog-graph?rootEntityRefs%5B%5D=b%3Ad%2Fc&unidirectional=true&mergeRelations=true&direction=LR',
'/catalog-graph?rootEntityRefs%5B%5D=b%3Ad%2Fc&maxDepth=1&unidirectional=true&mergeRelations=true&direction=LR',
);
});
@@ -157,7 +157,7 @@ describe('<CatalogGraphCard/>', () => {
expect(button).toBeInTheDocument();
expect(button.closest('a')).toHaveAttribute(
'href',
'/catalog-graph?rootEntityRefs%5B%5D=b%3Ad%2Fc&unidirectional=true&mergeRelations=false&direction=LR',
'/catalog-graph?rootEntityRefs%5B%5D=b%3Ad%2Fc&maxDepth=2&unidirectional=true&mergeRelations=false&direction=LR',
);
});
@@ -108,6 +108,7 @@ export const CatalogGraphCard = (
const catalogGraphParams = qs.stringify(
{
rootEntityRefs: [stringifyEntityRef(entity)],
maxDepth: maxDepth,
unidirectional,
mergeRelations,
selectedKinds: kinds,