[test][page-templates] Cover duplicatePage pageEmbed remap + template reference sync #32

Closed
opened 2026-06-20 20:35:47 +03:00 by Ghost · 0 comments

From review of #17 (merged to develop).

Untested high-risk logic:

  • apps/server/src/core/page/services/page.service.ts duplicatePage: remap of pageEmbed.sourcePageId (remap to the copy when the source is in the copied set, otherwise keep the original). A bug here silently breaks template duplication.
  • apps/server/src/core/page/transclusion/transclusion.service.ts syncPageTemplateReferences: the toDelete branch (removing stale references when the host page is edited) is not covered.
  • insertTemplateReferencesForPages multi-workspace grouping/filtering branch is not covered.

Add jest coverage mirroring the existing transclusion specs.

Severity: medium.

From review of #17 (merged to develop). Untested high-risk logic: - `apps/server/src/core/page/services/page.service.ts` `duplicatePage`: remap of `pageEmbed.sourcePageId` (remap to the copy when the source is in the copied set, otherwise keep the original). A bug here silently breaks template duplication. - `apps/server/src/core/page/transclusion/transclusion.service.ts` `syncPageTemplateReferences`: the `toDelete` branch (removing stale references when the host page is edited) is not covered. - `insertTemplateReferencesForPages` multi-workspace grouping/filtering branch is not covered. Add jest coverage mirroring the existing transclusion specs. Severity: medium.
Ghost closed this issue 2026-06-21 02:05:28 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vvzvlad/gitmost#32