Repository navigation
Commit efb2676
committed
test(social): build the face-title fixtures from local parts, not UTC
Fixes #3106
Owner: Dev-1
Written-by: Dev-1
Bot: FlyBot Dev-1
Tier: T1 (test-only, `plugins/social/test/**`; no product code)
Docs-not-needed: test-only; only how the fixture instant is built changed, and the title behaviour it pins is untouched.
`plugins/social/test/face-rooms.test.js` wrote its fixture instants in UTC
(`2026-10-17T14:38:00.000Z`) and then asserted the rendered title as
`Oct 17 14:38`. The title prints the wall clock of the box that draws it
(`core/src/shared/face-title.js` `formatFaceWhen` reads `getHours()` /
`getMinutes()` / `getMonth()` / `getDate()`), so that pair only agrees on a
UTC box: `TZ=Asia/Shanghai` renders `Oct 17 22:38` and `TZ=America/New_York`
renders `Oct 17 10:38`, and the file is red there. Nothing is wrong with the
product — the test pinned a local rendering to a UTC expectation.
The fixtures are now built from the same local parts the title prints, so the
expectation holds everywhere while still asserting the same thing: the title
carries the exact minute (`Oct 17 14:38`) and the owners in handle order. A
`localIso(year, month, day, hour, minute)` helper does the conversion, used
by the human-envelope fixture and by the `#194` case (`12:56` is still the
deadline minus the ten-minute window). No assertion was relaxed, skipped or
turned into a regex; the two-different-starts `notEqual` and the
`isGenericFaceTitle` branch are unchanged, so the case cannot pass vacuously.
Verified: `TZ=UTC`, `TZ=Asia/Shanghai`, `TZ=Europe/Berlin` — 38/38 green,
twice each.1 parent fc32c5f commit efb2676
1 file changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
| |||
247 | 253 | | |
248 | 254 | | |
249 | 255 | | |
250 | | - | |
| 256 | + | |
251 | 257 | | |
252 | 258 | | |
253 | 259 | | |
| |||
643 | 649 | | |
644 | 650 | | |
645 | 651 | | |
646 | | - | |
647 | | - | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
648 | 656 | | |
649 | 657 | | |
650 | | - | |
651 | | - | |
| 658 | + | |
| 659 | + | |
652 | 660 | | |
653 | 661 | | |
654 | 662 | | |
| |||
0 commit comments