Skip to content

[WIP] Add reverse modifiers to form controls #5407

[WIP] Add reverse modifiers to form controls

[WIP] Add reverse modifiers to form controls #5407

Triggered via pull request April 30, 2026 15:17
Status Failure
Total duration 8m 53s
Artifacts 3

pull-request.yml

on: pull_request
Matrix: linting
Matrix: tests
Visual regression tests
6m 47s
Visual regression tests
Matrix: exports
Matrix: Sass import / sass
Sonar analysis
0s
Sonar analysis
Fit to window
Zoom out
Zoom in

Annotations

23 errors
JavaScript behaviour tests
Process completed with exit code 1.
Error summary › Focus handling › Links › moves focus to the linked element: packages/nhsuk-frontend/src/nhsuk/components/error-summary/error-summary.jsdom.test.mjs#L188
expect(element).toHaveFocus() Expected element with focus: <input class="nhsuk-input nhsuk-input--width-2 nhsuk-date-input__input" id="undefined-day" inputmode="numeric" name="day" type="text" /> Received element with focus: <div class="nhsuk-error-summary" data-module="nhsuk-error-summary" data-nhsuk-error-summary-init="" tabindex="-1"> <div role="alert"> <h2 class="nhsuk-error-summary__title"> There is a problem </h2> <div class="nhsuk-error-summary__body"> <p> Describe the errors and how to correct them </p> <ul class="nhsuk-list nhsuk-error-summary__list"> <li> <a href="#example-day">Date of birth must be in the past</a> </li> </ul> </div> </div> </div> at Object.toHaveFocus (packages/nhsuk-frontend/src/nhsuk/components/error-summary/error-summary.jsdom.test.mjs:188:24)
Radios › with conditional content › when JavaScript is unavailable or fails › with conditional content › includes the expected number of inputs and conditionals: packages/nhsuk-frontend/src/nhsuk/components/radios/radios.puppeteer.test.mjs#L75
expect(received).toHaveLength(expected) Expected length: 3 Received length: 0 Received array: [] at Object.toHaveLength (packages/nhsuk-frontend/src/nhsuk/components/radios/radios.puppeteer.test.mjs:75:27)
Checkboxes › with multiple groups and a "none of the above" option and conditional content › when JavaScript is available › Error handling › throws when a conditional target element is not found: packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs#L454
expect(received).rejects.toMatchObject(expected) - Expected - 6 + Received + 2 - Object { - "cause": Object { - "message": "nhsuk-checkboxes: Conditional reveal (`id=\"conditional-conditional\"`) not found", - "name": "ElementError", - }, - } + [Error: Initialising `new Checkboxes()` threw: + ElementError: nhsuk-checkboxes: Form inputs (`<input type="checkbox">`) not found] at Object.toMatchObject (node_modules/expect/build/index.js:2155:20) at Object.toMatchObject (packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs:454:21)
Checkboxes › with a "none of the above" option and conditional content › when JavaScript is available › unchecks other checkboxes and hides conditional content when the "none of the above" option is checked: shared/helpers/puppeteer.mjs#L338
TypeError: Element is not defined at getAttribute (shared/helpers/puppeteer.mjs:338:11) at Object.<anonymous> (packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs:277:37)
Checkboxes › with conditional content › when JavaScript is available › with conditional content: packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs#L214
expect(received).resolves.not.toThrow() Received promise rejected instead of resolved Rejected to value: [Error: Initialising `new Checkboxes()` threw: ElementError: nhsuk-checkboxes: Form inputs (`<input type="checkbox">`) not found] at expect (node_modules/expect/build/index.js:2116:15) at Object.expect (packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs:214:18)
Checkboxes › with conditional content › when JavaScript is available › with conditional content › toggles the conditional content when using an input with a keyboard: shared/helpers/puppeteer.mjs#L224
Initialising `new Checkboxes()` threw: ElementError: nhsuk-checkboxes: Form inputs (`<input type="checkbox">`) not found at render (shared/helpers/puppeteer.mjs:224:13) at initExample (packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs:22:5) at Object.<anonymous> (packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs:139:11)
Checkboxes › with conditional content › when JavaScript is available › with conditional content › toggles the conditional content when clicking an input: shared/helpers/puppeteer.mjs#L224
Initialising `new Checkboxes()` threw: ElementError: nhsuk-checkboxes: Form inputs (`<input type="checkbox">`) not found at render (shared/helpers/puppeteer.mjs:224:13) at initExample (packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs:22:5) at Object.<anonymous> (packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs:139:11)
Checkboxes › with conditional content › when JavaScript is available › with conditional content › indicates when conditional content is collapsed or revealed: shared/helpers/puppeteer.mjs#L224
Initialising `new Checkboxes()` threw: ElementError: nhsuk-checkboxes: Form inputs (`<input type="checkbox">`) not found at render (shared/helpers/puppeteer.mjs:224:13) at initExample (packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs:22:5) at Object.<anonymous> (packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs:139:11)
Checkboxes › with conditional content › when JavaScript is available › with conditional item checked › has no conditional content revealed that is associated with an unchecked input: shared/helpers/puppeteer.mjs#L224
Initialising `new Checkboxes()` threw: ElementError: nhsuk-checkboxes: Form inputs (`<input type="checkbox">`) not found at render (shared/helpers/puppeteer.mjs:224:13) at initExample (packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs:22:5) at Object.<anonymous> (packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs:108:11)
Checkboxes › with conditional content › when JavaScript is available › with conditional item checked › has conditional content revealed that is associated with a checked input: shared/helpers/puppeteer.mjs#L224
Initialising `new Checkboxes()` threw: ElementError: nhsuk-checkboxes: Form inputs (`<input type="checkbox">`) not found at render (shared/helpers/puppeteer.mjs:224:13) at initExample (packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs:22:5) at Object.<anonymous> (packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs:108:11)
Checkboxes › with conditional content › when JavaScript is unavailable or fails › with conditional content › includes the expected number of inputs and conditionals: packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs#L75
expect(received).toHaveLength(expected) Expected length: 3 Received length: 0 Received array: [] at Object.toHaveLength (packages/nhsuk-frontend/src/nhsuk/components/checkboxes/checkboxes.puppeteer.test.mjs:75:27)
Radios › without page heading › 'example' passes accessibility tests: shared/helpers/puppeteer.mjs#L123
TypeError: HTTP code for '/nhsuk-frontend/components/radios/example-without-page-heading/' is not defined at goTo (shared/helpers/puppeteer.mjs:123:9) at packages/nhsuk-frontend/src/nhsuk/components/radios/accessibility.puppeteer.test.mjs:33:9
Radios › inline › 'example' passes accessibility tests: shared/helpers/puppeteer.mjs#L123
TypeError: HTTP code for '/nhsuk-frontend/components/radios/example-inline/' is not defined at goTo (shared/helpers/puppeteer.mjs:123:9) at packages/nhsuk-frontend/src/nhsuk/components/radios/accessibility.puppeteer.test.mjs:33:9
Radios › with hint › 'example' passes accessibility tests: shared/helpers/puppeteer.mjs#L123
TypeError: HTTP code for '/nhsuk-frontend/components/radios/example-with-hint/' is not defined at goTo (shared/helpers/puppeteer.mjs:123:9) at packages/nhsuk-frontend/src/nhsuk/components/radios/accessibility.puppeteer.test.mjs:33:9
Radios › disabled › 'example' passes accessibility tests: shared/helpers/puppeteer.mjs#L123
TypeError: HTTP code for '/nhsuk-frontend/components/radios/example-disabled/' is not defined at goTo (shared/helpers/puppeteer.mjs:123:9) at packages/nhsuk-frontend/src/nhsuk/components/radios/accessibility.puppeteer.test.mjs:33:9
Radios › default › 'example' passes accessibility tests: shared/helpers/puppeteer.mjs#L123
TypeError: HTTP code for '/nhsuk-frontend/components/radios/example-default/' is not defined at goTo (shared/helpers/puppeteer.mjs:123:9) at packages/nhsuk-frontend/src/nhsuk/components/radios/accessibility.puppeteer.test.mjs:33:9
File upload › with error message and hint › 'example' passes accessibility tests: shared/helpers/puppeteer.mjs#L123
TypeError: HTTP code for '/nhsuk-frontend/components/file-upload/example-with-error-message-and-hint/' is not defined at goTo (shared/helpers/puppeteer.mjs:123:9) at packages/nhsuk-frontend/src/nhsuk/components/file-upload/accessibility.puppeteer.test.mjs:19:9
File upload › with error message › 'example' passes accessibility tests: shared/helpers/puppeteer.mjs#L123
TypeError: HTTP code for '/nhsuk-frontend/components/file-upload/example-with-error-message/' is not defined at goTo (shared/helpers/puppeteer.mjs:123:9) at packages/nhsuk-frontend/src/nhsuk/components/file-upload/accessibility.puppeteer.test.mjs:19:9
File upload › with hint › 'example' passes accessibility tests: shared/helpers/puppeteer.mjs#L123
TypeError: HTTP code for '/nhsuk-frontend/components/file-upload/example-with-hint/' is not defined at goTo (shared/helpers/puppeteer.mjs:123:9) at packages/nhsuk-frontend/src/nhsuk/components/file-upload/accessibility.puppeteer.test.mjs:19:9
File upload › disabled › 'example' passes accessibility tests: shared/helpers/puppeteer.mjs#L123
TypeError: HTTP code for '/nhsuk-frontend/components/file-upload/example-disabled/' is not defined at goTo (shared/helpers/puppeteer.mjs:123:9) at packages/nhsuk-frontend/src/nhsuk/components/file-upload/accessibility.puppeteer.test.mjs:19:9
File upload › default › 'example' passes accessibility tests: shared/helpers/puppeteer.mjs#L123
TypeError: HTTP code for '/nhsuk-frontend/components/file-upload/example-default/' is not defined at goTo (shared/helpers/puppeteer.mjs:123:9) at packages/nhsuk-frontend/src/nhsuk/components/file-upload/accessibility.puppeteer.test.mjs:19:9
Visual regression tests
Process completed with exit code 1.

Artifacts

Produced during runtime
Name Size Digest
Backstop report Expired
28.6 MB
sha256:5c5f53959b5cd265c1e9c905b2db2e6da018f8301da6112eb1e414c87338358b
Build diff Expired
2.29 MB
sha256:a267deee0be3494e478fb3009962dd10e2843b230774c4986cc67019cb4e6cec
JavaScript unit tests coverage Expired
272 KB
sha256:dab67cc4e06337ec6c8c9edfd90d36ec254d64f7ba9449649c4e793d6d8571b2