super-productivity/e2e/pages
John Costa d2015beb44
fix(task): schedule overdue tasks for today via Shift+T and guard stale task focus (#8867)
* fix(task): schedule overdue tasks for today via Shift+T and guard stale task focus (#8851)

* fix(planner): only bind data-task-id on planner-task when focusable

The unconditional data-task-id host binding broke the e2e done-confirmation
strategy in e2e/pages/task.page.ts, which selects its wait branch based on
the attribute's presence. Boards render planner-task cards without an inner
<task> element, so the id-based wait could never resolve (#8851).

* refactor(tasks): share overdue predicate across selector and util

The rebase onto #8858 re-inlined the overdue comparison into
selectOverdueTaskIds and dropped the delegation to isTaskOverdue, so the
two overdue definitions (the overdue list vs. the Shift+T "Add to Today"
path) were duplicated and free to drift — the exact footgun #8851 set out
to avoid, and the util's JSDoc still claimed the selector delegated to it.

Extract isTaskOverdueByThreshold as the single source of truth for the
comparison and getLogicalTodayStartMs for the boundary. isTaskOverdue and
selectOverdueTaskIds both route through it, so they cannot drift. The
selector still computes the threshold once per recompute (no per-task date
parsing), preserving #8858's perf posture. No behavior change.

* test(e2e): base markTaskAsDone strategy on <task> host, not attr

planner-task now carries data-task-id in the Planner overdue list (#8851),
so keying the done-confirmation strategy off data-task-id presence would send
a wrapper down the <task> path — document.querySelectorAll('task') finds no
match and the wait hangs 10s. Key it off the element actually being a <task>
instead. No behavior change for real <task> rows; every wrapper keeps the
300ms wrapper path. Verified: worklog-basic (real task) and boards #7498
(planner-task wrapper) both pass.

---------

Co-authored-by: Johannes Millan <johannes.millan@gmail.com>
2026-07-10 12:07:19 +02:00
..
base.page.ts feat(tasks): redesign add-task-bar layout, toggles, note field & a11y (#8812) 2026-07-07 16:26:36 +02:00
dialog.page.ts Update recurrent task calendar and general calendar design (#8017) 2026-06-09 16:30:22 +02:00
import.page.ts Improve automated store screenshots 2026-05-10 00:58:01 +02:00
index.ts docs(e2e): add CLAUDE.md reference and barrel export for easier test creation 2026-01-03 13:27:24 +01:00
note.page.ts test(e2e): fix flaky tests with better waits and focus handling 2026-03-03 21:46:11 +01:00
planner.page.ts test(e2e): fix 12 flaky tests by removing networkidle waits and fixing plugin setup 2026-02-09 17:55:12 +01:00
project.page.ts feat(project): project completion experience (#8036) 2026-06-08 13:43:38 +02:00
schedule.page.ts test(webdav): add e2e tests 2025-12-29 12:48:36 +01:00
settings.page.ts test(e2e): use correct route /#/tag/TODAY/tasks instead of /#/tag/TODAY 2026-03-15 18:48:00 +01:00
side-nav.page.ts refactor: cleanup 2025-12-10 15:29:03 +01:00
supersync.page.ts refactor(ui): unify primary/secondary action button treatment across dialogs (#8706) 2026-07-02 14:42:59 +02:00
sync.page.ts test(sync): reliably dismiss setup-time E2EE dialog in webdav e2e helper (#8727) 2026-07-03 15:27:48 +02:00
tag.page.ts test(e2e): fix flaky tests with better waits and focus handling 2026-03-03 21:46:11 +01:00
task.page.ts fix(task): schedule overdue tasks for today via Shift+T and guard stale task focus (#8867) 2026-07-10 12:07:19 +02:00
work-view.page.ts feat(tasks): redesign add-task-bar layout, toggles, note field & a11y (#8812) 2026-07-07 16:26:36 +02:00