Write integration tests

Todo

  • Write test membership ENFT and Issuer contracts

Scenarios

  • Try create a proposal when not a member
  • Create a proposal as member
  • Try create a proposal with an expired membership token
  • Try edit proposal when not author
  • Edit proposal as author
  • Quorum not attained after commitment period
  • Quorum attained after commitment period
  • Try to commit on a proposal that isn't in commitment phase.
  • Try to vote on a proposal that isn't in voting phase.
  • Voting phase commitments tests (simulate all frontend interactions)
  • Various validating phase scenarios:
    • Revealing a vote destroys voting ballot contract and return deposit
    • Rejected instantly at absolute majority
    • Accepted instantly at absolute majority
    • Reject at single majority after validation period ends
    • Accepted at single majority after validation period ends
    • Not revealed votes considered as abstained
    • Retrieve deposit tests (incl. fraudulent tries)
  • Test Motion enacting
  • Test Grant execution → Should create a transfer proposal
  • Test Transfer execution
  • Test Frontend change execution
  • Test Governance rules change execution
  • Test events client subscription in all scenarios
Edited by Fabio Bonfiglio