Commit Graph
2 Commits
Author SHA1 Message Date
Lauri Ojansivu d8d3446cc9 Update five node-suite guards for intentional changes made earlier today.
- headerBars.test.cjs: the starred-boards count moved into the user
  model's own starredCount() (now covering swimlanes/lists/cards too,
  #1172), so the test now checks the header delegates to it instead of
  pinning the old inline boards+pages arithmetic.
- notificationEmailHtmlSafety.test.cjs: the notification subject is `let`,
  not `const` - the #2022 admin-template override reassigns it through
  the same safeEmailSubject() guard - so the regex now matches `let`. The
  guard itself was already intact at every call site.
- restCommentDeleteAcl.test.cjs / restSecurityAdvisories.test.cjs: a
  comment-edit PUT route was added (with the correct
  Authentication.checkBoardAccess + assertCanMutateComment(req.userId, ...)
  pair, same as DELETE). restCommentDeleteAcl's negative test previously
  banned any PUT outright; it now asserts the PUT carries the same ACL
  instead. restSecurityAdvisories' commentCreate route slice ended at the
  DELETE handler string, so it now silently swallowed the new PUT's
  checkBoardAccess call and failed a doesNotMatch aimed at POST; the slice
  now stops at the PUT handler, with its own assertions pinning the PUT's
  membership + object-ACL checks.
- rulesDateFieldTrigger.test.cjs: the "text contains" trigger landed
  between r-when-a-card-matches-advanced-filter and the four date
  triggers in every locale file (en.i18n.json included), so the ordered
  key list now expects it there too.

Thanks to xet7 !
2026-09-10 22:44:38 +03:00
Lauri Ojansivu 340ee1c7aa Add regression tests for the due/start/end/received date-change triggers.
Mirrors tests/rulesAssigneeTrigger.test.cjs's pattern: proves the 4
activityTypes are registered with the right matchingFields, that the
existing Cards.before.update timing-field hook is what feeds them (SET
only, never an $unset clear), that the matcher fires/doesn't fire on the
right board and doesn't cross-fire between the 4 date fields or on an
unrelated activity, that the Rules UI wires up all 4, and that every
locale file got a real (non-English) translation for the 4 new keys in
the right position.

Thanks to justinr1234 and xet7 !

Closes #2474,
2026-09-10 20:42:21 +03:00