Skip to content

Fix CI test failures from PR #26 + webpack-stats test gap - #27

Merged
kiran-brahma merged 1 commit into
mainfrom
fix/recordpages-missing-helpers
Jul 7, 2026
Merged

Fix CI test failures from PR #26 + webpack-stats test gap#27
kiran-brahma merged 1 commit into
mainfrom
fix/recordpages-missing-helpers

Conversation

@kiran-brahma

Copy link
Copy Markdown
Owner

Summary

CI on main broke after #26 merged (run 28882770577). 3 suites failed:

  • edge-src/web/RecordPages.test.js — new "Read next strip" tests called createBlogArticle/createPhoto/createPodcastEpisode helpers that were never defined (ReferenceError).
  • edge-src/models/AggregationResolver.test.js — used itemRepo.update(id, {title}) directly; title lives in the item's data blob, not a raw items column, so sqlite threw no such column: title. Fixed by using contentService.update(...) (which merges into the blob correctly). Also fixed duplicate item_relations rows sharing (parent_item_id, rel_type, position), which violated the unique constraint once the first bug was fixed.
  • functions/admin/items/[itemId]/index.test.js — asserted the SSR HTML contains the literal label text "Related items", but the admin editor mounts client-side after hydration, so widget labels never appear in the SSR shell. Replaced with an assertion on the actual hydrated related_items payload. This test additionally never ran at all in CI because it transitively requires a gitignored webpack build artifact (functions/webpack-stats.json) that no CI step ever generates — added a jest moduleNameMapper stub for it.

Test plan

  • yarn test — 69/69 suites, 412/412 tests pass locally

- RecordPages.test.js: define createBlogArticle/createPhoto/createPodcastEpisode
  helpers used by the new "Read next strip" tests but never added
- AggregationResolver.test.js: use contentService.update (not itemRepo.update)
  to change title, since title lives in the data blob not a raw column; fix
  duplicate item_relations positions that violated the unique constraint
- admin items index.test.js: the admin editor mounts client-side after
  hydration, so the SSR shell never contains widget label text; assert on the
  hydrated related_items payload instead
- jest.config.js: mock functions/webpack-stats.json (a gitignored webpack
  build artifact never produced by yarn test) so tests importing HtmlHeader
  can run without a prior build step
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@kiran-brahma
kiran-brahma merged commit 5e4372b into main Jul 7, 2026
1 check 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