Skip to content

Commit d35064e

Browse files
authored
Child bounties module e2e tests (#409)
* childBounties added for kusama * childBounties added for polkadot * update import * childBounties added * helper functions added for child bounties * childBounties creation test added * setStorage lastSpendPeriod such that next spend is few blocks ahead * devAccounts replaced with testAccounts * sendTransation modularized * assigning and accepting a child bounty curator test added * awarding and claiming a child bounty test added * test added : closure and payout of a child bounty * test added: rejection and cancellation of a child bounty * failure test parent bounty not active error added * failure test insufficient bounty balance error test added * failure test child bounty with invalid value error added * failure test invalid child bounty curator fee added * failure test accept curator when child bounty is in added state added * failure test close child bounty in pending payout status added * refac: success and failure tests are grouped * kusama snapshot for childBounties added * snapshot for childBounties for polkadot added * refac * unassign curator different cases test added * child bounty storage verification test added * added setLastSpendPeriodBlockNumber fn for repeated logic * added extractExtrinsicFailedEvent() for repeated logic * minor improvements * snapshot updated for childBounties * linter warning fixed * linter warning fixed * testAccountBalance set as a multiple of exential deposit * test docs improved and some tests renamed for better clarity * additional checks added in childBountyCreationTest * test added: non-curator trying to create child bounty throws `RequireCurator` error * test added: parent already has `MaxActiveChildBountyCount` child bounties, trying to create a new one throws `TooManyChildBounties` error * test added: child bounty description larger than `MaximumReasonLength` throws `ReasonTooBig` error * test added: proposing curator for invalid child bounty index throws `InvalidIndex` error * lint fix * snapshots updated * ts docs updated * child bounties e2e tests added in readme * Add Kusama AH childBounties E2E tests * Port child bounties E2E tests to Kusama AH * fix tests on KAH and added additional status checks * snaps updated * testConfig for child bounties for polkadot updated * child bounties removed form Kusama relay * child_bounties renamed to childBounties * testConfig specified * count added for multiple new blocks * unassign curator test separated into separate tests * refac the unassign tests with helper function * snaps updated * empty snapshot events fixed * tests delineated into sections * refactored with hepler function and delineate tests
1 parent dae64cd commit d35064e

7 files changed

Lines changed: 3547 additions & 0 deletions

File tree

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,18 @@ These include:
154154
- Bounty closure restrictions (approved/pending payout states)
155155
- Non-curator attempting to accept curator role
156156
- Child bounty constraints preventing parent bounty closure
157+
- E2E test suite for child bounties infrastructure:
158+
- Child bounty creation, curator assignment, acceptance, awarding and claiming workflows
159+
- Child bounty closure and fund return to parent bounty
160+
- Child bounty rejection by curators and cancellation by parent curators
161+
- Curator unassignment scenarios with different deposit handling (refund vs. slash)
162+
- Storage verification for child bounty counters and cleanup
163+
- Comprehensive failure mode testing:
164+
- Creating child bounties from non-active parent bounties
165+
- Child bounty with InvalidValue, InvalidIndex, InvalidFee, TooManyChildBounties, ReasonTooBig
166+
- Accepting curators in wrong child bounty states
167+
- Closing child bounties in pending payout status
168+
- Non-curator attempting to create child bounties
157169

158170
The intent behind these end-to-end tests is to cover the basic behavior of relay chains' and system
159171
parachains' runtimes.

0 commit comments

Comments
 (0)