Skip to content

Commit

Permalink
Replace snapshot test with more explicit test
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed Aug 19, 2022
1 parent 20a0877 commit 1f63b82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 212 deletions.
210 changes: 0 additions & 210 deletions packages/components/src/tools-panel/test/__snapshots__/index.js.snap

This file was deleted.

5 changes: 3 additions & 2 deletions packages/components/src/tools-panel/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ describe( 'ToolsPanel', () => {

describe( 'first and last panel items', () => {
it( 'should apply first/last classes to appropriate items', () => {
const { container } = render(
render(
<SlotFillProvider>
<ToolsPanelItems>
<ToolsPanelItem { ...altControlProps }>
Expand Down Expand Up @@ -1113,7 +1113,8 @@ describe( 'ToolsPanel', () => {
expect( item3 ).toBeInTheDocument();
expect( screen.queryByText( 'Item 4' ) ).not.toBeInTheDocument();

expect( container ).toMatchSnapshot();
expect( item2.parentElement ).toHaveClass( 'first' );
expect( item3.parentElement ).toHaveClass( 'last' );
} );
} );
} );

0 comments on commit 1f63b82

Please sign in to comment.