Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions packages/shared/src/governance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,11 +321,7 @@ export async function referendumLifecycleTest<

unwantedFields = /alarm|when|since|submitted/

// Filtering for events only from the `convictionVoting` pallet would leave them empty.
// Voting events were only introduced in
// https://github.com/paritytech/polkadot-sdk/pull/4613, and will take a few releases until they
// are visible here - this will trigger a failure in tests, which can then be addressed.
await checkEvents(voteEvents, 'convictionVoting', 'referenda')
await checkEvents(voteEvents, 'convictionVoting')
.redact({ removeKeys: unwantedFields, redactKeys: unwantedFields })
.toMatchSnapshot("events for charlie's vote")

Expand Down Expand Up @@ -395,7 +391,7 @@ export async function referendumLifecycleTest<

await client.dev.newBlock()

await checkEvents(voteEvents, 'convictionVoting', 'referenda')
await checkEvents(voteEvents, 'convictionVoting')
.redact({ removeKeys: unwantedFields })
.toMatchSnapshot("events for dave's vote")

Expand Down Expand Up @@ -465,7 +461,7 @@ export async function referendumLifecycleTest<

await client.dev.newBlock()

await checkEvents(voteEvents, 'convictionVoting', 'referenda')
await checkEvents(voteEvents, 'convictionVoting')
.redact({ removeKeys: unwantedFields })
.toMatchSnapshot("events for eve's vote")

Expand Down