Fix the test file
Signed-off-by: roylisto.pradana <roylisto.pradana@grabtaxi.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user