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:

  1. Create a contract with detailed resource requirements, payment terms, participant information, and custom terms
  2. Digitally sign the contract by all relevant parties
  3. Execute a deployment to analyze the contract's state transitions through to termination
  4. Recover contract data in the event of a system failure or restart

Requirements

  • Follow the existing acceptance test patterns from deployment.feature and steps/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

  1. Enhanced tests/acceptance/features/contract_management.feature with detailed Gherkin scenarios
  2. New tests/acceptance/steps/contract.go with step definitions
  3. Contract CLI methods in tests/acceptance/utils/cli.go
  4. New tests/acceptance/contract_test.go test entry point
  5. 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 Aug 06, 2025 by kabir
Assignee Loading
Time tracking Loading