Skip to content

Update tests and stories #4

Update tests and stories

Update tests and stories #4

Triggered via pull request May 29, 2024 16:36
Status Failure
Total duration 48s
Artifacts

build-test.yml

on: pull_request
build_and_test
39s
build_and_test
Fit to window
Zoom out
Zoom in

Annotations

10 errors
src/components/content-presentation/details/Details.spec.tsx > should render the Details component: packages/nhsuk-frontend-react/src/components/content-presentation/details/Details.spec.tsx#L29
Error: Snapshot `should render the Details component 1` mismatched - Expected + Received @@ -1,23 +1,32 @@ <div> <details class="nhsuk-details" data-testid="details" + id="nhsuk-details0" + nhsuk-polyfilled="true" > <summary + aria-controls="nhsuk-details__text0" + aria-expanded="false" class="nhsuk-details__summary" data-testid="details-summary" + role="button" + tabindex="0" > <span class="nhsuk-details__summary-text" > How to find your NHS number </span> </summary> <div + aria-hidden="true" class="nhsuk-details__text" data-testid="details-text" + id="nhsuk-details__text0" + style="display: none;" > <p> An NHS number is a 10 digit number, like 485 777 3456. </p> <p> ❯ src/components/content-presentation/details/Details.spec.tsx:29:21
src/components/content-presentation/expander/Expander.spec.tsx > should render the Expander component: packages/nhsuk-frontend-react/src/components/content-presentation/expander/Expander.spec.tsx#L31
Error: Snapshot `should render the Expander component 1` mismatched - Expected + Received @@ -1,20 +1,29 @@ <div> <details class="nhsuk-details nhsuk-expander" + id="nhsuk-details0" + nhsuk-polyfilled="true" > <summary + aria-controls="nhsuk-details__text0" + aria-expanded="false" class="nhsuk-details__summary" + role="button" + tabindex="0" > <span class="nhsuk-details__summary-text" > Get your medical records </span> </summary> <div + aria-hidden="true" class="nhsuk-details__text" + id="nhsuk-details__text0" + style="display: none;" > <p> You can see your GP records by: </p> <ul> ❯ src/components/content-presentation/expander/Expander.spec.tsx:31:21
src/components/content-presentation/expander/Expander.spec.tsx > should render the Expander Group component: packages/nhsuk-frontend-react/src/components/content-presentation/expander/Expander.spec.tsx#L78
Error: Snapshot `should render the Expander Group component 1` mismatched - Expected + Received @@ -2,22 +2,31 @@ <div class="nhsuk-expander-group" > <details class="nhsuk-details nhsuk-expander" + id="nhsuk-details0" + nhsuk-polyfilled="true" > <summary + aria-controls="nhsuk-details__text0" + aria-expanded="false" class="nhsuk-details__summary" + role="button" + tabindex="0" > <span class="nhsuk-details__summary-text" > How to measure your blood glucose levels </span> </summary> <div + aria-hidden="true" class="nhsuk-details__text" + id="nhsuk-details__text0" + style="display: none;" > <p> Testing your blood at home is quick and easy, although it can be uncomfortable. It does get better. </p> <p> @@ -39,22 +48,31 @@ </ul> </div> </details> <details class="nhsuk-details nhsuk-expander" + id="nhsuk-details1" + nhsuk-polyfilled="true" > <summary + aria-controls="nhsuk-details__text1" + aria-expanded="false" class="nhsuk-details__summary" + role="button" + tabindex="0" > <span class="nhsuk-details__summary-text" > When to check your blood glucose level </span> </summary> <div + aria-hidden="true" class="nhsuk-details__text" + id="nhsuk-details__text1" + style="display: none;" > <p> Try to check your blood: </p> <ul> ❯ src/components/content-presentation/expander/Expander.spec.tsx:78:21
src/components/content-presentation/tabs/Tabs.spec.tsx > should render the Tabs component: packages/nhsuk-frontend-react/src/components/content-presentation/tabs/Tabs.spec.tsx#L36
Error: Snapshot `should render the Tabs component 1` mismatched - Expected + Received @@ -8,88 +8,121 @@ > Contents </h2> <ul class="nhsuk-tabs__list" + role="tablist" > <li - class="nhsuk-tabs__list-item" + class="nhsuk-tabs__list-item nhsuk-tabs__list-item--selected" + role="presentation" > <a + aria-controls="past-day" + aria-selected="true" class="nhsuk-tabs__tab" href="#past-day" + id="tab_past-day" + role="tab" + tabindex="0" > Past day </a> </li> <li class="nhsuk-tabs__list-item" + role="presentation" > <a + aria-controls="past-week" + aria-selected="false" class="nhsuk-tabs__tab" href="#past-week" + id="tab_past-week" + role="tab" + tabindex="-1" > Past week </a> </li> <li class="nhsuk-tabs__list-item" + role="presentation" > <a + aria-controls="past-month" + aria-selected="false" class="nhsuk-tabs__tab" href="#past-month" + id="tab_past-month" + role="tab" + tabindex="-1" > Past month </a> </li> <li class="nhsuk-tabs__list-item" + role="presentation" > <a + aria-controls="past-year" + aria-selected="false" class="nhsuk-tabs__tab" href="#past-year" + id="tab_past-year" + role="tab" + tabindex="-1" > Past year </a> </li> </ul> <div + aria-labelledby="tab_past-day" class="nhsuk-tabs__panel" id="past-day" + role="tabpanel" > <h2> Past day </h2> <p> Content for the past day </p> </div> <div - class="nhsuk-tabs__panel" + aria-labelledby="tab_past-week" + class="nhsuk-tabs__panel nhsuk-tabs__panel--hidden" id="past-week" + role="tabpanel" > <h2> Past week </h2> <p> Content for the past week </p> </div> <div - class="nhsuk-tabs__panel" + aria-labelledby="tab_past-month" + class="nhsuk-tabs__panel nhsuk-tabs__panel--hidden" id="past-month" + role="tabpanel" > <h2> Past month </h2> <p> Content for the past month </p> </div> <div - class="nhsuk-tabs__panel" + aria-labelledby="tab_past-year" + class="nhsuk-tabs__panel nhsuk-tabs__panel--hidden" id="past-year" + role="tabpanel" > <h2> Past year </h2> <p> ❯ src/components/content-presentation/tabs/Tabs.spec.tsx:36:21
src/components/form-elements/character-count/CharacterCount.spec.tsx > should render the CharacterCount component: packages/nhsuk-frontend-react/src/resources/character-count/character-count.js#L30
DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node. ❯ Function.insertBefore ../../node_modules/.pnpm/happy-dom@14.11.4/node_modules/happy-dom/src/nodes/node/NodeUtility.ts:181:10 ❯ Function.insertBefore ../../node_modules/.pnpm/happy-dom@14.11.4/node_modules/happy-dom/src/nodes/element/ElementUtility.ts:215:16 ❯ HTMLElement.[insertBefore] ../../node_modules/.pnpm/happy-dom@14.11.4/node_modules/happy-dom/src/nodes/element/Element.ts:522:25 ❯ HTMLElement.insertBefore ../../node_modules/.pnpm/happy-dom@14.11.4/node_modules/happy-dom/src/nodes/node/Node.ts:368:43 ❯ HTMLTextAreaElement.insertAdjacentElement ../../node_modules/.pnpm/happy-dom@14.11.4/node_modules/happy-dom/src/nodes/element/Element.ts:609:23 ❯ CharacterCount.init src/resources/character-count/character-count.js:30:15 ❯ src/resources/character-count/character-count.js:260:28 ❯ Module.__vite_ssr_exports__.default src/resources/character-count/character-count.js:259:19 ❯ src/components/form-elements/textarea/Textarea.tsx:88:7
src/components/form-elements/character-count/CharacterCount.spec.tsx > should render the CharacterCount component: node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/index.js#L28
Error: Should not already be working. ❯ performConcurrentWorkOnRoot ../../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.development.js:25742:11 ❯ flushActQueue ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js:2667:24 ❯ act ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js:2582:11 ❯ ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/act-compat.js:47:25 ❯ ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/pure.js:285:28 ❯ cleanup ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/pure.js:281:22 ❯ ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/index.js:28:25
src/components/form-elements/textarea/Textarea.spec.tsx > should render a textarea element: packages/nhsuk-frontend-react/src/resources/character-count/character-count.js#L30
DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node. ❯ Function.insertBefore ../../node_modules/.pnpm/happy-dom@14.11.4/node_modules/happy-dom/src/nodes/node/NodeUtility.ts:181:10 ❯ Function.insertBefore ../../node_modules/.pnpm/happy-dom@14.11.4/node_modules/happy-dom/src/nodes/element/ElementUtility.ts:215:16 ❯ HTMLElement.[insertBefore] ../../node_modules/.pnpm/happy-dom@14.11.4/node_modules/happy-dom/src/nodes/element/Element.ts:522:25 ❯ HTMLElement.insertBefore ../../node_modules/.pnpm/happy-dom@14.11.4/node_modules/happy-dom/src/nodes/node/Node.ts:368:43 ❯ HTMLTextAreaElement.insertAdjacentElement ../../node_modules/.pnpm/happy-dom@14.11.4/node_modules/happy-dom/src/nodes/element/Element.ts:609:23 ❯ CharacterCount.init src/resources/character-count/character-count.js:30:15 ❯ src/resources/character-count/character-count.js:260:28 ❯ Module.__vite_ssr_exports__.default src/resources/character-count/character-count.js:259:19 ❯ src/components/form-elements/textarea/Textarea.tsx:88:7
src/components/form-elements/textarea/Textarea.spec.tsx > should render a textarea element: node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/index.js#L28
Error: Should not already be working. ❯ performConcurrentWorkOnRoot ../../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.development.js:25742:11 ❯ flushActQueue ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js:2667:24 ❯ act ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js:2582:11 ❯ ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/act-compat.js:47:25 ❯ ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/pure.js:285:28 ❯ cleanup ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/pure.js:281:22 ❯ ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/index.js:28:25
src/components/form-elements/textarea/Textarea.spec.tsx > should render a textarea element with a hint: packages/nhsuk-frontend-react/src/components/form-elements/textarea/Textarea.spec.tsx#L14
Error: Should not already be working. ❯ performConcurrentWorkOnRoot ../../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.development.js:25742:11 ❯ flushActQueue ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js:2667:24 ❯ act ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js:2582:11 ❯ ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/act-compat.js:47:25 ❯ renderRoot ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/pure.js:180:26 ❯ Proxy.render ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/pure.js:271:10 ❯ src/components/form-elements/textarea/Textarea.spec.tsx:14:25
src/components/form-elements/textarea/Textarea.spec.tsx > should render a textarea element with a hint: node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/index.js#L28
Error: Should not already be working. ❯ performConcurrentWorkOnRoot ../../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.development.js:25742:11 ❯ flushActQueue ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js:2667:24 ❯ act ../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js:2582:11 ❯ ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/act-compat.js:47:25 ❯ ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/pure.js:285:28 ❯ cleanup ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/pure.js:281:22 ❯ ../../node_modules/.pnpm/@testing-library+react@15.0.7_@types+react@18.3.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@testing-library/react/dist/index.js:28:25