Skip to content

Child bounties module e2e tests#409

Merged
rockbmb merged 61 commits intoopen-web3-stack:masterfrom
dhirajs0:child-bounties-e2e
Oct 21, 2025
Merged

Child bounties module e2e tests#409
rockbmb merged 61 commits intoopen-web3-stack:masterfrom
dhirajs0:child-bounties-e2e

Conversation

@dhirajs0
Copy link
Copy Markdown
Contributor

Added end-to-end tests to cover the main flows of the pallet_bounties module.

Key scenarios covered:

  • Creating a child bounty from a parent bounty
  • Assigning and accepting a child bounty curator
  • Awarding and claiming a child bounty
  • Child bounty closure and payout
  • Handling child bounty rejection or cancellation

closes issue #293

WIP

Comment thread packages/shared/src/child_bounties.ts Outdated
Comment thread packages/shared/src/childBounties.ts
Comment thread packages/shared/src/childBounties.ts
@github-actions
Copy link
Copy Markdown
Contributor

The end-to-end tests for the child_bounties pallet are comprehensive, covering both success and failure scenarios. However, there are several instances in the failure test cases where the error being checked is from the bounties pallet instead of the childBounties pallet. This is likely a copy-paste error and should be corrected to ensure the tests are validating the correct error conditions.


Review Suggestions

packages/shared/src/child_bounties.ts:1115, 1561, 1656, 1745, 1862, 1992, 2273, 2430

Multiple tests are checking for errors from the bounties pallet instead of the childBounties pallet. The error checks should be updated to reference the correct pallet to ensure the tests are validating the intended error conditions.

For example, on line 1115, client.api.errors.bounties.Premature should be client.api.errors.childBounties.Premature. This issue is present for InvalidValue, InvalidFee, UnexpectedStatus, PendingPayout, RequireCurator, ReasonTooBig, and InvalidIndex errors in their respective tests.

@dhirajs0
Copy link
Copy Markdown
Contributor Author

The end-to-end tests for the child_bounties pallet are comprehensive, covering both success and failure scenarios. However, there are several instances in the failure test cases where the error being checked is from the bounties pallet instead of the childBounties pallet. This is likely a copy-paste error and should be corrected to ensure the tests are validating the correct error conditions.

Review Suggestions

packages/shared/src/child_bounties.ts:1115, 1561, 1656, 1745, 1862, 1992, 2273, 2430

Multiple tests are checking for errors from the bounties pallet instead of the childBounties pallet. The error checks should be updated to reference the correct pallet to ensure the tests are validating the intended error conditions.

For example, on line 1115, client.api.errors.bounties.Premature should be client.api.errors.childBounties.Premature. This issue is present for InvalidValue, InvalidFee, UnexpectedStatus, PendingPayout, RequireCurator, ReasonTooBig, and InvalidIndex errors in their respective tests.

You don't have context of the pallet.
Keep you below pallet in context while reviewing.
https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/child-bounties/src/lib.rs

Comment thread packages/polkadot/src/polkadot.childBounties.e2e.test.ts Outdated
Comment thread packages/shared/src/childBounties.ts
Comment thread packages/shared/src/childBounties.ts
Comment thread packages/shared/src/childBounties.ts Outdated
Comment thread packages/shared/src/childBounties.ts Outdated
Comment thread packages/shared/src/childBounties.ts
Comment thread packages/shared/src/childBounties.ts Outdated
Comment thread packages/shared/src/childBounties.ts Outdated
Comment thread packages/shared/src/childBounties.ts Outdated
Comment thread packages/shared/src/childBounties.ts Outdated
@rockbmb rockbmb merged commit d35064e into open-web3-stack:master Oct 21, 2025
87 checks passed
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