Skip to content

Commit

Permalink
fix: snapshot test (#844)
Browse files Browse the repository at this point in the history
* fix: snapshot test

* chore: again
  • Loading branch information
lee-chase authored Feb 27, 2020
1 parent ee6ed25 commit 6d08a80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`CvCheckbox should render 1`] = `
<div class="cv-checkbox bx--checkbox-wrapper bx--form-item"><input type="checkbox" aria-checked="false" id="uid-e972eca3-3ea6-4d18-9d85-7188493d95a6" class="bx--checkbox" value="check-1"> <label for="uid-e972eca3-3ea6-4d18-9d85-7188493d95a6" class="bx--checkbox-label"><span class="bx--checkbox-label-text">
<div class="cv-checkbox bx--checkbox-wrapper bx--form-item"><input type="checkbox" aria-checked="false" id="1" class="bx--checkbox" value="check-1"> <label for="1" class="bx--checkbox-label"><span class="bx--checkbox-label-text">
</span></label></div>
`;
exports[`CvCheckbox should render when disabled 1`] = `
<div class="cv-checkbox bx--checkbox-wrapper bx--form-item"><input type="checkbox" aria-checked="false" id="uid-9f8d69e6-f461-42c1-ab0f-0377b7f03505" disabled="disabled" class="bx--checkbox" value="check-1"> <label data-contained-checkbox-disabled="true" for="uid-9f8d69e6-f461-42c1-ab0f-0377b7f03505" class="bx--checkbox-label bx--label--disabled"><span class="bx--checkbox-label-text">
<div class="cv-checkbox bx--checkbox-wrapper bx--form-item"><input type="checkbox" aria-checked="false" id="1" disabled="disabled" class="bx--checkbox" value="check-1"> <label data-contained-checkbox-disabled="true" for="1" class="bx--checkbox-label bx--label--disabled"><span class="bx--checkbox-label-text">
</span></label></div>
`;
Expand Down
4 changes: 2 additions & 2 deletions packages/core/__tests__/cv-checkbox.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ describe('CvCheckbox', () => {
// ***************

it('should render', async () => {
const propsData = { formItem: true, value: 'check-1' };
const propsData = { formItem: true, value: 'check-1', id: '1' };
const wrapper = await shallow(CvCheckbox, { propsData });

expect(wrapper.html()).toMatchSnapshot();
});

it('should render when disabled', async () => {
const propsData = { formItem: true, value: 'check-1', disabled: true };
const propsData = { formItem: true, value: 'check-1', disabled: true, id: '1' };
const wrapper = await shallow(CvCheckbox, { propsData });

expect(wrapper.html()).toMatchSnapshot();
Expand Down

0 comments on commit 6d08a80

Please sign in to comment.