fix(i18n): initialize new applications on local today
This commit is contained in:
@@ -31,3 +31,13 @@ Actual MUI browser interaction, screenshots, native devices and provider/API ser
|
||||
The Jobs table similarly formats a literal deadline through local `Date`, and its current test expects that expression. Edit's retained `toDateInputValue` can also move an unspecified midnight timestamp back a day in positive zones. These are separate legacy precision/loading findings. This fix does not claim their closure or reconstruct missing timezone metadata.
|
||||
|
||||
Rollback reverts the two wrapper changes and their regression package. Existing persisted dates are not rewritten.
|
||||
|
||||
## Follow-up local-today default
|
||||
|
||||
From isolated checkpoint `f7c3617e`, Add's `getTodayIso` still selected the UTC date for initialization and a successful form reset. It now uses the already imported `format` with the browser's local Date. No persisted record is rewritten.
|
||||
|
||||
Two new component cases fix the UTC clock at `2026-11-23T00:30:00Z` and `2026-11-23T23:30:00Z`. Each timezone's red run had one failure and one pass, with the earlier five cases skipped. The final full suite passed seven cases in each of Los Angeles, Oslo and Kiritimati. That is seven distinct cases repeated in three environments, including the five earlier picker cases. TypeScript and two-file lint passed. The earlier 21-case nearby run belongs to the preceding checkpoint and was not rerun for this one-line follow-up.
|
||||
|
||||
The new cases cover initial creation, Create and add another resetting the default, and closing/reopening the resulting draft. Closing and reopening the same mounted dialog preserves its existing step and draft. It does not reset every open. The initial test draft assumed otherwise and was corrected to exercise the actual successful reset path. The only write is the explicit mocked creation request, whose selected date is asserted. API server, actual browser, export build and native checks remain unexecuted.
|
||||
|
||||
Follow-up receipts are in `evidence/date-picker-local-today/`. The legacy loading and Companies contract findings above remain open.
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
> job-tracker-ui@0.1.0 test
|
||||
> jest --runInBand job-date-picker-calendar.test.tsx
|
||||
|
||||
Test Suites: 1 passed, 1 total
|
||||
Tests: 7 passed, 7 total
|
||||
Snapshots: 0 total
|
||||
Time: 8.432 s
|
||||
Ran all test suites matching job-date-picker-calendar.test.tsx.
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
> job-tracker-ui@0.1.0 test
|
||||
> jest --runInBand job-date-picker-calendar.test.tsx
|
||||
|
||||
Test Suites: 1 passed, 1 total
|
||||
Tests: 7 passed, 7 total
|
||||
Snapshots: 0 total
|
||||
Time: 8.287 s
|
||||
Ran all test suites matching job-date-picker-calendar.test.tsx.
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
> job-tracker-ui@0.1.0 test
|
||||
> jest --runInBand job-date-picker-calendar.test.tsx
|
||||
|
||||
Test Suites: 1 passed, 1 total
|
||||
Tests: 7 passed, 7 total
|
||||
Snapshots: 0 total
|
||||
Time: 8.955 s
|
||||
Ran all test suites matching job-date-picker-calendar.test.tsx.
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
> job-tracker-ui@0.1.0 test
|
||||
> jest --runInBand job-date-picker-calendar.test.tsx -t Add defaults and successful reset
|
||||
|
||||
FAIL src/job-date-picker-calendar.test.tsx
|
||||
● Add defaults and successful reset use local today at 2026-11-23T00:30:00Z
|
||||
|
||||
expect(element).toHaveTextContent()
|
||||
|
||||
Expected element to have text content:
|
||||
2026-11-22
|
||||
Received:
|
||||
2026-11-23
|
||||
|
||||
43 | const view = render(form(true));
|
||||
44 | fireEvent.click(screen.getByRole("button", { name: translations.en.addJobModalEnterManually }));
|
||||
> 45 | expect(screen.getByLabelText(translations.en.addJobModalDateApplied)).toHaveTextContent(expected);
|
||||
| ^
|
||||
46 | fireEvent.click(screen.getByRole("button", { name: `${translations.en.addJobModalDateApplied} choose` }));
|
||||
47 | fireEvent.change(screen.getByRole("combobox", { name: translations.en.company }), { target: { value: "Synthetic school" } });
|
||||
48 | fireEvent.change(screen.getByLabelText(translations.en.addJobModalJobTitle), { target: { value: "Teacher" } });
|
||||
|
||||
at toHaveTextContent (src/job-date-picker-calendar.test.tsx:45:73)
|
||||
|
||||
Test Suites: 1 failed, 1 total
|
||||
Tests: 1 failed, 5 skipped, 1 passed, 7 total
|
||||
Snapshots: 0 total
|
||||
Time: 4.694 s
|
||||
Ran all test suites matching job-date-picker-calendar.test.tsx with tests matching "Add defaults and successful reset".
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
> job-tracker-ui@0.1.0 test
|
||||
> jest --runInBand job-date-picker-calendar.test.tsx -t Add defaults and successful reset
|
||||
|
||||
FAIL src/job-date-picker-calendar.test.tsx
|
||||
● Add defaults and successful reset use local today at 2026-11-23T23:30:00Z
|
||||
|
||||
expect(element).toHaveTextContent()
|
||||
|
||||
Expected element to have text content:
|
||||
2026-11-24
|
||||
Received:
|
||||
2026-11-23
|
||||
|
||||
43 | const view = render(form(true));
|
||||
44 | fireEvent.click(screen.getByRole("button", { name: translations.en.addJobModalEnterManually }));
|
||||
> 45 | expect(screen.getByLabelText(translations.en.addJobModalDateApplied)).toHaveTextContent(expected);
|
||||
| ^
|
||||
46 | fireEvent.click(screen.getByRole("button", { name: `${translations.en.addJobModalDateApplied} choose` }));
|
||||
47 | fireEvent.change(screen.getByRole("combobox", { name: translations.en.company }), { target: { value: "Synthetic school" } });
|
||||
48 | fireEvent.change(screen.getByLabelText(translations.en.addJobModalJobTitle), { target: { value: "Teacher" } });
|
||||
|
||||
at toHaveTextContent (src/job-date-picker-calendar.test.tsx:45:73)
|
||||
|
||||
Test Suites: 1 failed, 1 total
|
||||
Tests: 1 failed, 5 skipped, 1 passed, 7 total
|
||||
Snapshots: 0 total
|
||||
Time: 4.977 s
|
||||
Ran all test suites matching job-date-picker-calendar.test.tsx with tests matching "Add defaults and successful reset".
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
> job-tracker-ui@0.1.0 test
|
||||
> jest --runInBand job-date-picker-calendar.test.tsx -t Add defaults and successful reset
|
||||
|
||||
FAIL src/job-date-picker-calendar.test.tsx
|
||||
● Add defaults and successful reset use local today at 2026-11-23T23:30:00Z
|
||||
|
||||
expect(element).toHaveTextContent()
|
||||
|
||||
Expected element to have text content:
|
||||
2026-11-24
|
||||
Received:
|
||||
2026-11-23
|
||||
|
||||
43 | const view = render(form(true));
|
||||
44 | fireEvent.click(screen.getByRole("button", { name: translations.en.addJobModalEnterManually }));
|
||||
> 45 | expect(screen.getByLabelText(translations.en.addJobModalDateApplied)).toHaveTextContent(expected);
|
||||
| ^
|
||||
46 | fireEvent.click(screen.getByRole("button", { name: `${translations.en.addJobModalDateApplied} choose` }));
|
||||
47 | fireEvent.change(screen.getByRole("combobox", { name: translations.en.company }), { target: { value: "Synthetic school" } });
|
||||
48 | fireEvent.change(screen.getByLabelText(translations.en.addJobModalJobTitle), { target: { value: "Teacher" } });
|
||||
|
||||
at toHaveTextContent (src/job-date-picker-calendar.test.tsx:45:73)
|
||||
|
||||
Test Suites: 1 failed, 1 total
|
||||
Tests: 1 failed, 5 skipped, 1 passed, 7 total
|
||||
Snapshots: 0 total
|
||||
Time: 4.542 s
|
||||
Ran all test suites matching job-date-picker-calendar.test.tsx with tests matching "Add defaults and successful reset".
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
> job-tracker-ui@0.1.0 typecheck
|
||||
> tsc --noEmit --incremental false
|
||||
|
||||
Reference in New Issue
Block a user