Skip to content

E2E: the goal grids test holds on every day of the week and month - #327

Merged
bndct-devops merged 1 commit into
mainfrom
fix/e2e-goal-grids-any-day
Nov 22, 2026
Merged

bndct-devops merged 1 commit into
mainfrom
fix/e2e-goal-grids-any-day

Conversation

@bndct-devops

Copy link
Copy Markdown
Owner

The "Goal grids" browser test (desktop and phone) builds eight made-up goals around the server's today and then expected a fixed list of cards on Home. Which of those goals count as behind depends on the day of the week and of the month, so the expected list was only right on some days: it failed on the release PR #326 on a Sunday, where "Minutes a week" is behind too.

The test now compares Home's cards with homePick, the rule Home uses (unit-tested in tests/goalsModel.test.ts), for the same goals and the same day.

E2E_GOALS_TODAY=YYYY-MM-DD builds the mocked answer around another day, to try a weekday or a month end locally.

Tested

  • stats-goals.spec.ts with the mocked goals set to today (a Sunday), two Mondays, a Wednesday, a Thursday and a month-end Saturday: 23 passed each
  • stats-goals.spec.ts and goal-entry.spec.ts on today's date: 38 passed

Test code only.

@bndct-devops
bndct-devops merged commit 85fd5d9 into main Nov 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant