Fix CI test failures from PR #26 + webpack-stats test gap - #27
Merged
Conversation
- 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
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CI on
mainbroke after #26 merged (run 28882770577). 3 suites failed:edge-src/web/RecordPages.test.js— new "Read next strip" tests calledcreateBlogArticle/createPhoto/createPodcastEpisodehelpers that were never defined (ReferenceError).edge-src/models/AggregationResolver.test.js— useditemRepo.update(id, {title})directly;titlelives in the item'sdatablob, not a rawitemscolumn, so sqlite threwno such column: title. Fixed by usingcontentService.update(...)(which merges into the blob correctly). Also fixed duplicateitem_relationsrows 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 hydratedrelated_itemspayload. 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 jestmoduleNameMapperstub for it.Test plan
yarn test— 69/69 suites, 412/412 tests pass locally