Skip to content

Commit

Permalink
Fixes liferay#1242 - Update ClayIcon tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pat270 committed Nov 13, 2018
1 parent 3977c19 commit 1e17a43
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions packages/clay-icon/src/__tests__/ClayIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,33 @@ describe('ClayIcon', function() {

expect(clayIcon).toMatchSnapshot();
});

it('should render an icon with attribute aria-hidden="true" on the container when decorative is true', () => {
clayIcon = new ClayIcon({
decorative: true,
spritemap: spritemap,
symbol: 'add-cell',
});

expect(clayIcon).toMatchSnapshot();
});

it('should render an icon without aria-hidden="true" on the container by default', () => {
clayIcon = new ClayIcon({
spritemap: spritemap,
symbol: 'add-cell',
});

expect(clayIcon).toMatchSnapshot();
});

it('should render an icon with specified ariaLabel', () => {
clayIcon = new ClayIcon({
ariaLabel: 'my-custom-aria-label',
spritemap: spritemap,
symbol: 'add-cell',
});

expect(clayIcon).toMatchSnapshot();
});
});

0 comments on commit 1e17a43

Please sign in to comment.