Skip to content

Commit

Permalink
Update input template tests to use jsdom
Browse files Browse the repository at this point in the history
Also refactor the tests to:

- move duplicated code (like rendering the same example of a component) into `beforeAll` blocks
- use `toHaveAccessibleDescription` and `toHaveAccessibleName` where appropriate
- not use snapshots
  • Loading branch information
36degrees committed May 24, 2024
1 parent ea3d9fc commit 794a2cd
Show file tree
Hide file tree
Showing 4 changed files with 502 additions and 510 deletions.

This file was deleted.

8 changes: 6 additions & 2 deletions packages/govuk-frontend/src/govuk/components/input/input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ examples:
options:
label:
text: National Insurance number
hint:
text: It’s on your National Insurance card, benefit letter, payslip or P60. For example, ‘QQ 12 34 56 C’.
id: input-with-error-message
name: test-name-3
errorMessage:
Expand Down Expand Up @@ -304,6 +302,12 @@ examples:
name: autocapitalize
type: text
autocapitalize: none
- name: disabled
options:
label:
text: Disabled input
id: disabled-input
disabled: true

- name: with prefix
options:
Expand Down
Loading

0 comments on commit 794a2cd

Please sign in to comment.