-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update test env for Cypress tests #521
Conversation
## About | ||
Tgrade is a public, permissionless blockchain designed with decentralisation at its heart. | ||
|
||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | ||
## Get started | ||
- before you run `$ yarn start:local` make sure to have connection to blockchain via Docker or Digital Ocean | ||
|
||
# Sentry issues | ||
### Sentry issues | ||
|
||
When a production deployment of this app throws an error, it's captured by [Sentry](https://sentry.io/welcome/). Every captured error can be seen on this dashboard: https://sentry.io/organizations/confio/issues/?project=5647042 | ||
|
||
## Available Scripts | ||
### E2E tests | ||
> E2E tests is using opensource framework called Cypress https://docs.cypress.io/guides/overview/why-cypress | ||
|
||
In the project directory, you can run: | ||
##### Usage | ||
- `$ cy:open:local` // will open "Test runner" to run on https://dev.tgrade.finance/ | ||
- `$ cy:open:dev` // to run on http://localhost:3000/ | ||
|
||
### `yarn start` | ||
the same rules applied for running tests in Circleci more details in workflows: | ||
[.circleci/config.yml](.circleci/config.yml) | ||
|
||
Runs the app in the development mode.\ | ||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. | ||
### Integration tests | ||
- `$ yarn test` // to run tests locally | ||
- `$ yarn test:coverage` // generate test coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi I start documents some key information it is not full but at least something instead of auto generated text after yarn create react app
))))
plan for the future to add more description for Cypress and Integration tests
maybe some references of what kind of libraries we are using and so on
package.json
Outdated
"cy:open:local": "cypress open --config-file localhost-config.json", | ||
"cy:open:dev": "cypress open --config-file dev-config.json", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this commands will help to run cypress Test runner locally, you can try it out to see how it is working
package.json
Outdated
"cy:volume:tc": "npx cypress run --browser chrome --config-file dev-config.json --spec 'cypress/integration/volumeTests/createTC.test.ts'", | ||
"cy:volume:non-voting": "npx cypress run --browser chrome --config-file dev-config.json --spec 'cypress/integration/volumeTests/addNonVotingMemeber.test.ts'", | ||
"cy:volume:asset": "yarn start:local & wait-on http://localhost:3000 && cypress run --browser chrome --config-file localhost-config.json --spec 'cypress/integration/volumeTests/addAsset.test.ts'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those commands is used as reference to .circleci/config.yml
This PR is related to the ticket #518 to enable running E2E tests on different environment: Dev, Stag, Try, Dapp.
As you can see now tests using
Stage
andLocalhost
to be run: