FAIL src/interview-prep.test.tsx (11.153 s)
  ● follow-up language switch from en preserves the unsaved date and next action without a read

    expect(element).toHaveValue(2026-12-01)

    Expected the element to have value:
      2026-12-01
    Received:
      2026-07-26

      307 |   fireEvent.change(screen.getByLabelText(translations[from].workspaceNextAction), { target: { value: 'Discuss the offer Øresund' } });
      308 |   await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
    > 309 |   expect(screen.getByLabelText(translations[to].interviewFollowUpDate)).toHaveValue('2026-12-01');
          |                                                                         ^
      310 |   expect(screen.getByLabelText(translations[to].workspaceNextAction)).toHaveValue('Discuss the offer Øresund');
      311 |   expect(mockedApi.get).toHaveBeenCalledTimes(1);
      312 |   expect(mockedApi.put).not.toHaveBeenCalled();

      at toHaveValue (src/interview-prep.test.tsx:309:73)

  ● follow-up language switch from nb preserves the unsaved date and next action without a read

    expect(element).toHaveValue(2026-12-01)

    Expected the element to have value:
      2026-12-01
    Received:
      2026-07-26

      307 |   fireEvent.change(screen.getByLabelText(translations[from].workspaceNextAction), { target: { value: 'Discuss the offer Øresund' } });
      308 |   await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
    > 309 |   expect(screen.getByLabelText(translations[to].interviewFollowUpDate)).toHaveValue('2026-12-01');
          |                                                                         ^
      310 |   expect(screen.getByLabelText(translations[to].workspaceNextAction)).toHaveValue('Discuss the offer Øresund');
      311 |   expect(mockedApi.get).toHaveBeenCalledTimes(1);
      312 |   expect(mockedApi.put).not.toHaveBeenCalled();

      at toHaveValue (src/interview-prep.test.tsx:309:73)

  ● follow-up en read error stays current without another read

    expect(jest.fn()).toHaveBeenCalledTimes(expected)

    Expected number of calls: 1
    Received number of calls: 2

      333 |     await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
      334 |     expect(await screen.findByText(translations[to][key])).toBeVisible();
    > 335 |     expect(mockedApi.get).toHaveBeenCalledTimes(1);
          |                           ^
      336 |     expect(mockedApi.put).toHaveBeenCalledTimes(operation === 'save' ? 1 : 0);
      337 |   } finally { mockedApi.put.mockReset(); }
      338 | });

      at toHaveBeenCalledTimes (src/interview-prep.test.tsx:335:27)

  ● follow-up en save error stays current without another read

    Unable to find an element with the text: Kunne ikke lagre oppfølgingen.. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

    Ignored nodes: comments, script, style
    <body>
      <div>
        <section
          aria-labelledby="_r_q_"
          class="MuiBox-root css-rw0fp9"
        >
          <header
            class="MuiBox-root css-163u82n"
          >
            <div
              class="MuiBox-root css-14m33b5"
            >
              <h3
                class="MuiTypography-root MuiTypography-sectionTitle css-uf4832-MuiTypography-root"
                id="_r_q_"
              >
                Oppfølging
              </h3>
              <p
                class="MuiTypography-root MuiTypography-pageDescription css-1sqgc3a-MuiTypography-root"
              >
                Bruker samme dato som påminnelser. Oppfølgingsoppgaver forblir i søknadssjekklisten.
              </p>
            </div>
          </header>
          <div
            class="MuiBox-root css-31l7gp"
          >
            <span
              aria-atomic="true"
              aria-live="polite"
              class="MuiBox-root css-ty8jgw"
              role="status"
            >
              Innhold lastet.
            </span>
            <div
              class="MuiStack-root css-1sazv7p-MuiStack-root"
            >
              <div
                class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorInfo MuiAlert-standardInfo MuiAlert-standard css-27wu85-MuiPaper-root-MuiAlert-root"
                role="alert"
                style="--Paper-shadow: none;"
              >
                <div
                  class="MuiAlert-icon css-1wrdnka-MuiAlert-icon"
                >
                  <svg
                    aria-hidden="true"
                    class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1ckov0h-MuiSvgIcon-root"
                    data-testid="InfoOutlinedIcon"
                    focusable="false"
                    viewBox="0 0 24 24"
                  >
                    <path
                      d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"
                    />
                  </svg>
                </div>
                <div
                  class="MuiAlert-message css-zioonp-MuiAlert-message"
                >
                  1 åpen oppfølgingsoppgave i sjekklisten.
                </div>
              </div>
              <div
                class="MuiStack-root css-1waaizo-MuiStack-root"
              >
                <div
                  class="MuiFormControl-root MuiTextField-root css-1xp5r68-MuiFormControl-root-MuiTextField-root"
                >
                  <label
                    class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined MuiFormLabel-colorPrimary MuiFormLabel-filled MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined css-fluw5i-MuiFormLabel-root-MuiInputLabel-root"
                    data-shrink="true"
                    for="_r_v_"
                    id="_r_v_-label"
                  >
                    Følg opp den
                  </label>
                  <div
                    class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-formControl MuiInputBase-sizeSmall css-1tft0rd-MuiInputBase-root-MuiOutlinedInput-root"
                  >
                    <input
                      aria-invalid="false"
                      class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall css-111x7or-MuiInputBase-input-MuiOutlinedInput-input"
                      id="_r_v_"
                      type="date"
                      value="2026-07-26"
                    />
                    <fieldset
                      aria-hidden="true"
                      class="MuiOutlinedInput-notchedOutline css-18p5xg2-MuiNotchedOutlined-root-MuiOutlinedInput-notchedOutline"
                    >
                      <legend
                        class="css-ex8a5f-MuiNotchedOutlined-root"
                      >
                        <span>
                          Følg opp den
                        </span>
                      </legend>
                    </fieldset>
                  </div>
                </div>
                <div
                  class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-cmpglg-MuiFormControl-root-MuiTextField-root"
                >
                  <label
                    class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined MuiFormLabel-colorPrimary MuiFormLabel-filled MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined css-fluw5i-MuiFormLabel-root-MuiInputLabel-root"
                    data-shrink="true"
                    for="_r_10_"
                    id="_r_10_-label"
                  >
                    Neste anbefalte handling
                  </label>
                  <div
                    class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-sizeSmall css-1iqcefa-MuiInputBase-root-MuiOutlinedInput-root"
                  >
                    <input
                      aria-invalid="false"
                      class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall css-111x7or-MuiInputBase-input-MuiOutlinedInput-input"
                      id="_r_10_"
                      type="text"
                      value="Chase recruiter"
                    />
                    <fieldset
                      aria-hidden="true"
                      class="MuiOutlinedInput-notchedOutline css-18p5xg2-MuiNotchedOutlined-root-MuiOutlinedInput-notchedOutline"
                    >
                      <legend
                        class="css-ex8a5f-MuiNotchedOutlined-root"
                      >
                        <span>
                          Neste anbefalte handling
                        </span>
                      </legend>
                    </fieldset>
                  </div>
                </div>
                <button
                  class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary css-83fk99-MuiButtonBase-root-MuiButton-root"
                  tabindex="0"
                  type="button"
                >
                  Lagre
                </button>
              </div>
            </div>
          </div>
        </section>
      </div>
    </body>

      332 |     expect(await screen.findByText(translations[from][key])).toBeVisible();
      333 |     await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
    > 334 |     expect(await screen.findByText(translations[to][key])).toBeVisible();
          |                         ^
      335 |     expect(mockedApi.get).toHaveBeenCalledTimes(1);
      336 |     expect(mockedApi.put).toHaveBeenCalledTimes(operation === 'save' ? 1 : 0);
      337 |   } finally { mockedApi.put.mockReset(); }

      at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:163:27)
      at node_modules/@testing-library/dom/dist/query-helpers.js:86:33
      at findByText (src/interview-prep.test.tsx:334:25)

  ● follow-up nb read error stays current without another read

    expect(jest.fn()).toHaveBeenCalledTimes(expected)

    Expected number of calls: 1
    Received number of calls: 2

      333 |     await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
      334 |     expect(await screen.findByText(translations[to][key])).toBeVisible();
    > 335 |     expect(mockedApi.get).toHaveBeenCalledTimes(1);
          |                           ^
      336 |     expect(mockedApi.put).toHaveBeenCalledTimes(operation === 'save' ? 1 : 0);
      337 |   } finally { mockedApi.put.mockReset(); }
      338 | });

      at toHaveBeenCalledTimes (src/interview-prep.test.tsx:335:27)

  ● follow-up nb save error stays current without another read

    Unable to find an element with the text: Could not save the follow-up.. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

    Ignored nodes: comments, script, style
    <body>
      <div>
        <section
          aria-labelledby="_r_18_"
          class="MuiBox-root css-rw0fp9"
        >
          <header
            class="MuiBox-root css-163u82n"
          >
            <div
              class="MuiBox-root css-14m33b5"
            >
              <h3
                class="MuiTypography-root MuiTypography-sectionTitle css-uf4832-MuiTypography-root"
                id="_r_18_"
              >
                Follow-up
              </h3>
              <p
                class="MuiTypography-root MuiTypography-pageDescription css-1sqgc3a-MuiTypography-root"
              >
                Uses the same date as reminders. Follow-up tasks remain in the application checklist.
              </p>
            </div>
          </header>
          <div
            class="MuiBox-root css-31l7gp"
          >
            <span
              aria-atomic="true"
              aria-live="polite"
              class="MuiBox-root css-ty8jgw"
              role="status"
            >
              Content loaded.
            </span>
            <div
              class="MuiStack-root css-1sazv7p-MuiStack-root"
            >
              <div
                class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 MuiAlert-root MuiAlert-colorInfo MuiAlert-standardInfo MuiAlert-standard css-27wu85-MuiPaper-root-MuiAlert-root"
                role="alert"
                style="--Paper-shadow: none;"
              >
                <div
                  class="MuiAlert-icon css-1wrdnka-MuiAlert-icon"
                >
                  <svg
                    aria-hidden="true"
                    class="MuiSvgIcon-root MuiSvgIcon-fontSizeInherit css-1ckov0h-MuiSvgIcon-root"
                    data-testid="InfoOutlinedIcon"
                    focusable="false"
                    viewBox="0 0 24 24"
                  >
                    <path
                      d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"
                    />
                  </svg>
                </div>
                <div
                  class="MuiAlert-message css-zioonp-MuiAlert-message"
                >
                  1 open follow-up task on the checklist.
                </div>
              </div>
              <div
                class="MuiStack-root css-1waaizo-MuiStack-root"
              >
                <div
                  class="MuiFormControl-root MuiTextField-root css-1xp5r68-MuiFormControl-root-MuiTextField-root"
                >
                  <label
                    class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined MuiFormLabel-colorPrimary MuiFormLabel-filled MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined css-fluw5i-MuiFormLabel-root-MuiInputLabel-root"
                    data-shrink="true"
                    for="_r_1d_"
                    id="_r_1d_-label"
                  >
                    Follow up on
                  </label>
                  <div
                    class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-formControl MuiInputBase-sizeSmall css-1tft0rd-MuiInputBase-root-MuiOutlinedInput-root"
                  >
                    <input
                      aria-invalid="false"
                      class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall css-111x7or-MuiInputBase-input-MuiOutlinedInput-input"
                      id="_r_1d_"
                      type="date"
                      value="2026-07-26"
                    />
                    <fieldset
                      aria-hidden="true"
                      class="MuiOutlinedInput-notchedOutline css-18p5xg2-MuiNotchedOutlined-root-MuiOutlinedInput-notchedOutline"
                    >
                      <legend
                        class="css-ex8a5f-MuiNotchedOutlined-root"
                      >
                        <span>
                          Follow up on
                        </span>
                      </legend>
                    </fieldset>
                  </div>
                </div>
                <div
                  class="MuiFormControl-root MuiFormControl-fullWidth MuiTextField-root css-cmpglg-MuiFormControl-root-MuiTextField-root"
                >
                  <label
                    class="MuiFormLabel-root MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined MuiFormLabel-colorPrimary MuiFormLabel-filled MuiInputLabel-root MuiInputLabel-formControl MuiInputLabel-animated MuiInputLabel-shrink MuiInputLabel-sizeSmall MuiInputLabel-outlined css-fluw5i-MuiFormLabel-root-MuiInputLabel-root"
                    data-shrink="true"
                    for="_r_1e_"
                    id="_r_1e_-label"
                  >
                    Next recommended action
                  </label>
                  <div
                    class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-fullWidth MuiInputBase-formControl MuiInputBase-sizeSmall css-1iqcefa-MuiInputBase-root-MuiOutlinedInput-root"
                  >
                    <input
                      aria-invalid="false"
                      class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall css-111x7or-MuiInputBase-input-MuiOutlinedInput-input"
                      id="_r_1e_"
                      type="text"
                      value="Chase recruiter"
                    />
                    <fieldset
                      aria-hidden="true"
                      class="MuiOutlinedInput-notchedOutline css-18p5xg2-MuiNotchedOutlined-root-MuiOutlinedInput-notchedOutline"
                    >
                      <legend
                        class="css-ex8a5f-MuiNotchedOutlined-root"
                      >
                        <span>
                          Next recommended action
                        </span>
                      </legend>
                    </fieldset>
                  </div>
                </div>
                <button
                  class="MuiButtonBase-root MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButton-colorPrimary css-83fk99-MuiButtonBase-root-MuiButton-root"
                  tabindex="0"
                  type="button"
                >
                  Save
                </button>
              </div>
            </div>
          </div>
        </section>
      </div>
    </body>

      332 |     expect(await screen.findByText(translations[from][key])).toBeVisible();
      333 |     await act(async () => window.dispatchEvent(new StorageEvent('storage', { key: 'uiLanguage', newValue: to })));
    > 334 |     expect(await screen.findByText(translations[to][key])).toBeVisible();
          |                         ^
      335 |     expect(mockedApi.get).toHaveBeenCalledTimes(1);
      336 |     expect(mockedApi.put).toHaveBeenCalledTimes(operation === 'save' ? 1 : 0);
      337 |   } finally { mockedApi.put.mockReset(); }

      at waitForWrapper (node_modules/@testing-library/dom/dist/wait-for.js:163:27)
      at node_modules/@testing-library/dom/dist/query-helpers.js:86:33
      at findByText (src/interview-prep.test.tsx:334:25)

Test Suites: 1 failed, 1 total
Tests:       6 failed, 26 skipped, 32 total
Snapshots:   0 total
Time:        11.962 s
Ran all test suites matching src/interview-prep.test.tsx with tests matching "follow-up language switch from|follow-up en .*error|follow-up nb .*error".
Test results written to: E:\Storage\Projects\Active\temp docs\jobjakt-local-build\followup-language-red.json
