broken logic #762
Annotations
10 errors
Unhandled error:
frontend/lib/api/form/pollingstation/PollingStationFormController.tsx#L287
TypeError: ref.ignoreWarnings is not a function
❯ submit lib/api/form/pollingstation/PollingStationFormController.tsx:287:15
❯ handleSubmit app/component/form/candidates_votes_form/CandidatesVotesForm.tsx:60:5
❯ HTMLUnknownElement.callCallback node_modules/react-dom/cjs/react-dom.development.js:4164:14
❯ HTMLUnknownElement.callTheUserObjectsOperation node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30
❯ innerInvokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:350:25
❯ invokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3
❯ HTMLUnknownElementImpl._dispatch node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9
❯ HTMLUnknownElementImpl.dispatchEvent node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17
❯ HTMLUnknownElement.dispatchEvent node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34
❯ Object.invokeGuardedCallbackDev node_modules/react-dom/cjs/react-dom.development.js:4213:16
This error originated in "app/component/form/candidates_votes_form/CandidatesVotesForm.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "Form field entry and keybindings". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
|
Unhandled error:
frontend/lib/api/form/pollingstation/PollingStationFormController.tsx#L287
TypeError: ref.ignoreWarnings is not a function
❯ submit lib/api/form/pollingstation/PollingStationFormController.tsx:287:15
❯ handleSubmit app/component/form/candidates_votes_form/CandidatesVotesForm.tsx:60:5
❯ HTMLUnknownElement.callCallback node_modules/react-dom/cjs/react-dom.development.js:4164:14
❯ HTMLUnknownElement.callTheUserObjectsOperation node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30
❯ innerInvokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:350:25
❯ invokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3
❯ HTMLUnknownElementImpl._dispatch node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9
❯ HTMLUnknownElementImpl.dispatchEvent node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17
❯ HTMLUnknownElement.dispatchEvent node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34
❯ Object.invokeGuardedCallbackDev node_modules/react-dom/cjs/react-dom.development.js:4213:16
This error originated in "app/component/form/candidates_votes_form/CandidatesVotesForm.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "CandidateVotesForm request body is equal to the form data". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
|
Unhandled error:
frontend/lib/api/form/pollingstation/PollingStationFormController.tsx#L287
TypeError: ref.ignoreWarnings is not a function
❯ submit lib/api/form/pollingstation/PollingStationFormController.tsx:287:15
❯ handleSubmit app/component/form/candidates_votes_form/CandidatesVotesForm.tsx:60:5
❯ HTMLUnknownElement.callCallback node_modules/react-dom/cjs/react-dom.development.js:4164:14
❯ HTMLUnknownElement.callTheUserObjectsOperation node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30
❯ innerInvokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:350:25
❯ invokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3
❯ HTMLUnknownElementImpl._dispatch node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9
❯ HTMLUnknownElementImpl.dispatchEvent node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17
❯ HTMLUnknownElement.dispatchEvent node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34
❯ Object.invokeGuardedCallbackDev node_modules/react-dom/cjs/react-dom.development.js:4213:16
This error originated in "app/component/form/candidates_votes_form/CandidatesVotesForm.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "422 response results in display of error message". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
|
Unhandled error:
frontend/lib/api/form/pollingstation/PollingStationFormController.tsx#L287
TypeError: ref.ignoreWarnings is not a function
❯ submit lib/api/form/pollingstation/PollingStationFormController.tsx:287:15
❯ handleSubmit app/component/form/candidates_votes_form/CandidatesVotesForm.tsx:60:5
❯ HTMLUnknownElement.callCallback node_modules/react-dom/cjs/react-dom.development.js:4164:14
❯ HTMLUnknownElement.callTheUserObjectsOperation node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30
❯ innerInvokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:350:25
❯ invokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3
❯ HTMLUnknownElementImpl._dispatch node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9
❯ HTMLUnknownElementImpl.dispatchEvent node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17
❯ HTMLUnknownElement.dispatchEvent node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34
❯ Object.invokeGuardedCallbackDev node_modules/react-dom/cjs/react-dom.development.js:4213:16
This error originated in "app/component/form/candidates_votes_form/CandidatesVotesForm.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "500 response results in display of error message". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
|
Unhandled error:
frontend/lib/api/form/pollingstation/PollingStationFormController.tsx#L287
TypeError: ref.ignoreWarnings is not a function
❯ submit lib/api/form/pollingstation/PollingStationFormController.tsx:287:15
❯ handleSubmit app/component/form/candidates_votes_form/CandidatesVotesForm.tsx:60:5
❯ HTMLUnknownElement.callCallback node_modules/react-dom/cjs/react-dom.development.js:4164:14
❯ HTMLUnknownElement.callTheUserObjectsOperation node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30
❯ innerInvokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:350:25
❯ invokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3
❯ HTMLUnknownElementImpl._dispatch node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9
❯ HTMLUnknownElementImpl.dispatchEvent node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17
❯ HTMLUnknownElement.dispatchEvent node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34
❯ Object.invokeGuardedCallbackDev node_modules/react-dom/cjs/react-dom.development.js:4213:16
This error originated in "app/component/form/candidates_votes_form/CandidatesVotesForm.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "F.01 Invalid value". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
|
Unhandled error:
frontend/lib/api/form/pollingstation/PollingStationFormController.tsx#L287
TypeError: ref.ignoreWarnings is not a function
❯ submit lib/api/form/pollingstation/PollingStationFormController.tsx:287:15
❯ handleSubmit app/component/form/candidates_votes_form/CandidatesVotesForm.tsx:60:5
❯ HTMLUnknownElement.callCallback node_modules/react-dom/cjs/react-dom.development.js:4164:14
❯ HTMLUnknownElement.callTheUserObjectsOperation node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30
❯ innerInvokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:350:25
❯ invokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3
❯ HTMLUnknownElementImpl._dispatch node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9
❯ HTMLUnknownElementImpl.dispatchEvent node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17
❯ HTMLUnknownElement.dispatchEvent node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34
❯ Object.invokeGuardedCallbackDev node_modules/react-dom/cjs/react-dom.development.js:4213:16
This error originated in "app/component/form/candidates_votes_form/CandidatesVotesForm.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "F.31 IncorrectTotal group total". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
|
Unhandled error:
frontend/lib/api/form/pollingstation/PollingStationFormController.tsx#L287
TypeError: ref.ignoreWarnings is not a function
❯ submit lib/api/form/pollingstation/PollingStationFormController.tsx:287:15
❯ handleSubmit app/component/form/candidates_votes_form/CandidatesVotesForm.tsx:60:5
❯ HTMLUnknownElement.callCallback node_modules/react-dom/cjs/react-dom.development.js:4164:14
❯ HTMLUnknownElement.callTheUserObjectsOperation node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30
❯ innerInvokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:350:25
❯ invokeEventListeners node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3
❯ HTMLUnknownElementImpl._dispatch node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9
❯ HTMLUnknownElementImpl.dispatchEvent node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17
❯ HTMLUnknownElement.dispatchEvent node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34
❯ Object.invokeGuardedCallbackDev node_modules/react-dom/cjs/react-dom.development.js:4213:16
This error originated in "app/component/form/candidates_votes_form/CandidatesVotesForm.test.tsx" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "Warnings can be displayed". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
|
app/component/form/candidates_votes_form/CandidatesVotesForm.test.tsx > Test CandidatesVotesForm > CandidatesVotesForm user interactions > hitting enter key does not result in api call:
frontend/app/component/form/candidates_votes_form/CandidatesVotesForm.tsx#L11
Error: vitest-fail-on-console > Expected test not to call console.error().
If the error is expected, test for it explicitly by mocking it out using:
vi.spyOn(console, 'error').mockImplementation(() => {})
and test that the warning occurs.
Warning: Cannot update a component (`PollingStationFormController`) while rendering a different component (`CandidatesVotesForm`). To locate the bad setState() call inside `CandidatesVotesForm`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render
at CandidatesVotesForm (/home/runner/work/abacus/abacus/frontend/app/component/form/candidates_votes_form/CandidatesVotesForm.tsx:11:32)
at PollingStationFormController (/home/runner/work/abacus/abacus/frontend/lib/api/form/pollingstation/PollingStationFormController.tsx:11:41)
at RenderedRoute (/home/runner/work/abacus/abacus/frontend/node_modules/react-router/dist/umd/react-router.development.js:539:7)
at RenderErrorBoundary (/home/runner/work/abacus/abacus/frontend/node_modules/react-router/dist/umd/react-router.development.js:486:7)
at DataRoutes (/home/runner/work/abacus/abacus/frontend/node_modules/react-router-dom/dist/umd/react-router-dom.development.js:679:7)
at Router (/home/runner/work/abacus/abacus/frontend/node_modules/react-router/dist/umd/react-router.development.js:1163:17)
at RouterProvider (/home/runner/work/abacus/abacus/frontend/node_modules/react-router-dom/dist/umd/react-router-dom.development.js:455:7)
at ApiProvider (/home/runner/work/abacus/abacus/frontend/lib/api/ApiProvider.tsx:9:24)
at Providers (/home/runner/work/abacus/abacus/frontend/app/test/unit/Providers.tsx:9:22)
at Console.l [as error] (file:///home/runner/work/abacus/abacus/frontend/node_modules/vitest-fail-on-console/src/index.ts:90:31)
at printWarning (/home/runner/work/abacus/abacus/frontend/node_modules/react-dom/cjs/react-dom.development.js:86:30)
at error (/home/runner/work/abacus/abacus/frontend/node_modules/react-dom/cjs/react-dom.development.js:60:7)
at warnAboutRenderPhaseUpdatesInDEV (/home/runner/work/abacus/abacus/frontend/node_modules/react-dom/cjs/react-dom.development.js:27531:15)
at scheduleUpdateOnFiber (/home/runner/work/abacus/abacus/frontend/node_modules/react-dom/cjs/react-dom.development.js:25537:5)
at setFormState (/home/runner/work/abacus/abacus/frontend/node_modules/react-dom/cjs/react-dom.development.js:16708:7)
at registerCurrentForm (/home/runner/work/abacus/abacus/frontend/lib/api/form/pollingstation/PollingStationFormController.tsx:272:11)
at Module.usePoliticalGroup (/home/runner/work/abacus/abacus/frontend/lib/api/form/pollingstation/usePoliticalGroups.ts:62:3)
at CandidatesVotesForm (/home/runner/work/abacus/abacus/frontend/app/component/form/candidates_votes_form/CandidatesVotesForm.tsx:28:74)
at renderWithHooks (/home/runner/work/abacus/abacus/frontend/node_modules/react-dom/cjs/react-dom.development.js:15486:18)
❯ CandidatesVotesForm app/component/form/candidates_votes_form/CandidatesVotesForm.tsx:11:32
❯ PollingStationFormController lib/api/form/pollingstation/PollingStationFormController.tsx:11:41
❯ RenderedRoute node_modules/react-router/dist/umd/react-router.development.js:539:7
❯ RenderErrorBoundary node_modules/react-router/dist/umd/react-router.development.js:486:7
❯ DataRoutes node_modules/react-router-dom/dist/umd/react-router-dom.development.js:679:7
❯ Router node_modules/react-router/dist/umd/react-router.development.js:1163:17
❯ RouterProvider node_modules/react-router-dom/dist/umd/react-router-dom.development.js:455:7
❯ ApiProvider lib/api/ApiProvider.tsx:9:24
❯ Providers app/test/unit/Providers.tsx:9:22
❯ Console.l [as error] node_modules/vitest-fail-on-console/src/index.ts:90:31
❯ printWarning node_modules/react-dom/cjs/react-dom.development.js:86:30
❯ error node_modules/react-dom/cjs/react-dom.development.js:60:7
❯ warnAboutRenderPhaseUpdatesInDEV node_modules/react-dom/cjs/react-dom.development.js:27531:15
❯ scheduleUpdateOnFiber node_modules/react-dom/cjs/react-dom.devel
|
app/component/form/candidates_votes_form/CandidatesVotesForm.test.tsx > Test CandidatesVotesForm > CandidatesVotesForm user interactions > Form field entry and keybindings:
frontend/app/component/form/candidates_votes_form/CandidatesVotesForm.test.tsx#L144
TestingLibraryElementError: Unable to find an element by: [id="result"]
Ignored nodes: comments, script, style
<body>
<div>
<form>
<h2>
Lijst 1 - Vurige Vleugels Partij
</h2>
<table
class="_inputgrid_6aaff4 zebra"
>
<thead>
<tr>
<th>
Nummer
</th>
<th>
Aantal stemmen
</th>
<th>
Kandidaat
</th>
</tr>
</thead>
<tbody>
<tr
class=""
id="row-candidate_votes-0.votes"
>
<td>
1
</td>
<td>
<div
class="_form-field_23f4c1"
>
<aside />
<div
class="_container_cb2831"
>
<input
id="candidate_votes-0.votes"
maxlength="11"
name="candidatevotes[]"
value="12.345"
/>
</div>
</div>
</td>
<td>
Zilverlicht, E. (Eldor)
</td>
</tr>
<tr
class=""
id="row-candidate_votes-1.votes"
>
<td>
2
</td>
<td>
<div
class="_form-field_23f4c1"
>
<aside />
<div
class="_container_cb2831"
>
<input
id="candidate_votes-1.votes"
maxlength="11"
name="candidatevotes[]"
value="6.789"
/>
</div>
</div>
</td>
<td>
Donderbrul, G. (Grom)
</td>
</tr>
<tr
class=""
id="row-candidate_votes-2.votes"
>
<td>
3
</td>
<td>
<div
class="_form-field_23f4c1"
>
<aside />
<div
class="_container_cb2831"
>
<input
id="candidate_votes-2.votes"
maxlength="11"
name="candidatevotes[]"
value="123"
/>
</div>
</div>
</td>
<td>
Fluisterwind, S. (Seraphina)
</td>
</tr>
<tr
class=""
id="row-candidate_votes-3.votes"
>
<td>
4
</td>
<td>
<div
class="_form-field_23f4c1"
>
<aside />
<div
class="_container_cb2831"
>
<input
id="candidate_votes-3.votes"
maxlength="11"
name="candidatevotes[]"
value="4.242"
/>
</div>
</div>
</td>
<td>
Nachtschaduw, V. (Vesper)
</td>
</tr>
<tr
class=""
id="row-candidate_votes-4.votes"
>
<td>
5
</td>
<td>
<div
class="_form-field_23f4c1"
>
<aside />
<div
class="_container_cb2831"
>
<input
id="candidate_votes-4.votes"
maxlength="11"
name="candidatevotes[]"
value="12"
/>
</div>
</div>
</td>
<td>
Stormvleugel, R. (Ravian)
</td>
</tr>
<tr
class=""
|
app/component/form/candidates_votes_form/CandidatesVotesForm.test.tsx > Test CandidatesVotesForm > CandidatesVotesForm user interactions > Form field entry and keybindings:
frontend/lib/api/form/pollingstation/PollingStationFormController.tsx#L287
Error: vitest-fail-on-console > Expected test not to call console.error().
If the error is expected, test for it explicitly by mocking it out using:
vi.spyOn(console, 'error').mockImplementation(() => {})
and test that the warning occurs.
Error: Uncaught [TypeError: ref.ignoreWarnings is not a function]
at reportException (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:66:24)
at innerInvokeEventListeners (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:353:9)
at invokeEventListeners (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3)
at HTMLUnknownElementImpl._dispatch (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9)
at HTMLUnknownElementImpl.dispatchEvent (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17)
at HTMLUnknownElement.dispatchEvent (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34)
at Object.invokeGuardedCallbackDev (/home/runner/work/abacus/abacus/frontend/node_modules/react-dom/cjs/react-dom.development.js:4213:16)
at invokeGuardedCallback (/home/runner/work/abacus/abacus/frontend/node_modules/react-dom/cjs/react-dom.development.js:4277:31)
at invokeGuardedCallbackAndCatchFirstError (/home/runner/work/abacus/abacus/frontend/node_modules/react-dom/cjs/react-dom.development.js:4291:25)
at executeDispatch (/home/runner/work/abacus/abacus/frontend/node_modules/react-dom/cjs/react-dom.development.js:9041:3) TypeError: ref.ignoreWarnings is not a function
at submit (/home/runner/work/abacus/abacus/frontend/lib/api/form/pollingstation/PollingStationFormController.tsx:287:15)
at handleSubmit (/home/runner/work/abacus/abacus/frontend/app/component/form/candidates_votes_form/CandidatesVotesForm.tsx:60:5)
at HTMLUnknownElement.callCallback (/home/runner/work/abacus/abacus/frontend/node_modules/react-dom/cjs/react-dom.development.js:4164:14)
at HTMLUnknownElement.callTheUserObjectsOperation (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/generated/EventListener.js:26:30)
at innerInvokeEventListeners (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:350:25)
at invokeEventListeners (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3)
at HTMLUnknownElementImpl._dispatch (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9)
at HTMLUnknownElementImpl.dispatchEvent (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:104:17)
at HTMLUnknownElement.dispatchEvent (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:241:34)
at Object.invokeGuardedCallbackDev (/home/runner/work/abacus/abacus/frontend/node_modules/react-dom/cjs/react-dom.development.js:4213:16)
at Console.l [as error] (file:///home/runner/work/abacus/abacus/frontend/node_modules/vitest-fail-on-console/src/index.ts:90:31)
at VirtualConsole.<anonymous> (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/virtual-console.js:29:45)
at VirtualConsole.emit (node:events:519:28)
at reportException (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:70:28)
at innerInvokeEventListeners (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:353:9)
at invokeEventListeners (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:286:3)
at HTMLUnknownElementImpl._dispatch (/home/runner/work/abacus/abacus/frontend/node_modules/jsdom/
|