Skip to content
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

Merged
merged 5 commits into from
Mar 28, 2022
Merged

Update test env for Cypress tests #521

merged 5 commits into from
Mar 28, 2022

Conversation

Ebazhanov
Copy link
Contributor

@Ebazhanov Ebazhanov commented Mar 24, 2022

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 and Localhost to be run:

@Ebazhanov Ebazhanov added the E2E tests E2E tests label Mar 24, 2022
@Ebazhanov Ebazhanov marked this pull request as ready for review March 24, 2022 13:31
@Ebazhanov Ebazhanov changed the title draft Update test env for Cypress tests Mar 24, 2022
Comment on lines +1 to +23
## 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
Copy link
Contributor Author

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
Comment on lines 95 to 96
"cy:open:local": "cypress open --config-file localhost-config.json",
"cy:open:dev": "cypress open --config-file dev-config.json",
Copy link
Contributor Author

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
Comment on lines 98 to 100
"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'"
Copy link
Contributor Author

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

@Ebazhanov
Copy link
Contributor Author

one test is unstable i am looking at it right now
image

@Ebazhanov Ebazhanov marked this pull request as draft March 24, 2022 15:13
@Ebazhanov Ebazhanov marked this pull request as ready for review March 24, 2022 16:47
@Ebazhanov Ebazhanov merged commit 97ce76f into main Mar 28, 2022
@Ebazhanov Ebazhanov deleted the 518-testing-env branch March 28, 2022 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E tests E2E tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants