Aman-Mittal opened a new pull request, #859:
URL: https://github.com/apache/fineract-backoffice-ui/pull/859

   `main` is red — `E2E (mocked backend, shard 1/4)` fails on `7d77a83a` — and 
nothing merged into it caused that. The test rotted on the calendar flip to 
November.
   
   ## What breaks
   
   `client-family-member-create.spec.ts` mocks a tenant business date of 
`2026-10-15` and then names calendar cells:
   
   ```ts
   await expect(picker.getByRole('button', { name: /Friday, October 16/ 
})).toBeDisabled();
   await picker.getByRole('button', { name: /Thursday, October 15/ }).click();
   ```
   
   `max` comes from the platform, but the calendar renders the **browser's** 
month. Through October those cells existed and the test passed every day. On 1 
November the picker began opening on November, the October cells stopped 
existing, and the assertion failed with `element(s) not found` — which is 
exactly the failure in CI:
   
   ```
   Locator: getByTestId('family-dob-picker').getByRole('button', { name: 
/Friday, October 16/ })
   Expected: disabled
   Error: element(s) not found
   ```
   
   Nothing about `max` was ever wrong: it still reads `2026-10-15`, and the 
assertion on it passes.
   
   ## The fix
   
   Pin the browser clock before the app loads. `setFixedTime` rather than 
`install`, for the reason already recorded in 
`tenant-date-defaults-backend.spec.ts` — it changes what `new Date()` answers 
without replacing the timer queue Angular and Ionic both run on.
   
   The pinned day is deliberately **2026-10-20**: a different and later day 
than the business date, so the point of the test survives. If the form ever 
took its ceiling from the browser rather than the platform, `max` would read 
`2026-10-20` and the existing assertion would catch it. Pinning to the business 
date itself would have made the two indistinguishable and quietly weakened the 
test.
   
   ## Scope
   
   Two other specs name April cells (`client-family-date-of-birth`, 
`loan-optional-repayment-date`) and need no pin: their pickers open on a 
**loaded value** (30 April 1980), not on today, so no month boundary can move 
them. I checked those rather than assume.
   
   Verified locally: both tests in the file pass, and the pinned clock also 
drops the test from 18.7s to 5.4s. The whole of shard 1 reproduced the failure 
on `main` before the change, which is how it was found — the job log itself is 
not readable without admin rights.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to