This project was bootstrapped with DHIS2 Application Platform.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner and runs all available tests found in /src.
See the section about running tests for more information.
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
A deployable .zip file can be found in build/bundle!
See the section about building for more information.
Deploys the built app in the build folder to a running DHIS2 instance.
This command will prompt you to enter a server URL as well as the username and password of a DHIS2 user with the App Management authority.
You must run yarn build before running yarn deploy.
See the section about deploying for more information.
With yarn start running, open http://localhost:3000/plugin-host.html and log in to see a page (not in releases) that runs the dashboard plugin in an iframe, the way a dashboard does (with the Plugin component from @dhis2/app-runtime). Pick a map, then try what a dashboard does with it: filters, resizing, fullscreen. To include it in a PR's Netlify preview (at /plugin-host.html), add the preview plugin label to the PR.
The plugin e2e tests (cypress/integration/plugin.cy.js) use the same page, sending the plugin dashboard-like props through window.setPluginProps.
To record tests in Cypress Cloud, you can use one of the following methods based on your needs:
- Commit Message: Include
[e2e record]in your commit messages to activate recording. - GitHub Labels: Apply the
e2e recordlabel to your pull request to trigger recording.
This setup helps in managing Cypress Cloud credits more efficiently, ensuring recordings are only made when explicitly required.
To also run the e2e tests against the DHIS2 development version, apply the e2e dev label to your pull request.
You can learn more about the platform in the DHIS2 Application Platform Documentation.
You can learn more about the runtime in the DHIS2 Application Runtime Documentation.
To learn React, check out the React documentation.