You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
5.1 KiB

  1. Feature: conversation/ban
  2. Background:
  3. Given user "participant1" exists
  4. Given user "participant2" exists
  5. Given user "participant3" exists
  6. And guest accounts can be created
  7. And user "user-guest@example.com" is a guest account user
  8. Scenario: Moderator banning and unbanning multiple users
  9. Given user "participant1" creates room "room" (v4)
  10. | roomType | 3 |
  11. | roomName | room |
  12. And user "participant2" joins room "room" with 200 (v4)
  13. And user "participant3" joins room "room" with 200 (v4)
  14. And user "participant1" bans user "participant2" from room "room" with 200 (v1)
  15. | internalNote | BannedP2 |
  16. And user "participant1" bans user "participant3" from room "room" with 200 (v1)
  17. | internalNote | BannedP3 |
  18. And user "participant1" sees the following bans in room "room" with 200 (v1)
  19. | moderatorActorType | moderatorActorId | moderatorDisplayName | bannedActorType | bannedActorId | bannedDisplayName | internalNote |
  20. | users | participant1 | participant1-displayname | users | participant2 | participant2-displayname | BannedP2 |
  21. | users | participant1 | participant1-displayname | users | participant3 | participant3-displayname | BannedP3 |
  22. And user "participant2" joins room "room" with 403 (v4)
  23. And user "participant3" joins room "room" with 403 (v4)
  24. And user "participant1" unbans user "participant2" from room "room" with 200 (v1)
  25. And user "participant1" unbans user "participant3" from room "room" with 200 (v1)
  26. And user "participant2" joins room "room" with 200 (v4)
  27. And user "participant3" joins room "room" with 200 (v4)
  28. Scenario: Users trying to ban moderator
  29. Given user "participant1" creates room "room" (v4)
  30. | roomType | 3 |
  31. | roomName | room |
  32. And user "participant2" joins room "room" with 200 (v4)
  33. And user "participant3" joins room "room" with 200 (v4)
  34. And user "participant2" bans user "participant1" from room "room" with 403 (v1)
  35. | internalNote | BannedP1 |
  36. And user "participant3" bans user "participant1" from room "room" with 403 (v1)
  37. | internalNote | BannedP1 |
  38. Scenario: Users trying to ban other users
  39. Given user "participant1" creates room "room" (v4)
  40. | roomType | 3 |
  41. | roomName | room |
  42. And user "participant2" joins room "room" with 200 (v4)
  43. And user "participant3" joins room "room" with 200 (v4)
  44. And user "participant2" bans user "participant3" from room "room" with 403 (v1)
  45. | internalNote | BannedP3 |
  46. And user "participant3" bans user "participant2" from room "room" with 403 (v1)
  47. | internalNote | BannedP2 |
  48. Scenario: User trying to ban themselves
  49. Given user "participant1" creates room "room" (v4)
  50. | roomType | 3 |
  51. | roomName | room |
  52. And user "participant1" joins room "room" with 200 (v4)
  53. And user "participant2" joins room "room" with 200 (v4)
  54. And user "participant2" bans user "participant2" from room "room" with 403 (v1)
  55. | internalNote | BannedP2 |
  56. Scenario: Moderator trying to ban an invalid user
  57. Given user "participant1" creates room "room" (v4)
  58. | roomType | 3 |
  59. | roomName | room |
  60. And user "participant2" joins room "room" with 200 (v4)
  61. And user "participant1" bans user "participant3" from room "room" with 200 (v1)
  62. | internalNote | BannedInvalid |
  63. Scenario: Moderator trying to ban themselves
  64. Given user "participant1" creates room "room" (v4)
  65. | roomType | 3 |
  66. | roomName | room |
  67. And user "participant1" joins room "room" with 200 (v4)
  68. And user "participant1" bans user "participant1" from room "room" with 400 (v1)
  69. | internalNote | BannedP1 |
  70. Scenario: Moderator trying to ban moderator
  71. Given user "participant1" creates room "room" (v4)
  72. | roomType | 3 |
  73. | roomName | room |
  74. And user "participant1" joins room "room" with 200 (v4)
  75. And user "participant2" joins room "room" with 200 (v4)
  76. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  77. And user "participant1" promotes "participant2" in room "room" with 200 (v4)
  78. And user "participant1" bans user "participant2" from room "room" with 400 (v1)
  79. | internalNote | BannedP2 |
  80. And user "participant1" demotes "participant2" in room "room" with 200 (v4)
  81. And user "participant1" bans user "participant2" from room "room" with 200 (v1)
  82. | internalNote | BannedP2 |
  83. And user "participant1" sees the following bans in room "room" with 200 (v1)
  84. | moderatorActorType | moderatorActorId | moderatorDisplayName | bannedActorType | bannedActorId | bannedDisplayName | internalNote |
  85. | users | participant1 | participant1-displayname | users | participant2 | participant2-displayname | BannedP2 |