npm must be installed
npm 6.9.0 installed with brew install npm
node v10.15.3 installed with brew install node
You can also use yarn.
Do not commit package-lock.json to Git, or yarn.lock.
If you encounter errors with node on Mac OS X : check this stackoverflow question
Install node_modules:
npm installor
yarn installnpm startor
yarn startThis starts a local node server and the TimeKeeper React app should be on http://localhost:3000/
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 in the interactive watch mode.
See the section about running tests for more information.
Launches the ESLint code check
Launches the ESLint code check and fix simple typos, tabs, semi-colon, etc.
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.
Your app is ready to be deployed!
See the section about deployment for more information.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
https://www.npmjs.com/package/@react-keycloak/web https://github.com/panz3r/react-keycloak#readme
Cypress is an end-to-end test framework
We use Cypress for non-regression testing of the user interface. We also use db-migrate to clean-up and reset the local database to a well know configuration before each test.
First, check that the latest node packages are installed
cd frontend
yarn install
- Quarkus backend is started
- the Frontend application is up and running
- user "Alice" exists and is configured on Keycloak
All tests run with a set of demo users. As a prerequisite, the following user should be created on your local Keycloak server :
Username : alice Password : alice Roles : user, admin
Attributes : create an organization key with a value set to lunatech.fr
You can execute all tests from the frontend sub-folder
cd frontend
yarn cypress
All tests are available under frontend/cypress/integration sub folder.
Check cypress/integration sub folder
Cypress assertions DB-migrate How to truncate pgSQL tables with Cascade