Skip to content

Commit

Permalink
Update ItemView.test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrHladchenko1 authored Feb 5, 2025
1 parent a3a02fb commit 53d7ea6
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 53d7ea6

Please sign in to comment.