attribute-correctness.feature 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. Feature: Full vote correctness evaluator on encrypted values
  2. Scenario: No rule specified
  3. When the selection contains an option with attributes unusedAttributeId11, unusedAttributeId12, attributeId4
  4. When evaluating correctness on the encryped options
  5. Then the server-side correctness should pass
  6. Then finish server-side correctness test
  7. Scenario: Correctness is successful if the submitted options are satisfying the attributes
  8. Given a contest with name contest1
  9. Given a question with correctness attribute attributeId1 with maximum selection of 2
  10. Given a question with correctness attribute attributeId2 with maximum selection of 1
  11. Given a contest with name contest2
  12. Given a question with correctness attribute attributeId3 with maximum selection of 1
  13. Given a question with correctness attribute attributeId4 with maximum selection of 2
  14. When the selection contains an option with attributes unusedAttributeId1, unusedAttributeId2, attributeId1
  15. When the selection contains an option with attributes unusedAttributeId3, unusedAttributeId4, attributeId1
  16. When the selection contains an option with attributes unusedAttributeId5, unusedAttributeId6, attributeId2
  17. When the selection contains an option with attributes unusedAttributeId7, unusedAttributeId8, attributeId3
  18. When the selection contains an option with attributes unusedAttributeId9, unusedAttributeId10, attributeId4
  19. When the selection contains an option with attributes unusedAttributeId11, unusedAttributeId12, attributeId4
  20. When evaluating correctness on the encryped options
  21. Then the server-side correctness should pass
  22. Then finish server-side correctness test
  23. Scenario: Correctness fails if the submitted options are not satisfying the attributes
  24. Given a contest with name contest1
  25. Given a question with correctness attribute attributeId1 with maximum selection of 2
  26. Given a question with correctness attribute attributeId2 with maximum selection of 1
  27. Given a contest with name contest2
  28. Given a question with correctness attribute attributeId3 with maximum selection of 2
  29. Given a question with correctness attribute attributeId4 with maximum selection of 1
  30. When the selection contains an option with attributes unusedAttributeId1, unusedAttributeId2, attributeId1
  31. When the selection contains an option with attributes unusedAttributeId3, unusedAttributeId4, attributeId2
  32. When the selection contains an option with attributes unusedAttributeId5, unusedAttributeId6, attributeId2
  33. When the selection contains an option with attributes unusedAttributeId7, unusedAttributeId8, attributeId3
  34. When the selection contains an option with attributes unusedAttributeId9, unusedAttributeId10, attributeId4
  35. When the selection contains an option with attributes unusedAttributeId11, unusedAttributeId12, attributeId4
  36. When evaluating correctness on the encryped options
  37. Then the server-side correctness should fail
  38. Then the attribute correctness error should be MIN_ERROR, contest1
  39. Then the attribute correctness error should be MAX_ERROR, contest1
  40. Then the attribute correctness error should be MIN_ERROR, contest2
  41. Then the attribute correctness error should be MAX_ERROR, contest2
  42. Then the attribute correctness error does not contain any additional messages
  43. Then finish server-side correctness test