362 lines
18 KiB
Plaintext
362 lines
18 KiB
Plaintext
node : console.error
|
|
At line:1 char:122
|
|
+ ... =$env:TEMP; node node_modules/jest/bin/jest.js --runInBand --runTests ...
|
|
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
+ CategoryInfo : NotSpecified: ( console.error:String) [], RemoteException
|
|
+ FullyQualifiedErrorId : NativeCommandError
|
|
|
|
An update to InterviewAiAssistant inside a test was not wrapped in act(...).
|
|
|
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
|
|
act(() => {
|
|
/* fire events that update state */
|
|
});
|
|
/* assert on the output */
|
|
|
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at
|
|
https://react.dev/link/wrap-tests-with-act
|
|
|
|
233 | setCv(null); setCvLoading(true); setCvError(null);
|
|
234 | applicationAssetsApi.cv(jobId)
|
|
> 235 | .then((result) => { if (active) setCv(result); })
|
|
| ^
|
|
236 | .catch((cause) => { if (active) setCvError({ cause }); })
|
|
237 | .finally(() => { if (active) setCvLoading(false); });
|
|
238 | return () => { active = false; };
|
|
|
|
at node_modules/react-dom/cjs/react-dom-client.development.js:18758:19
|
|
at runWithFiberInDEV (node_modules/react-dom/cjs/react-dom-client.development.js:874:13)
|
|
at warnIfUpdatesNotWrappedWithActDEV (node_modules/react-dom/cjs/react-dom-client.development.js:18757:9)
|
|
at scheduleUpdateOnFiber (node_modules/react-dom/cjs/react-dom-client.development.js:16409:11)
|
|
at dispatchSetStateInternal (node_modules/react-dom/cjs/react-dom-client.development.js:9170:13)
|
|
at dispatchSetState (node_modules/react-dom/cjs/react-dom-client.development.js:9127:7)
|
|
at setCv (src/components/InterviewPrep.tsx:235:39)
|
|
|
|
console.error
|
|
An update to ApplicationFollowUp inside a test was not wrapped in act(...).
|
|
|
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
|
|
act(() => {
|
|
/* fire events that update state */
|
|
});
|
|
/* assert on the output */
|
|
|
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at
|
|
https://react.dev/link/wrap-tests-with-act
|
|
|
|
431 | try {
|
|
432 | const result = await interviewPrepApi.followUp(jobId);
|
|
> 433 | setData(result);
|
|
| ^
|
|
434 | setDate(result.followUpAt ? result.followUpAt.slice(0, 10) : "");
|
|
435 | setAction(result.nextAction ?? "");
|
|
436 | setError(null);
|
|
|
|
at node_modules/react-dom/cjs/react-dom-client.development.js:18758:19
|
|
at runWithFiberInDEV (node_modules/react-dom/cjs/react-dom-client.development.js:874:13)
|
|
at warnIfUpdatesNotWrappedWithActDEV (node_modules/react-dom/cjs/react-dom-client.development.js:18757:9)
|
|
at scheduleUpdateOnFiber (node_modules/react-dom/cjs/react-dom-client.development.js:16409:11)
|
|
at dispatchSetStateInternal (node_modules/react-dom/cjs/react-dom-client.development.js:9170:13)
|
|
at dispatchSetState (node_modules/react-dom/cjs/react-dom-client.development.js:9127:7)
|
|
at setData (src/components/InterviewPrep.tsx:433:7)
|
|
|
|
console.error
|
|
An update to ApplicationFollowUp inside a test was not wrapped in act(...).
|
|
|
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
|
|
act(() => {
|
|
/* fire events that update state */
|
|
});
|
|
/* assert on the output */
|
|
|
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at
|
|
https://react.dev/link/wrap-tests-with-act
|
|
|
|
432 | const result = await interviewPrepApi.followUp(jobId);
|
|
433 | setData(result);
|
|
> 434 | setDate(result.followUpAt ? result.followUpAt.slice(0, 10) : "");
|
|
| ^
|
|
435 | setAction(result.nextAction ?? "");
|
|
436 | setError(null);
|
|
437 | } catch (err) {
|
|
|
|
at node_modules/react-dom/cjs/react-dom-client.development.js:18758:19
|
|
at runWithFiberInDEV (node_modules/react-dom/cjs/react-dom-client.development.js:874:13)
|
|
at warnIfUpdatesNotWrappedWithActDEV (node_modules/react-dom/cjs/react-dom-client.development.js:18757:9)
|
|
at scheduleUpdateOnFiber (node_modules/react-dom/cjs/react-dom-client.development.js:16409:11)
|
|
at dispatchSetStateInternal (node_modules/react-dom/cjs/react-dom-client.development.js:9170:13)
|
|
at dispatchSetState (node_modules/react-dom/cjs/react-dom-client.development.js:9127:7)
|
|
at setDate (src/components/InterviewPrep.tsx:434:7)
|
|
|
|
console.error
|
|
An update to ApplicationFollowUp inside a test was not wrapped in act(...).
|
|
|
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
|
|
act(() => {
|
|
/* fire events that update state */
|
|
});
|
|
/* assert on the output */
|
|
|
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at
|
|
https://react.dev/link/wrap-tests-with-act
|
|
|
|
433 | setData(result);
|
|
434 | setDate(result.followUpAt ? result.followUpAt.slice(0, 10) : "");
|
|
> 435 | setAction(result.nextAction ?? "");
|
|
| ^
|
|
436 | setError(null);
|
|
437 | } catch (err) {
|
|
438 | setError({ cause: err, fallback: "interviewFollowUpLoadFailed" });
|
|
|
|
at node_modules/react-dom/cjs/react-dom-client.development.js:18758:19
|
|
at runWithFiberInDEV (node_modules/react-dom/cjs/react-dom-client.development.js:874:13)
|
|
at warnIfUpdatesNotWrappedWithActDEV (node_modules/react-dom/cjs/react-dom-client.development.js:18757:9)
|
|
at scheduleUpdateOnFiber (node_modules/react-dom/cjs/react-dom-client.development.js:16409:11)
|
|
at dispatchSetStateInternal (node_modules/react-dom/cjs/react-dom-client.development.js:9170:13)
|
|
at dispatchSetState (node_modules/react-dom/cjs/react-dom-client.development.js:9127:7)
|
|
at setAction (src/components/InterviewPrep.tsx:435:7)
|
|
|
|
console.error
|
|
An update to ApplicationFollowUp inside a test was not wrapped in act(...).
|
|
|
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
|
|
act(() => {
|
|
/* fire events that update state */
|
|
});
|
|
/* assert on the output */
|
|
|
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at
|
|
https://react.dev/link/wrap-tests-with-act
|
|
|
|
434 | setDate(result.followUpAt ? result.followUpAt.slice(0, 10) : "");
|
|
435 | setAction(result.nextAction ?? "");
|
|
> 436 | setError(null);
|
|
| ^
|
|
437 | } catch (err) {
|
|
438 | setError({ cause: err, fallback: "interviewFollowUpLoadFailed" });
|
|
439 | } finally {
|
|
|
|
at node_modules/react-dom/cjs/react-dom-client.development.js:18758:19
|
|
at runWithFiberInDEV (node_modules/react-dom/cjs/react-dom-client.development.js:874:13)
|
|
at warnIfUpdatesNotWrappedWithActDEV (node_modules/react-dom/cjs/react-dom-client.development.js:18757:9)
|
|
at scheduleUpdateOnFiber (node_modules/react-dom/cjs/react-dom-client.development.js:16409:11)
|
|
at dispatchSetStateInternal (node_modules/react-dom/cjs/react-dom-client.development.js:9170:13)
|
|
at dispatchSetState (node_modules/react-dom/cjs/react-dom-client.development.js:9127:7)
|
|
at setError (src/components/InterviewPrep.tsx:436:7)
|
|
|
|
console.error
|
|
An update to ApplicationFollowUp inside a test was not wrapped in act(...).
|
|
|
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
|
|
act(() => {
|
|
/* fire events that update state */
|
|
});
|
|
/* assert on the output */
|
|
|
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at
|
|
https://react.dev/link/wrap-tests-with-act
|
|
|
|
438 | setError({ cause: err, fallback: "interviewFollowUpLoadFailed" });
|
|
439 | } finally {
|
|
> 440 | setLoading(false);
|
|
| ^
|
|
441 | }
|
|
442 | }, [jobId]);
|
|
443 |
|
|
|
|
at node_modules/react-dom/cjs/react-dom-client.development.js:18758:19
|
|
at runWithFiberInDEV (node_modules/react-dom/cjs/react-dom-client.development.js:874:13)
|
|
at warnIfUpdatesNotWrappedWithActDEV (node_modules/react-dom/cjs/react-dom-client.development.js:18757:9)
|
|
at scheduleUpdateOnFiber (node_modules/react-dom/cjs/react-dom-client.development.js:16409:11)
|
|
at dispatchSetStateInternal (node_modules/react-dom/cjs/react-dom-client.development.js:9170:13)
|
|
at dispatchSetState (node_modules/react-dom/cjs/react-dom-client.development.js:9127:7)
|
|
at setLoading (src/components/InterviewPrep.tsx:440:7)
|
|
|
|
console.error
|
|
An update to ApplicationInterviewPrep inside a test was not wrapped in act(...).
|
|
|
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
|
|
act(() => {
|
|
/* fire events that update state */
|
|
});
|
|
/* assert on the output */
|
|
|
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at
|
|
https://react.dev/link/wrap-tests-with-act
|
|
|
|
55 | setLoading(true);
|
|
56 | try {
|
|
> 57 | setBoard(await interviewPrepApi.get(jobId));
|
|
| ^
|
|
58 | setError(null);
|
|
59 | } catch (err) {
|
|
60 | setError({ cause: err, fallback: "interviewPrepLoadFailed" });
|
|
|
|
at node_modules/react-dom/cjs/react-dom-client.development.js:18758:19
|
|
at runWithFiberInDEV (node_modules/react-dom/cjs/react-dom-client.development.js:874:13)
|
|
at warnIfUpdatesNotWrappedWithActDEV (node_modules/react-dom/cjs/react-dom-client.development.js:18757:9)
|
|
at scheduleUpdateOnFiber (node_modules/react-dom/cjs/react-dom-client.development.js:16409:11)
|
|
at dispatchSetStateInternal (node_modules/react-dom/cjs/react-dom-client.development.js:9170:13)
|
|
at dispatchSetState (node_modules/react-dom/cjs/react-dom-client.development.js:9127:7)
|
|
at setBoard (src/components/InterviewPrep.tsx:57:7)
|
|
|
|
console.error
|
|
An update to ApplicationInterviewPrep inside a test was not wrapped in act(...).
|
|
|
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
|
|
act(() => {
|
|
/* fire events that update state */
|
|
});
|
|
/* assert on the output */
|
|
|
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at
|
|
https://react.dev/link/wrap-tests-with-act
|
|
|
|
56 | try {
|
|
57 | setBoard(await interviewPrepApi.get(jobId));
|
|
> 58 | setError(null);
|
|
| ^
|
|
59 | } catch (err) {
|
|
60 | setError({ cause: err, fallback: "interviewPrepLoadFailed" });
|
|
61 | } finally {
|
|
|
|
at node_modules/react-dom/cjs/react-dom-client.development.js:18758:19
|
|
at runWithFiberInDEV (node_modules/react-dom/cjs/react-dom-client.development.js:874:13)
|
|
at warnIfUpdatesNotWrappedWithActDEV (node_modules/react-dom/cjs/react-dom-client.development.js:18757:9)
|
|
at scheduleUpdateOnFiber (node_modules/react-dom/cjs/react-dom-client.development.js:16409:11)
|
|
at dispatchSetStateInternal (node_modules/react-dom/cjs/react-dom-client.development.js:9170:13)
|
|
at dispatchSetState (node_modules/react-dom/cjs/react-dom-client.development.js:9127:7)
|
|
at setError (src/components/InterviewPrep.tsx:58:7)
|
|
|
|
console.error
|
|
An update to ApplicationInterviewPrep inside a test was not wrapped in act(...).
|
|
|
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
|
|
act(() => {
|
|
/* fire events that update state */
|
|
});
|
|
/* assert on the output */
|
|
|
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at
|
|
https://react.dev/link/wrap-tests-with-act
|
|
|
|
60 | setError({ cause: err, fallback: "interviewPrepLoadFailed" });
|
|
61 | } finally {
|
|
> 62 | setLoading(false);
|
|
| ^
|
|
63 | }
|
|
64 | }, [jobId]);
|
|
65 |
|
|
|
|
at node_modules/react-dom/cjs/react-dom-client.development.js:18758:19
|
|
at runWithFiberInDEV (node_modules/react-dom/cjs/react-dom-client.development.js:874:13)
|
|
at warnIfUpdatesNotWrappedWithActDEV (node_modules/react-dom/cjs/react-dom-client.development.js:18757:9)
|
|
at scheduleUpdateOnFiber (node_modules/react-dom/cjs/react-dom-client.development.js:16409:11)
|
|
at dispatchSetStateInternal (node_modules/react-dom/cjs/react-dom-client.development.js:9170:13)
|
|
at dispatchSetState (node_modules/react-dom/cjs/react-dom-client.development.js:9127:7)
|
|
at setLoading (src/components/InterviewPrep.tsx:62:7)
|
|
|
|
console.error
|
|
An update to InterviewAiAssistant inside a test was not wrapped in act(...).
|
|
|
|
When testing, code that causes React state updates should be wrapped into act(...):
|
|
|
|
act(() => {
|
|
/* fire events that update state */
|
|
});
|
|
/* assert on the output */
|
|
|
|
This ensures that you're testing the behavior the user would see in the browser. Learn more at
|
|
https://react.dev/link/wrap-tests-with-act
|
|
|
|
235 | .then((result) => { if (active) setCv(result); })
|
|
236 | .catch((cause) => { if (active) setCvError({ cause }); })
|
|
> 237 | .finally(() => { if (active) setCvLoading(false); });
|
|
| ^
|
|
238 | return () => { active = false; };
|
|
239 | }, [jobId, cvReadAttempt]);
|
|
240 |
|
|
|
|
at node_modules/react-dom/cjs/react-dom-client.development.js:18758:19
|
|
at runWithFiberInDEV (node_modules/react-dom/cjs/react-dom-client.development.js:874:13)
|
|
at warnIfUpdatesNotWrappedWithActDEV (node_modules/react-dom/cjs/react-dom-client.development.js:18757:9)
|
|
at scheduleUpdateOnFiber (node_modules/react-dom/cjs/react-dom-client.development.js:16409:11)
|
|
at dispatchSetStateInternal (node_modules/react-dom/cjs/react-dom-client.development.js:9170:13)
|
|
at dispatchSetState (node_modules/react-dom/cjs/react-dom-client.development.js:9127:7)
|
|
at setCvLoading (src/components/InterviewPrep.tsx:237:36)
|
|
|
|
FAIL src/interview-prep.test.tsx (6.032 s)
|
|
● late generation cannot offer another application the previous application suggestion
|
|
|
|
expect(element).not.toBeInTheDocument()
|
|
|
|
expected document not to contain element, found <p class="MuiTypography-root MuiTypography-body2
|
|
css-1jpc1n5-MuiTypography-root">Only for application seven</p> instead
|
|
|
|
356 | await act(async () => finish({ data: { result: { text: 'Only for application seven' } } }));
|
|
357 | const assistant = within(screen.getByRole('region', { name: translations.en.interviewAiTitle }));
|
|
> 358 | expect(assistant.queryByText('Only for application seven')).not.toBeInTheDocument();
|
|
| ^
|
|
359 | expect(assistant.queryByRole('button', { name: translations.en.interviewAiAddToPrep
|
|
})).not.toBeInTheDocument();
|
|
360 | expect(assistant.getByLabelText(translations.en.coverAiAdditionalInstructions)).toHaveValue('');
|
|
361 | expect(mockedApi.post).toHaveBeenCalledTimes(1);
|
|
|
|
at Object.toBeInTheDocument (src/interview-prep.test.tsx:358:67)
|
|
|
|
● completed AI suggestion is scoped to its application instead of becoming a new application draft
|
|
|
|
expect(element).not.toBeInTheDocument()
|
|
|
|
expected document not to contain element, found <p class="MuiTypography-root MuiTypography-body2
|
|
css-1jpc1n5-MuiTypography-root">Prepared for application seven only</p> instead
|
|
|
|
371 | view.rerender(<I18nProvider><ConfirmProvider><ApplicationInterviewPrep jobId={8}
|
|
/></ConfirmProvider></I18nProvider>);
|
|
372 | const assistant = within(screen.getByRole('region', { name: translations.en.interviewAiTitle }));
|
|
> 373 | expect(assistant.queryByText('Prepared for application seven only')).not.toBeInTheDocument();
|
|
| ^
|
|
374 | expect(assistant.queryByRole('button', { name: translations.en.interviewAiAddToPrep
|
|
})).not.toBeInTheDocument();
|
|
375 | expect(mockedApi.post).not.toHaveBeenCalledWith('/jobapplications/8/interview-prep', expect.anything());
|
|
376 | });
|
|
|
|
at Object.toBeInTheDocument (src/interview-prep.test.tsx:373:76)
|
|
|
|
● late accepted suggestion does not reload the previous application board into the current application
|
|
|
|
expect(received).toHaveLength(expected)
|
|
|
|
Expected length: 1
|
|
Received length: 2
|
|
Received array: [["/jobapplications/7/interview-prep"], ["/jobapplications/7/interview-prep"]]
|
|
|
|
389 | await waitFor(() => expect(mockedApi.get).toHaveBeenCalledWith('/jobapplications/8/interview-prep'));
|
|
390 | await act(async () => finish({ data: board.groups[0].items[0] }));
|
|
> 391 | expect(mockedApi.get.mock.calls.filter(([url]) => url ===
|
|
'/jobapplications/7/interview-prep')).toHaveLength(1);
|
|
| ^
|
|
392 | expect(mockedApi.get.mock.calls.filter(([url]) => url ===
|
|
'/jobapplications/8/interview-prep')).toHaveLength(1);
|
|
393 | expect(mockedApi.post.mock.calls[1]).toEqual(['/jobapplications/7/interview-prep',
|
|
expect.objectContaining({ source: 'ai', content: 'Application seven suggestion' })]);
|
|
394 | });
|
|
|
|
at Object.toHaveLength (src/interview-prep.test.tsx:391:99)
|
|
|
|
Test Suites: 1 failed, 1 total
|
|
Tests: 3 failed, 48 skipped, 51 total
|
|
Snapshots: 0 total
|
|
Time: 7.657 s, estimated 24 s
|
|
Ran all test suites within paths "src/interview-prep.test.tsx".
|
|
Test results written to: ..\..\interview-ai-context-red.json
|