Simplifies a bunch of test code by converting it to use our handy testUtils module.
None of the app code is change, just test code. And none of the test cases are modified in any meaningful way - this just simplifies the setup/cleanup significantly.
* fix: warnings about Duplicate message id
* fix: paragon's Hyperlink no longer accepts a 'content' attribute
* test: ensure all act() calls are async
* test: Removed "async" from "describe"
* fix: DiscussionsSettings tests
* Don't nest userAction.click in act() -- nested act() statements have
indeterminent behaviour.
* Use getBy* instead of findBy* with userAction to avoid nested act() statements
* Always await userEvent.click
* Use fireEvent.click when the onClick handlers need to be called
* Use queryBy* instead of getBy* when using .toBeInTheDocument or
* fix: typo in data-testid
* test: Use useLocation to test route changes
* Don't nest userAction.click in act() -- nested act() statements have
* chore: fix lint:fix and lint errors
* remove "indent" setting from .eslintrc.js
* add @typescript-eslint/ prefix to eslint-disable-line statements where flagged by linter
* changed stylelint setting import-notation to "string"
* test: fix failing tests after upgrade
* fix: css error "target selector was not found"
* chore: upgrades dependency frontend-lib-content-components@2.3.0
* chore: bumps @edx/frontend-component-ai-translations to ^2.1.0
---------
Co-authored-by: Yusuf Musleh <yusuf@opencraft.com>
* fix: paragon's Hyperlink no longer accepts a 'content' attribute
* test: ensure all act() calls are async
* test: Removed "async" from "describe"
Returning a Promise from "describe" is not supported.
* fix: DiscussionsSettings tests
Previous commit revealed several issues with these tests
* Don't nest userAction.click in act() -- nested act() statements have indeterminent behaviour.
* Use getBy* instead of findBy* with userAction to avoid nested act() statements
* Use fireEvent.click when the onClick handlers need to be called
* Use queryBy* instead of getBy* when using .toBeInTheDocument or waitForElementToBeRemoved
queryBy* return null when the element is not found.
* fix: typo in data-testid
Warning: React does not recognize the `data-testId` prop on a DOM
element. If you intentionally want it to appear in the DOM as a custom
attribute, spell it as lowercase `data-testid` instead.
* test: Use useLocation to test route changes
---------
Co-authored-by: Yusuf Musleh <yusuf@opencraft.com>
The Configure Live modal in Pages & Resources page uses a selectable box to select the video conferencing tool. It seems broken as well (not selectable).
It looks like the bug with not working SelectableBox (see e.g. #886) affects pretty much any component that uses it.
Thus, this PR replaces every usage of the paragon component with our working copy from flcc.
* feat: Make "Pages & Resources" course apps into plugins
* feat: move ora_settings
* feat: move proctoring
* feat: move progress
* feat: move teams
* feat: move wiki
* feat: move Xpert settings
* fix: add webpack.prod.config.js
* fix: clean up unused parts of package.json files
* feat: Add an error message when displaying a Course App Plugin fails
* chore: fix various eslint warnings
* chore: fix jest tests
* fix: error preventing "npm ci" from working
* feat: better tests for <SettingsComponent>
* chore: move xpert_unit_summary into same dir as other plugins
* fix: eslint-import-resolver-webpack is a dev dependency
* chore: move learning_assistant to be a plugin too
* feat: for compatibility, install 2U plugins by default
* fix: bug with learning_assistant package.json