From 5ac77479834c2b502cd369469e7b14a6df289f93 Mon Sep 17 00:00:00 2001 From: Carlo Bernardini Date: Thu, 22 Nov 2018 12:01:26 +0100 Subject: [PATCH] Added tests for facetCount support in CheckBox and RadioButton components --- __tests__/CheckBox.spec.js | 13 +++++ __tests__/RadioButton.spec.js | 14 +++++ __tests__/__snapshots__/CheckBox.spec.js.snap | 52 ++++++++++++++++++ .../__snapshots__/RadioButton.spec.js.snap | 55 +++++++++++++++++++ 4 files changed, 134 insertions(+) diff --git a/__tests__/CheckBox.spec.js b/__tests__/CheckBox.spec.js index 8104b45..7b8e58f 100644 --- a/__tests__/CheckBox.spec.js +++ b/__tests__/CheckBox.spec.js @@ -49,4 +49,17 @@ describe('', () => { expect(wrapper).toMatchSnapshot(); }); + + it('should render a checkbox with facet count', () => { + const wrapper = shallow( + + ); + + expect(wrapper).toMatchSnapshot(); + }); }); diff --git a/__tests__/RadioButton.spec.js b/__tests__/RadioButton.spec.js index 380fde1..f008608 100644 --- a/__tests__/RadioButton.spec.js +++ b/__tests__/RadioButton.spec.js @@ -48,4 +48,18 @@ describe('', () => { expect(wrapper).toMatchSnapshot(); }); + + it('should render a radio button with facet count', () => { + const wrapper = shallow( + + ); + + expect(wrapper).toMatchSnapshot(); + }); }); diff --git a/__tests__/__snapshots__/CheckBox.spec.js.snap b/__tests__/__snapshots__/CheckBox.spec.js.snap index e411206..1883986 100644 --- a/__tests__/__snapshots__/CheckBox.spec.js.snap +++ b/__tests__/__snapshots__/CheckBox.spec.js.snap @@ -47,6 +47,58 @@ exports[` should render a checkbox 1`] = ` `; +exports[` should render a checkbox with facet count 1`] = ` +
+ + +
+`; + exports[` should render a disabled checkbox 1`] = `
should render a radio button 1`] = `
`; +exports[` should render a radio button with facet count 1`] = ` +
+ + +
+`; + exports[` should render a selected radio button 1`] = `