Skip to content

Commit

Permalink
UIIN-3172: Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrHladchenko1 committed Feb 4, 2025
1 parent 6b8517b commit e5be9e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/views/ItemView.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,10 @@ describe('ItemView', () => {
it('should hide the pane', async () => {
await userEvent.click(versionHistoryButton);

expect(screen.getByRole('region', { name: /version history/i })).toBeInTheDocument();
const versionHistoryPane = await screen.findByRole('region', { name: /version history/i });
expect(versionHistoryPane).toBeInTheDocument();

const closeButton = screen.getByRole('button', { name: /close version history/i });
const closeButton = await within(versionHistoryPane).findByRole('button', { name: /close/i });
await userEvent.click(closeButton);

expect(screen.queryByRole('region', { name: /version history/i })).not.toBeInTheDocument();
Expand Down

0 comments on commit e5be9e9

Please sign in to comment.