Skip to content

Commit

Permalink
feat: 🎨 network test create proposal fixture add new proposals
Browse files Browse the repository at this point in the history
  • Loading branch information
ignazio-bovo committed Jun 2, 2024
1 parent 07bffe1 commit ac48824
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,25 @@ export class CreateProposalsFixture extends StandardizedFixture {
assert.equal(qProposal.details.proposal?.id, details.toString())
break
}
// case 'SetPalletFozenStatus': {
// Utils.assert(qProposal.details.__typename === 'SetPalletFozenStatusProposalDetails')
// const details = proposalDetails.asSetPalletFozenStatus
// assert.equal(qProposal.details.newFrozenStatus, details[0])
// break
// }
case 'SetPalletFozenStatus': {
Utils.assert(qProposal.details.__typename === 'UpdatePalletFrozenStatusProposalDetails')
const details = proposalDetails.asSetPalletFozenStatus
assert.equal(qProposal.details.frozen, details[0].isTrue)
assert.equal(qProposal.details.pallet, details[1].toString())
break
}
case 'DecreaseCouncilBudget': {
Utils.assert(qProposal.details.__typename === 'DecreaseCouncilBudgetProposalDetails')
const details = proposalDetails.asDecreaseCouncilBudget
assert.equal(qProposal.details.amount.toString(), details.toString())
break
}
case 'SetEraPayoutDampingFactor': {
Utils.assert(qProposal.details.__typename === 'SetEraPayoutDampingFactorProposalDetails')
const details = proposalDetails.asSetEraPayoutDampingFactor
assert.equal(qProposal.details.dampingFactor.toString(), details.toString())
break
}
}
// TODO(petra): missing proposals:
/**
Expand Down
13 changes: 13 additions & 0 deletions tests/network-tests/src/graphql/queries/proposals.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,19 @@ fragment ProposalDetailsFields on ProposalDetails {
maxCashoutAllowed
channelCashoutsEnabled
}

... on UpdatePalletFrozenStatusProposalDetails {
frozen
pallet
}

... on DecreaseCouncilBudgetProposalDetails {
amount
}

... on SetEraPayoutDampingFactorProposalDetails {
dampingFactor
}
}

fragment ProposalFields on Proposal {
Expand Down

0 comments on commit ac48824

Please sign in to comment.