* fix(deps): regenerate package-lock.json
Co-Authored-By: Claude Code <noreply@anthropic.com>
* fix(deps): regenerate package-lock.json
Moved @openedx/frontend-build from dependencies to devDependencies.
Removed direct jest devDependency which was causing ts-jest hoisting issues.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(tests): use require() for MockedPluginSlot in jest.mock
Jest hoists jest.mock() calls to the top of the file, which caused
MockedPluginSlot to be undefined when the mock factory executed.
Using require() inside the factory ensures it loads at runtime.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(types): handle nullable breakpoint types
Paragon's breakpoint types now have optional minWidth/maxWidth properties.
Added non-null assertions since these values are always defined in practice.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(tests): add IntlProvider to ContentIFrame tests
Paragon's ModalDialog now uses useIntl() (openedx/paragon#3624),
requiring an IntlProvider in the component ancestry.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(tests): await async operations in Course tests
Fixed dangling waitFor blocks that weren't awaited, causing tests
to not actually wait for async operations. Changed to properly use
await with screen.findBy*() queries.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix(tests): use dynamic imports in LearnerToolsSlot tests
Jest hoists mock calls but ES imports run before the test body.
Using dynamic imports in beforeEach ensures mocks are set up
before modules are loaded.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Code <noreply@anthropic.com>
* feat: base modifications to disable completion checks when flag enabled
* chore: started updating tests
* chore: udpated tests
* chore: added missing negative test
---------
Co-authored-by: Adolfo R. Brandes <adolfo@axim.org>
* feat: Updated accesibility on courseware search modal
* chore: Updated i18n to use useIntl() hook and dialog behavior updates
* feat: Added close when clicking on the modal backdrop
* chore: Swapped remove listeners with an AbortController
* fix: Fixed tests
* chore: Rolled back unintended husky script change
* feat: add language selection
chore: update tests so we have less error message
test: update test
* test: update tests
* chore: remove duplicate translation
* chore: lint for console
* chore: remove comments
* chore: make sure the affect url frame refresh after the language selection change
* chore: add whole_course_translation and language to courseware meta (#1305)
* feat: Add feedback widget UI mock
Add unit tests
Fix snapshot
Clean Sequence component logEvent calls
Clean unit test
Put feedback widget behind whole course translation flag
Fix useFeedbackWidget test
* chore: add src and dest translation
* feat: first iteration of plugin translation
chore: update plugin instruction
* feat: Connect FeedbackWidget with backend services (#1325)
Connect FeedbackWidget with backend services
Move feedback widget to unit translation plugin
* feat: Add authentication to WCT feedback endpoints (#1329)
* chore: add fetch config and move feedback widget for the plugin
chore: rewrite and test the api request
chore: rebase
chore: update translation feedback
chore: test
chore: add more tests
* chore: rebase
* chore: update requested change
* chore: update package
* chore: upgrade frontend-lib-special-exams and frontend-lib-learning-assistant
* chore: update tests
* chore: remove unneeded package
* chore: update example config
* chore: add source-map-loader
* fix: feedback widget render error after submit feedback (#1335)
* fix: feedback widget render error after submit feedback
* fix: widget logic
---------
Co-authored-by: Rodrigo Martin <rodrigom_94@hotmail.com>
* feat: refactor use of frontend-lib-special-exams public API to hooks
This commit refactors the use of the frontend-lib-special-exams public API to use hooks.
This commit also imports the root reducer from the frontend-lib-special-exams library. This root reducer is used for the specialExams slice when configuring the store for this application.
* feat: update special exams version
* feat: update snapshots
---------
Co-authored-by: Alie Langston <alangsto@wellesley.edu>
* feat: upgrade react router to v6
* fix: all test cases affected by react router upgrade
* refactor: fix navigations
* fix: test cases affectewd due to lib-special-exams
* refactor: improve code coverage
This commit installs the Xpert chatbot feature from the frontend-lib-learning-assistant repository into the frontend-lib-learning application.
This component is rendered by the Course component. The component is only rendered when a few conditions are satisfied.
This is an experimental off-by-defualt feature for moving the translation files ouside the repos.
Run `OPENEDX_ATLAS_PULL=true make translations` to use atlas to pull translations instead of transifex.
Refs: FC-12 OEP-58
Now that we are using node 16, peer dependencies are much more
strict about aligning between all of our dependencies.
This PR downgrades react from 17 to 16 (no changes) and upgrades
paragon and frontend-lib-special-exams to all be on the same
page about what peer dependency ranges are valid.
Courseware and courseHome both provide tabs to the mfe.
This PR unifies the calls so that tab descriptions are only fetched from courseHome metadata
Remove jest-chain dependencies to make test errors more usable.
- Drop our custom breakpoints (identical to paragon's)
- Drop our custom useWindowSize (and adapt to paragon's version
not providing a size initially at component mount)
- Drop our dependency on react-responsive
- Drop our dependency on react-break
- Assume that Learning Sequences is available (waffle has been
removed)
- Stop calling course blocks API, which provided mostly duplicated
information now.
- Refactor a bit to avoid needing to globally know which units
exist in sequences. That is now provided just-in-time for only
the current sequence.
- Add /first and /last URLs that you can use instead of unit IDs
in URL paths, in service of the above point.
AA-1040
AA-1153
This is the first step toward clearing out the redundant metadata from the
coursewareMetadata and getting it from a common source - the courseHomeMetadata.
remove username from coursewareMetadata
Remove courseAccess from coursewareMetadata.
Fix all unit tests
Modify classes that use metadataModel to use courseHomeMetadata for common data.
metadataModel still exists as a mechanism to distinguish if a component is under
courseware or courseHome, and it will be renamed or removed in a later refactor.
URL format: /goal-unsubscribe/<uuid-token>
This is designed to be used in the new course goals feature, where
emails will be sent to learners and those emails will include a
link to this landing page, as an unsubscribe link.
Also, update calls to the LMS course home API to not include the
/v1/ fragment anymore, as we're moving to an unversioned API.
AA-907
* [feat] Add ID verification Alert to course home
if a user has a verified seat, but is in the unverified certificate
status state, the certificateStatusAlert will now show a message letting
the learner know they need to verify in order to earn a certificate.
This does not remove the message about the verification deadline in the
right sidebar of the course home.
Removes sequences we shouldn't see by using the Learning Sequences API
(TNL-8377). Depends on https://github.com/edx/edx-platform/pull/27955
It works by adding a call to the Learning Sequences API and (if that
endpoint is enabled, i.e. returns 200 for this user+course), uses the
results of that endpoint to remove sequences from the Course Blocks API
call. Learning Sequences knows how to do things like bubble up the
content group settings of units to sequences for the case where all
units have the same restrictions and the user would see an empty
sequence.
Valid courseware URLs currently include:
* /course/:courseId
* /course/:courseId/:sequenceId
* /course/:courseId/:sequenceId/:unitId
In this commit we add support for:
* /course/:courseId/:sectionId
* /course/:courseId/:sectionId/:unitId
* /course/:courseId/:unitId
All URL forms still redirect to:
/course/:courseId/:sequenceId/:unitId
See ADR #8 for more context.
All changes:
* refactor: allow courseBlocks factory to build multiple sections
* refactor: make CoursewareContainer tests less brittle & stateful
* feat: handle courseware paths more liberally
* refactor: reorder, rename, & comment redirection functions
TNL-7796
Show learners a celebratory modal if they visit the learning mfe for 3 days in a row. Call edx-platform API to determine if they should see the celebration.
AA-304
* Adding testing-library dependencies, and bumping frontend-build to be compatible with them.
* Adding a function to initialize the redux store
We need to use it in a few places. Seems worth not-repeating, since they can easily get out of sync. In general, tests should only test the parts of the store they care about, as well.
* Adding function to initialize a mock application.
Ultimately I’d like to move this to frontend-platform as an alternative to ‘initialize’ for tests. ‘initialize’ is an async function which complicates matters.
* Using more explicit assertions for courseware reducer fields.
This removes the need for the snapshot file, and ensures our test is more resilient to unrelated changes in the store.
Also added a few more stages of assertions to some of the tests, showing that they have the right values over time.
* Adding a helper to build a simple course blocks response.
We can use this in the courseware data tests, and shortly in the tests for CoursewareContainer.
* Modifying sequenceMetadata factory to allow multiple units.
This will help us test sequence navigation’s behavior more fully by having multiple units in a sequence.
* A little linting and cleanup.
* Adding first round of tests for CoursewareContainer.
Tests loading, sequence navigation/unit rendering, and ‘denied’ states.
Subsequent tests will add tests for handlers.