This project is a ReactJS SPA that focuses on being a dashboard to see, through a single lens, all the apps within the ABMS Apps portfolio. It aggregates data from Jira & Gitlab then presents it in a bitesize view to empower portfolio and product managers to make decisions based on relevant data.
- Babel JavaScript
- ES7 React/Redux/GraphQL
- ESLint
- GitLens -- Git superchaged
- Jest
- LintLens
- Live Share
- npm
- npm Intellisense
- SonarLint
- vscode-icons
{
...
"editor.renderControlCharacters": true,
"editor.renderWhitespace": "all",
"explorer.confirmDelete": false,
"workbench.iconTheme": "vscode-icons",
"editor.codeActionsOnSave": {
"source.fixAll": false,
"source.organizeImports": true,
},
"eslint.codeAction.showDocumentation": {
"enable": true
},
"eslint.packageManager": "yarn",
"jest.showCoverageOnLoad": true,
"jest.jestCommandLine": "react-scripts test --coverage",
"jest.autoRun": "off",
"explorer.confirmDragAndDrop": false,
"editor.minimap.enabled": false,
"vsicons.dontShowNewVersionMessage": true,
"git.enableSmartCommit": true,
"sonarlint.rules": {
"javascript:S1529": {
"level": "off"
}
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
}
Have the Midas-API project running locally.
NOTE: All commands should be executed from the root of the project unless otherwise stated.
- Install yarn
- Clone this repo.
- Execute,
yarn install
- Execute,
yarn start:local
- In a chrome browser navigate to,
http://localhost:3000
and see your sweet, sweet app!
- Execute
docker build . --file ./Dockerfile.dev
- Execute
docker images
and grab the IMAGE_ID for the just built image- Will reference as I_ID for remaining instructions
- Execute,
docker run -p 8080:8080 -e REACT_APP_API_URL=<YOUR_BACKEND_URL> <I_ID>
- For local:
REACT_APP_API_URL=http://localhost:8000
- For local:
- In a chrome browser navigate to,
http://localhost:8080
and see your sweet, sweet app!
Firstly, the cypress folder at the root of the project has two folders containing specs. The single
.spec
file in theintegration
folder is for the P1 pipeline. The.spec
files under thee2e
folder are for local testing of cypress.
Tests located in the
e2e
folder require the API server to be running locally because they test the entire workflow. There should be no mocking of API responses because we are configuring the database to a specific state before each spec to test a workflow. Each.spec
should be able to be tested independently and, should it fail, the.spec
should not affect other test files.
NOTE If the API database schema (tables/columns/etc.) is altered, an updated schema will need to be acquired and pasted into /cypress/support/sql/schema.sql
. Getting the schema can be done by exporting the database from adminer without the data.
- Midas API is running locally
- Midas UI is running locally
- mysql is installed
- The spec files reset and set the database to specific states to test specific workflows; this is accomplished with the mysql cli. If you have homebrew installed, run
brew install mysql
- The spec files reset and set the database to specific states to test specific workflows; this is accomplished with the mysql cli. If you have homebrew installed, run
You should now be able to run
yarn cypress:open
to interact with the cypress client and run specific tests. If you want to run all tests through just once, execute,yarn cypress:run