Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarDamkjaer committed Nov 6, 2023
1 parent 8237262 commit 6149723
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ describe('<DetailsPane />', () => {

expect(screen.getByRole('button', { name: 'Show all' })).toBeInTheDocument()
expect(
screen.getByRole('button', { name: 'Show 2 more' })
).toBeInTheDocument() // id is added to list of properties so only showing 999
screen.getByRole('button', { name: 'Show 3 more' })
).toBeInTheDocument() // id & elementId is added to list of properties so only showing 998
expect(screen.queryByText('prop1000')).not.toBeInTheDocument()

const showAllButton = screen.getByText('Show all')
Expand Down Expand Up @@ -119,7 +119,7 @@ describe('<DetailsPane />', () => {
screen.queryByRole('button', { name: 'Show all' })
).toBeInTheDocument()
expect(
screen.getByRole('button', { name: 'Show 2 more' })
screen.getByRole('button', { name: 'Show 3 more' })
).toBeInTheDocument()
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('<DetailsPane />', () => {
type: type,
item: {
id: 'abc',
elementId: 'abc',
elementId: 'elementId',
labels,
propertyList
}
Expand All @@ -70,7 +70,7 @@ describe('<DetailsPane />', () => {
type: type,
item: {
id: 'abc',
elementId: 'abc',
elementId: 'elementId',
type: 'abc2',
propertyList
}
Expand All @@ -90,8 +90,8 @@ describe('<DetailsPane />', () => {

expect(screen.getByRole('button', { name: 'Show all' })).toBeInTheDocument()
expect(
screen.getByRole('button', { name: 'Show 2 more' })
).toBeInTheDocument() // id is added to list of properties so only showing 999
screen.getByRole('button', { name: 'Show 3 more' })
).toBeInTheDocument() // id & elementId is added to list of properties so only showing 998
expect(screen.queryByText('prop1000')).not.toBeInTheDocument()

const showAllButton = screen.getByText('Show all')
Expand Down Expand Up @@ -123,7 +123,7 @@ describe('<DetailsPane />', () => {
screen.queryByRole('button', { name: 'Show all' })
).toBeInTheDocument()
expect(
screen.getByRole('button', { name: 'Show 2 more' })
screen.getByRole('button', { name: 'Show 3 more' })
).toBeInTheDocument()
})
})

0 comments on commit 6149723

Please sign in to comment.