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

test: add e2e signing and ethereum tests #549

Merged
merged 13 commits into from
Mar 5, 2020
Merged

Conversation

hanwencheng
Copy link
Contributor

@hanwencheng hanwencheng commented Feb 25, 2020

This PR improve current e2e tests.

1. Add more tests for Substrate signing

Now we have two e2e suites: one is for key management and path derivation, the other is for signing test.

e2e/signing.spec.ts
|--Single QR Extrinsic (Sign TX)
|---SetRemark
|---Transfer
|--Multi Part QR Extrinsic(Sign Message)
|---SetRemark

2. Add the Ethereum account tests: generation, deletion, and signing

e2e/signing.spec.ts
-Ethereum
|--Sign Transaction
|--Sign Message

e2e/identityManipulation.spec.ts
-Ethereum
|--Account Creation
|--Account Deletion

3. Reformat project layout for units test and e2e test

previously:

-src
-e2e
-specs
-jest.config.js
...

currently:

-src
-test
 |--e2e
   |---specs
   |---jest.config.js
   |---...
 |--unit
   |---specs
   |---jest.config.js
   |---...
 |--commonConfig.js

Since Detox and Unit test both use Jest as test runner, and they share similar parts of the configs, now move them together into the test folder, which brings a clear structure layout and configuration.

4. How to test

  • yarn to upgrade dependencies
  • Start react native server by yarn start --reset-cache
  • Run yarn e2e:ios to test on ios, and yarn e2e:android for the android test suits. notice: android e2e may be not stable with pin code input, sometime input is missing, just try again will fix the error
  • At the same time existed unit test should not be broken yarn unit should succeed.

@hanwencheng hanwencheng self-assigned this Feb 25, 2020
@hanwencheng hanwencheng changed the title Improve on e2e signing e2e: Improve on e2e signing Feb 28, 2020
@hanwencheng hanwencheng changed the title e2e: Improve on e2e signing test: Improve on e2e signing Feb 28, 2020
@hanwencheng
Copy link
Contributor Author

TODO: Add ethereum account deletion test

@hanwencheng hanwencheng changed the title test: Improve on e2e signing test: add e2e signing and ethereum tests Mar 3, 2020
@hanwencheng hanwencheng merged commit cad3e74 into master Mar 5, 2020
@hanwencheng hanwencheng deleted the hanwen-e2e-signing branch March 5, 2020 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants