mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-28 18:20:42 +00:00
* test(task-repeat-cfg): add regression tests for startDate→today no-live-instance (#7923) Unit test: exercises _getActionsForTaskRepeatCfg directly in the post-re-anchor state (startDate=today, lastTaskCreationDay=yesterday, no live instances), confirming the service-level creation path works. E2e test: full reproduction of the #7923 repro steps — future startDate, delete the live instance, change startDate to today via a transparent projection — and asserts that a real task appears in the Today view (not a transparent projection). * fix(task-repeat-cfg): create real instance when startDate moved to today with no live instance (#7923) Two fixes for the scenario: delete a recurring task's live instance, then move startDate to today via a transparent projection. 1. add-tasks-for-tomorrow.service.ts: yield to the event loop (setTimeout 0) before reading the store in addAllDueToday(). The re-anchor dispatch from rescheduleTaskOnRepeatCfgUpdate$ updates the NgRx store synchronously, but the store notification propagates asynchronously; the yield ensures the selector sees lastTaskCreationDay = yesterday (not the stale future date) and includes the config for today. 2. task-repeat-cfg.service.ts: when taskAlreadyExists (a concurrent addAllDueToday() call or the date-change effect already created the task), still dispatch updateTaskRepeatCfg to advance lastTaskCreationDay. Without this, the transparent planner projection lingered because lastTaskCreationDay stayed at yesterday while the real task was already visible in Today. All 65 unit tests updated and passing. E2e test passes end-to-end. * test(e2e): stabilize #7923 today-column guard against route animation The final guard matched the today column via the rendered date text (`.date` = "1/5"). During the planner route-enter animation the leaving and entering `planner-day[data-day="2026-05-01"]` columns are briefly both in the DOM, so the locator resolved to 2 elements and tripped a strict-mode violation before the projection assertion ran. Select the column by its stable `data-day` attribute and assert the projection count across every matching column, which is correct regardless of how many copies the animation leaves behind. Also fix the inaccurate "Wednesday" date comment (May 1 2026 is a Friday; the repeat is DAILY so the weekday is irrelevant). --------- Co-authored-by: Johannes Millan <johannes.millan@gmail.com> |
||
|---|---|---|
| .. | ||
| add-task-bar | ||
| app-features | ||
| autocomplete | ||
| boards | ||
| break | ||
| calendar | ||
| daily-summary | ||
| focus-mode | ||
| import-export | ||
| issue-provider-panel | ||
| keyboard | ||
| menu | ||
| migration | ||
| navigation | ||
| notes | ||
| performance | ||
| planner | ||
| plugins | ||
| project | ||
| recurring | ||
| reminders | ||
| schedule | ||
| search | ||
| settings | ||
| short-syntax | ||
| simple-counter | ||
| sync | ||
| tags | ||
| task-basic | ||
| task-detail | ||
| task-dragdrop | ||
| task-list-basic | ||
| work-view | ||
| workflow | ||
| worklog | ||
| all-basic-routes-without-error.spec.ts | ||