Implement Acceptance Tests for Contract Management Feature
Description
This issue covers the implementation of comprehensive acceptance tests for the Contract Management feature as defined in the acceptance tests README.
This README.md covers the functionality of the package;
This contracts.md covers related e2e tests and how to run them;
Scope
Implement Gherkin scenarios and step definitions for the four main contract management scenarios:
- Create a contract with detailed resource requirements, payment terms, participant information, and custom terms
- Digitally sign the contract by all relevant parties
- Execute a deployment to analyze the contract's state transitions through to termination
- Recover contract data in the event of a system failure or restart
Requirements
- Follow the existing acceptance test patterns from
deployment.featureandsteps/deployment.go - Use @wip tags for gradual implementation
- Support multi-party contracts (Requestor, Provider, Solution Enabler)
- Integration with tokenomics endpoints:
/dms/tokenomics/contract/* - DID-based identity and capability exchange workflows
- Contract template system with variable substitution
Deliverables
- Enhanced
tests/acceptance/features/contract_management.featurewith detailed Gherkin scenarios - New
tests/acceptance/steps/contract.gowith step definitions - Contract CLI methods in
tests/acceptance/utils/cli.go - New
tests/acceptance/contract_test.gotest entry point - Sample contract templates in
tests/acceptance/testdata/contracts/
Related Issues
- #1070 (closed) - Acceptance Tests for Contract Sub-package
- #1033 - CLI Commands for Contracts
- #1032 (closed) - Capability Configuration during Contract Creation
This implementation will provide comprehensive end-to-end testing for the contract management feature, ensuring stakeholder-facing functionality works correctly across the full contract lifecycle.
Edited by kabir