full.ts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import creatingMemberships from '../flows/membership/creatingMemberships'
  2. import councilSetup from '../flows/proposals/councilSetup'
  3. import leaderSetup from '../flows/workingGroup/leaderSetup'
  4. import electionParametersProposal from '../flows/proposals/electionParametersProposal'
  5. import manageLeaderRole from '../flows/proposals/manageLeaderRole'
  6. import spendingProposal from '../flows/proposals/spendingProposal'
  7. import textProposal from '../flows/proposals/textProposal'
  8. import validatorCountProposal from '../flows/proposals/validatorCountProposal'
  9. import wgMintCapacityProposal from '../flows/proposals/workingGroupMintCapacityProposal'
  10. import atLeastValueBug from '../flows/workingGroup/atLeastValueBug'
  11. import manageWorkerAsLead from '../flows/workingGroup/manageWorkerAsLead'
  12. import manageWorkerAsWorker from '../flows/workingGroup/manageWorkerAsWorker'
  13. import workerPayout from '../flows/workingGroup/workerPayout'
  14. import { scenario } from '../Scenario'
  15. scenario(async ({ api, debug, job }) => {
  16. debug('Enabling failed tx logs')
  17. api.enableTxLogs()
  18. job([creatingMemberships])
  19. const councilJob = job([councilSetup])
  20. // Runtime is configured for MaxActiveProposalLimit = 5
  21. // So we should ensure we don't exceed that number of active proposals
  22. // which limits the number of concurrent tests that create proposals
  23. const proposalsJob1 = job([
  24. electionParametersProposal,
  25. spendingProposal,
  26. textProposal,
  27. validatorCountProposal,
  28. ]).afterSuccessOf(councilJob)
  29. job([wgMintCapacityProposal.storage, wgMintCapacityProposal.content])
  30. .afterSuccessOf(councilJob)
  31. .afterSuccessOf(proposalsJob1)
  32. const leadRolesJob = job([manageLeaderRole.storage, manageLeaderRole.content])
  33. .afterSuccessOf(councilJob)
  34. .afterSuccessOf(proposalsJob1)
  35. const leadSetupJob = job([leaderSetup.storage, leaderSetup.content]).afterSuccessOf(leadRolesJob)
  36. /* All tests below require an active Lead for each group */
  37. // Test bug only on one instance of working group is sufficient
  38. job([atLeastValueBug]).afterSuccessOf(leadSetupJob)
  39. job([
  40. manageWorkerAsLead.storage,
  41. manageWorkerAsWorker.storage,
  42. workerPayout.storage,
  43. manageWorkerAsLead.content,
  44. manageWorkerAsWorker.content,
  45. workerPayout.content,
  46. ]).afterSuccessOf(leadSetupJob)
  47. })