-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #513 from alphagov/add-tests-for-checkboxes-macro
Add tests for checkboxes macro
- Loading branch information
Showing
5 changed files
with
458 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
src/components/checkboxes/__snapshots__/template.test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Checkboxes nested dependant components passes through fieldset params without breaking 1`] = ` | ||
<span class="govuk-c-error-message"> | ||
Please select an option | ||
</span> | ||
`; | ||
|
||
exports[`Checkboxes nested dependant components passes through fieldset params without breaking 2`] = ` | ||
<fieldset class="govuk-c-fieldset app-c-fieldset--custom-modifier" | ||
data-attribute="value" | ||
data-second-attribute="second-value" | ||
> | ||
<legend class="govuk-c-fieldset__legend"> | ||
What is your nationality? | ||
<span class="govuk-c-fieldset__hint"> | ||
If you have dual nationality, select all options that are relevant to you. | ||
</span> | ||
</legend> | ||
</fieldset> | ||
`; | ||
|
||
exports[`Checkboxes nested dependant components passes through html fieldset params without breaking 1`] = ` | ||
<fieldset class="govuk-c-fieldset"> | ||
<legend class="govuk-c-fieldset__legend"> | ||
What is your <b>nationality</b>? | ||
<span class="govuk-c-fieldset__hint"> | ||
If you have dual nationality, | ||
<b> | ||
select all options | ||
</b> | ||
that are relevant to you. | ||
</span> | ||
</legend> | ||
</fieldset> | ||
`; | ||
|
||
exports[`Checkboxes nested dependant components passes through label params without breaking 1`] = ` | ||
<label class="govuk-c-label govuk-c-checkboxes__label" | ||
data-attribute="value" | ||
data-second-attribute="second-value" | ||
for="example-name-1" | ||
> | ||
<b> | ||
Option 1 | ||
</b> | ||
</label> | ||
<label class="govuk-c-label govuk-c-checkboxes__label" | ||
for="example-name-2" | ||
> | ||
<b>Option 2</b> | ||
</label> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.