diff --git a/packages/core/src/components/DateField/__snapshots__/DateField.test.jsx.snap b/packages/core/src/components/DateField/__snapshots__/DateField.test.jsx.snap index 803ed2d29b..5935b37233 100644 --- a/packages/core/src/components/DateField/__snapshots__/DateField.test.jsx.snap +++ b/packages/core/src/components/DateField/__snapshots__/DateField.test.jsx.snap @@ -610,7 +610,8 @@ exports[`DateField has requirementLabel 1`] = ` className="ds-c-field__hint" > Optional. - For example: 4 28 1986 + + For example: 4 28 1986
{requirementLabel} + {hintPadding} {hint} ); diff --git a/packages/core/src/components/FormLabel/FormLabel.test.jsx b/packages/core/src/components/FormLabel/FormLabel.test.jsx index 9ace533c1d..945c86f0ef 100644 --- a/packages/core/src/components/FormLabel/FormLabel.test.jsx +++ b/packages/core/src/components/FormLabel/FormLabel.test.jsx @@ -60,8 +60,16 @@ describe('FormLabel', () => { }); it('adds punctuation to requirementLabel when hint is also present', () => { - const props = { hint: 'Hint', requirementLabel: 'Optional' }; - const wrapper = shallow({labelText}); + let props = { hint: 'Hint', requirementLabel: 'Optional' }; + let wrapper = shallow({labelText}); + + expect(wrapper).toMatchSnapshot(); + + props = { + hint: Hint, + requirementLabel: Optional + }; + wrapper = shallow({labelText}); expect(wrapper).toMatchSnapshot(); }); diff --git a/packages/core/src/components/FormLabel/__snapshots__/FormLabel.test.jsx.snap b/packages/core/src/components/FormLabel/__snapshots__/FormLabel.test.jsx.snap index 15112d3d79..343c7de80e 100644 --- a/packages/core/src/components/FormLabel/__snapshots__/FormLabel.test.jsx.snap +++ b/packages/core/src/components/FormLabel/__snapshots__/FormLabel.test.jsx.snap @@ -13,7 +13,31 @@ exports[`FormLabel adds punctuation to requirementLabel when hint is also presen className="ds-c-field__hint" > Optional. - Hint + + Hint + + +`; + +exports[`FormLabel adds punctuation to requirementLabel when hint is also present 2`] = ` + `; @@ -31,7 +55,8 @@ exports[`FormLabel avoids duplicate punctuation after requirementLabel 1`] = ` className="ds-c-field__hint" > Optional. - Hint + + Hint `;