-
Notifications
You must be signed in to change notification settings - Fork 15
Create E2E tests for nomination pools #165
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
Conversation
Also, remove PAPI, as it was not possible to submit transactions using it.
packages/polkadot/src/__snapshots__/polkadotNominationPools.e2e.test.ts.snap
Outdated
Show resolved
Hide resolved
|
|
||
| /// Process events | ||
|
|
||
| const events = await relayClient.api.query.system.events() |
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 is not really needed because the snapshot above already assets everything including the error type
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.
You're correct; however, the reason I left this section here is that the snapshot is just
"dispatchError": {
"Module": {
"error": "0x08000000",
"index": 41,
},
},whereas in assert(relayClient.api.errors.nominationPools.MinimumBondNotMet.is(dispatchError.asModule)), the semantic value of the error/index from above is explicitly verified.
If I were introduced to this repository, to this test case, and then shown the snapshot, I would be slightly confused by the meaning of 0x08000000/41.
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.
ok. we can do #167 in future
Also, remove some time-dependente information from snapshots - pool IDs.
Found via open-web3-stack/polkadot-ecosystem-tests#165. Closes #7370 . # Description Some extrinsics from `pallet_nomination_pools` were not emitting events: * `set_configs` * `set_claim_permission` * `set_metadata` * `chill` * `nominate` ## Integration N/A ## Review Notes N/A --------- Co-authored-by: Ankan <[email protected]>
Found via open-web3-stack/polkadot-ecosystem-tests#165. Closes #7370 . # Description Some extrinsics from `pallet_nomination_pools` were not emitting events: * `set_configs` * `set_claim_permission` * `set_metadata` * `chill` * `nominate` ## Integration N/A ## Review Notes N/A --------- Co-authored-by: Ankan <[email protected]>
Similar to #63 and #115, this PR adds E2E tests to nomination pool functionality.
This is enough to get started and cover basic user journeys; more can gradually be built from here.