Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure we're testing error-messages in date-input #625

Merged
merged 2 commits into from
Mar 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Internal:

- Fix date-input default example
(PR [#623](https://github.com/alphagov/govuk-frontend/pull/623))
- Ensure we're testing error-messages in date-input
(PR [#625](https://github.com/alphagov/govuk-frontend/pull/625))

## 0.0.26-alpha (Breaking release)

Expand Down
8 changes: 8 additions & 0 deletions src/date-input/__snapshots__/template.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ exports[`Date input passes through fieldset params without breaking 1`] = `

exports[`Date input passes through html fieldset params without breaking 1`] = `

<span class="govuk-c-error-message">
Error message goes here
</span>

`;

exports[`Date input passes through html fieldset params without breaking 2`] = `

<fieldset class="govuk-c-fieldset">
<legend class="govuk-c-fieldset__legend">
What is your
Expand Down
1 change: 1 addition & 0 deletions src/date-input/template.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ describe('Date input', () => {
]
})

expect(htmlWithClassName($, '.govuk-c-error-message')).toMatchSnapshot()
expect(htmlWithClassName($, '.govuk-c-fieldset')).toMatchSnapshot()
})
})