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

Add governance e2e tests #115

Merged
merged 33 commits into from
Dec 18, 2024

Conversation

rockbmb
Copy link
Collaborator

@rockbmb rockbmb commented Nov 22, 2024

Similar to #63, this PR adds E2E tests to governance functionality.

Right now, it tests a referendum's lifecycle.
This is still WIP.

packages/shared/src/types.ts Outdated Show resolved Hide resolved
Each voter's tally and locked funds (for the track of the test's
referendum, which is `SmallTipper`), are checked at 2 other important
stages:
1. after the referendum's cancellation, since this event shouldn't affect
   either
2. after the explicit removal of such votes from the now cancelled
   referendum, which should alter these data accordingly.
Checking each of the test's 3 voting account's class locks and
voting data was rewritten for simplicity.
@rockbmb rockbmb marked this pull request as ready for review December 11, 2024 01:41
packages/shared/src/governance.ts Outdated Show resolved Hide resolved
packages/shared/src/governance.ts Outdated Show resolved Hide resolved
packages/shared/src/governance.ts Outdated Show resolved Hide resolved
packages/shared/src/types.ts Outdated Show resolved Hide resolved
@rockbmb rockbmb force-pushed the governance-e2e-tests branch from 735b230 to bd9f25f Compare December 13, 2024 02:22
@rockbmb rockbmb self-assigned this Dec 13, 2024
Voting events have been introduced in #4613 and #6544, but Polkadot/Kusama
runtimes have not yet been updated to reflect this.

Instead of storing ALL events for the transactions containing the voting
extrinsics, only those for `convictionVoting` are stored i.e. they will
be empty, which will trigger an error anyway when the runtimes are
updated.
Copy link
Member

@xlc xlc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
there is an empty file packages/shared/src/xcm/sendXcmFromRelay ?

packages/shared/src/governance.ts Outdated Show resolved Hide resolved
@rockbmb
Copy link
Collaborator Author

rockbmb commented Dec 17, 2024

there is an empty file packages/shared/src/xcm/sendXcmFromRelay ?

I was going to use it for some common code from the people chain tests and these, but decided against it.
In the end, I forgot to remove it.

@xlc
Copy link
Member

xlc commented Dec 18, 2024

/bot merge

Copy link
Contributor

github-actions bot commented Dec 18, 2024

Auto-merge enabled

view details

@github-actions github-actions bot enabled auto-merge (squash) December 18, 2024 04:10
@github-actions github-actions bot merged commit 2f8b951 into open-web3-stack:master Dec 18, 2024
23 checks passed
@rockbmb rockbmb deleted the governance-e2e-tests branch December 18, 2024 13:39
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