Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
poplingue committed Mar 23, 2022
1 parent 9fca60e commit 106ccbd
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/interface/Checkbox/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const Checkbox = forwardRef((props, ref) => {
ref={ref}
/>
<label className="fr-label" htmlFor={checkboxId.current}>{label}</label>
{hint && <span className="fr-hint-text">{hint}</span>}
{hint && <p className="fr-hint-text">{hint}</p>}
{(message && messageType) && <p className={`fr-${messageType}-text`}>{message}</p>}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ exports[`<ConsentService /> should render ConsentService properly 1`] = `
className="fr-radio-group"
>
<input
defaultChecked={true}
id="name"
name="id"
onChange={[Function]}
Expand Down
2 changes: 1 addition & 1 deletion src/components/interface/File/File.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const File = ({
<div {...dataAttributes.getAll(remainingProps)} className={_className}>
<label className="fr-label" htmlFor="file-upload">
{label}
{hint && <span className="fr-hint-text">{hint}</span>}
{hint && <p className="fr-hint-text">{hint}</p>}
</label>
<input
onChange={onChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ exports[`<File /> renders correctly 1`] = `
htmlFor="file-upload"
>
Label File
<span
<p
className="fr-hint-text"
>
Hint
</span>
</p>
</label>
<input
aria-describedby="Hint"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('<MegaNavItem />', () => {
const component = renderer
.create(
<MegaNavItem {...initialProps}>
<MegaNavSubItem>Test</MegaNavSubItem>
<MegaNavSubItem><p>Test</p></MegaNavSubItem>
</MegaNavItem>,
)
.toJSON();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,17 @@ exports[`<MegaNavItem /> renders correctly 1`] = `
<ul
className="fr-mega-menu__list"
onClick={[Function]}
/>
>
<li
className="fr-enlarge-link"
>
<p
className="fr-nav__link"
>
Test
</p>
</li>
</ul>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/interface/Radio/Radio.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const Radio = ({
{svg}
</div>
)}
{hint && <span className="fr-hint-text">{hint}</span>}
{hint && <p className="fr-hint-text">{hint}</p>}
{message && messageType && (
<p className={`fr-${messageType}-text`}>
{message}
Expand Down
2 changes: 1 addition & 1 deletion src/components/interface/Select/SelectWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const SelectWrapper = ({
>
{label}
{required && <span className="error"> *</span>}
{hint && <span id={hintId.current} className="fr-hint-text">{hint}</span>}
{hint && <p id={hintId.current} className="fr-hint-text">{hint}</p>}
</label>
)
}
Expand Down

0 comments on commit 106ccbd

Please sign in to comment.