Skip to content

Conversation

@rockbmb
Copy link
Collaborator

@rockbmb rockbmb commented Jan 21, 2025

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.

@rockbmb rockbmb self-assigned this Jan 21, 2025
@rockbmb rockbmb marked this pull request as ready for review January 27, 2025 20:24
@rockbmb rockbmb requested a review from xlc January 27, 2025 20:24
@rockbmb
Copy link
Collaborator Author

rockbmb commented Jan 27, 2025

@seadanda 👋


/// Process events

const events = await relayClient.api.query.system.events()
Copy link
Member

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

Copy link
Collaborator Author

@rockbmb rockbmb Jan 28, 2025

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.

Copy link
Member

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

@xlc xlc merged commit 661aec2 into master Jan 28, 2025
27 checks passed
@xlc xlc deleted the nomination-pools-e2e-tests branch January 28, 2025 22:17
github-merge-queue bot pushed a commit to paritytech/polkadot-sdk that referenced this pull request Feb 4, 2025
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]>
github-merge-queue bot pushed a commit to paritytech/polkadot-sdk that referenced this pull request Feb 4, 2025
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]>
@rockbmb rockbmb mentioned this pull request Feb 4, 2025
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.

3 participants