Skip to content

Commit

Permalink
Add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Nov 27, 2023
1 parent 188e0da commit 50a25fc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ describe('<DetailsPane />', () => {
).toBeInTheDocument()
})

test('should display node caption as panel title', async () => {
test('should display node/rel caption as panel title', async () => {
renderComponent({
propertyList: [{ key: 'name', value: 'New Node', type: 'string' }]
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,14 @@ describe('<DetailsPane />', () => {
screen.getByRole('button', { name: 'Show 3 more' })
).toBeInTheDocument()
})

test('should display node/rel caption as panel title', async () => {
renderComponent({
propertyList: [{ key: 'name', value: 'New Node', type: 'string' }]
})

expect(screen.getByTestId('viz-details-pane-title').textContent).toEqual(
'New Node'
)
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function DefaultDetailsPane({
return (
<PaneWrapper>
<PaneHeader>
<PaneTitle>
<PaneTitle data-testid="viz-details-pane-title">
<span>{`${paneTitle}`}</span>
<ClipboardCopier
textToCopy={allItemProperties
Expand Down

0 comments on commit 50a25fc

Please sign in to comment.