Fix the test file

Signed-off-by: roylisto.pradana <roylisto.pradana@grabtaxi.com>
This commit is contained in:
roylisto.pradana
2021-06-29 18:35:46 +07:00
parent 208976022b
commit c0bd924ebb
2 changed files with 5 additions and 4 deletions
@@ -46,6 +46,9 @@ describe('<GroupsDiagram />', () => {
namespace: 'my-namespace',
},
spec: {
profile: {
displayName: 'Group A',
},
type: 'organization',
},
},
@@ -64,6 +67,6 @@ describe('<GroupsDiagram />', () => {
},
);
expect(getByText('my-namespace/group-a')).toBeInTheDocument();
expect(getByText('Group A')).toBeInTheDocument();
});
});
@@ -96,9 +96,7 @@ function RenderNode(props: DependencyGraphTypes.RenderNodeProps<any>) {
alignmentBaseline="baseline"
style={{ fontWeight: 'bold' }}
>
{props.node.profile?.displayName
? props.node.profile?.displayName
: props.node.name}
{props.node.profile?.displayName ?? props.node.name}
</text>
</Link>
</g>