Skip to content

Commit

Permalink
test(Tile): fix AC violation test for selectable tile
Browse files Browse the repository at this point in the history
  • Loading branch information
kenneth-nguyen1 committed Aug 1, 2023
1 parent 3a7ef45 commit 9397d64
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/react/src/components/Tile/Tile-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
TileBelowTheFoldContent,
} from '../Tile';
import { shallow, mount } from 'enzyme';
import { render } from '@carbon/test-utils/react';

const prefix = 'bx';

Expand Down Expand Up @@ -229,8 +230,15 @@ describe('Tile', () => {
expect(wrapper.find('div').at(0).props().disabled).toEqual(true);
});

it('should have no Accessibility Checker violations', () => {
expect(wrapper).toHaveNoACViolations('SelectableTile');
it('should have no AC violations', async () => {
const { container } = render(
<main>
<SelectableTile id="tile-1" name="tiles" value="selectable">
Selectable
</SelectableTile>
</main>
);
await expect(container).toHaveNoACViolations('SelectableTile');
});
});

Expand Down

0 comments on commit 9397d64

Please sign in to comment.