openedx / openedx/frontend-plugin-framework
Write unit tests for plugin scenarios not already tested for
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
Some unit tests have already been written to test for iFrame-based Plugins, PluginContainer, and ideally by this point the Direct Plugin and mixed Plugin Slots.
There are definitely some areas of the library that could use unit tests to confirm our assumptions.
Things worth testing include:
- Plugin Slot
- it should return nothing if there’s no configuration and no default component
- it should only return default component if there’s no configuration
- it should return a React component given a config for one plugin
- it should only return plugins that have a valid configuration (ie. missing key attributes for iFrame or Direct plugin)
- Plugin Container iFrame
- it should return an iFrame with a React component when given a config
- Consolidate any mock objects (i.e. iframeConfig, directConfig) where possible
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing unit tests for iFrame-based Plugins, PluginContainer, Direct Plugin, and mixed Plugin Slots. Add coverage for the listed Plugin Slot configurations and Plugin Container iFrame behavior, then consolidate shared mock objects such as iframeConfig and directConfig. Done means the specified scenarios are covered and the test suite passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100