Repository navigation
test: render the landmark tests from #2026 through the current helpers - #2229
Merged
brian-smith-tcril merged 1 commit intoOct 26, 2026
Merged
Conversation
… helpers The landmark tests added in openedx#2026 were written against a base from before openedx#2110, openedx#2154 and openedx#2168. Course.test.jsx no longer defines Course or testStore, so lint fails on master; LoadedTabPage now throws without seeded course metadata, so the non-courseware landmark test failed and the courseware one passed against the error page. Course.test.jsx: render through renderCourse, like the rest of the file. LoadedTabPage.test.jsx: renderWithMetadata takes props and an options object with children, and both landmark tests render through it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brian-smith-tcril
requested review from
bradenmacdonald and
jacobo-dominguez-wgu
October 26, 2026 22:22
bradenmacdonald
approved these changes
Oct 26, 2026
bradenmacdonald
left a comment
Contributor
There was a problem hiding this comment.
Looks fine to me; good to merge when the build is green.
Contributor
|
Thanks @brian-smith-tcril ! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2229 +/- ##
=======================================
Coverage 96.15% 96.16%
=======================================
Files 368 368
Lines 6011 6019 +8
Branches 1438 1482 +44
=======================================
+ Hits 5780 5788 +8
Misses 222 222
Partials 9 9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
Fixes the
masterbuild broken by #2026. Test-only change.#2026's landmark tests were written against a base from before #2110, #2154 and #2168, and the PR merged without its CI running against current
master. The merge applied cleanly, but the new tests use test setup that no longer exists:src/courseware/course/Course.test.jsxrenders<Course … />withtestStore. Neither is defined in the file anymore, sonpm run lintfails with'Course' is not defined/'testStore' is not definedandmake validate.cistops before Jest runs.src/tab-page/LoadedTabPage.test.jsxrendersLoadedTabPagewithout acourseIdor seededcourseHomeMetaQuerydata.LoadedTabPagenow throws in that case (covered by "throws when rendered before the course metadata has loaded"), so the error page renders instead:Unable to find an accessible element with the role "main";<main>either.What changed
Course.test.jsx: both landmark tests render throughrenderCourse(testData), the same as the other tests in the file.LoadedTabPage.test.jsx:renderWithMetadata(courseHomeMetadata, props = {}, { children = null } = {}). The props are spread ontoLoadedTabPageaftercourseId, and the children go in an options object, followingrenderComponent(props, { children = null, search = '' } = {})insrc/courseware/course/sequence/Unit/index.test.jsx. Both landmark tests render through it withactiveTabSlug: 'courseware'/'outline'.Testing
npm run lint -- --max-warnings 0: passesnpm run types: passesnpm run test: 124 of 124 suites and 1285 of 1285 tests pass. Before this change,LoadedTabPage.test.jsxhad 1 failure (on top of the lint errors).LoadedTabPage. The onlyLoadedTabPage rendered without course metadataerror in theLoadedTabPage.test.jsxrun comes from the test that asserts it.🤖 Generated with Claude Code