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.

546 lines
34 KiB

  1. Feature: chat/notifications
  2. Background:
  3. Given user "participant1" exists
  4. Given user "participant2" exists
  5. And group "attendees1" exists
  6. And user "participant2" is member of group "attendees1"
  7. Scenario: Normal message when recipient is online in the one-to-one
  8. When user "participant1" creates room "one-to-one room" (v4)
  9. | roomType | 1 |
  10. | invite | participant2 |
  11. Given user "participant1" sets session state to 2 in room "one-to-one room" with 404 (v4)
  12. Given user "participant2" joins room "one-to-one room" with 200 (v4)
  13. When user "participant1" sends message "Message 1" to room "one-to-one room" with 201
  14. Then user "participant2" has the following notifications
  15. | app | object_type | object_id | subject |
  16. Scenario: Normal message when recipient is online but inactive
  17. When user "participant1" creates room "one-to-one room" (v4)
  18. | roomType | 1 |
  19. | invite | participant2 |
  20. # Join and leave to clear the invite notification
  21. Given user "participant2" joins room "one-to-one room" with 200 (v4)
  22. Given user "participant2" sets session state to 2 in room "one-to-one room" with 400 (v4)
  23. When user "participant1" sends message "Message 1" to room "one-to-one room" with 201
  24. Given user "participant2" sets session state to 0 in room "one-to-one room" with 200 (v4)
  25. When user "participant1" sends message "Message 2" to room "one-to-one room" with 201
  26. Given user "participant2" sets session state to 1 in room "one-to-one room" with 200 (v4)
  27. When user "participant1" sends message "Message 3" to room "one-to-one room" with 201
  28. Then user "participant2" has the following notifications
  29. | app | object_type | object_id | subject |
  30. | spreed | chat | one-to-one room/Message 2 | participant1-displayname sent you a private message |
  31. Scenario: Normal message when recipient is offline in the one-to-one
  32. When user "participant1" creates room "one-to-one room" (v4)
  33. | roomType | 1 |
  34. | invite | participant2 |
  35. # Join and leave to clear the invite notification
  36. Given user "participant2" joins room "one-to-one room" with 200 (v4)
  37. Given user "participant2" leaves room "one-to-one room" with 200 (v4)
  38. When user "participant1" sends message "Message 1" to room "one-to-one room" with 201
  39. Then user "participant2" has the following notifications
  40. | app | object_type | object_id | subject |
  41. | spreed | chat | one-to-one room/Message 1 | participant1-displayname sent you a private message |
  42. Then user "participant2" sees the following messages in room "one-to-one room" with 200
  43. | room | actorType | actorId | actorDisplayName | message | messageParameters | silent |
  44. | one-to-one room | users | participant1 | participant1-displayname | Message 1 | [] | !ISSET |
  45. Scenario: Silent sent message when recipient is offline in the one-to-one
  46. When user "participant1" creates room "one-to-one room" (v4)
  47. | roomType | 1 |
  48. | invite | participant2 |
  49. # Join and leave to clear the invite notification
  50. Given user "participant2" joins room "one-to-one room" with 200 (v4)
  51. Given user "participant2" leaves room "one-to-one room" with 200 (v4)
  52. When user "participant1" silent sends message "Message 1" to room "one-to-one room" with 201
  53. Then user "participant2" has the following notifications
  54. | app | object_type | object_id | subject |
  55. Then user "participant2" sees the following messages in room "one-to-one room" with 200
  56. | room | actorType | actorId | actorDisplayName | message | messageParameters | silent |
  57. | one-to-one room | users | participant1 | participant1-displayname | Message 1 | [] | true |
  58. Scenario: Normal message when recipient disabled notifications in the one-to-one
  59. When user "participant1" creates room "one-to-one room" (v4)
  60. | roomType | 1 |
  61. | invite | participant2 |
  62. # Join and leave to clear the invite notification
  63. Given user "participant2" joins room "one-to-one room" with 200 (v4)
  64. Given user "participant2" leaves room "one-to-one room" with 200 (v4)
  65. And user "participant2" sets notifications to disabled for room "one-to-one room" (v4)
  66. When user "participant1" sends message "Message 1" to room "one-to-one room" with 201
  67. Then user "participant2" has the following notifications
  68. | app | object_type | object_id | subject |
  69. Scenario: Mention when recipient is online in the one-to-one
  70. When user "participant1" creates room "one-to-one room" (v4)
  71. | roomType | 1 |
  72. | invite | participant2 |
  73. Given user "participant2" joins room "one-to-one room" with 200 (v4)
  74. When user "participant1" sends message "Hi @participant2 bye" to room "one-to-one room" with 201
  75. Then user "participant2" has the following notifications
  76. | app | object_type | object_id | subject |
  77. | spreed | chat | one-to-one room/Hi @participant2 bye | participant1-displayname mentioned you in a private conversation |
  78. Scenario: Mention when recipient is offline in the one-to-one
  79. When user "participant1" creates room "one-to-one room" (v4)
  80. | roomType | 1 |
  81. | invite | participant2 |
  82. # Join and leave to clear the invite notification
  83. Given user "participant2" joins room "one-to-one room" with 200 (v4)
  84. Given user "participant2" leaves room "one-to-one room" with 200 (v4)
  85. When user "participant1" sends message "Hi @participant2 bye" to room "one-to-one room" with 201
  86. Then user "participant2" has the following notifications
  87. | app | object_type | object_id | subject |
  88. | spreed | chat | one-to-one room/Hi @participant2 bye | participant1-displayname mentioned you in a private conversation |
  89. Scenario: Mention when recipient disabled notifications in the one-to-one
  90. When user "participant1" creates room "one-to-one room" (v4)
  91. | roomType | 1 |
  92. | invite | participant2 |
  93. # Join and leave to clear the invite notification
  94. Given user "participant2" joins room "one-to-one room" with 200 (v4)
  95. Given user "participant2" leaves room "one-to-one room" with 200 (v4)
  96. And user "participant2" sets notifications to disabled for room "one-to-one room" (v4)
  97. When user "participant1" sends message "Hi @participant2 bye" to room "one-to-one room" with 201
  98. Then user "participant2" has the following notifications
  99. | app | object_type | object_id | subject |
  100. Scenario: Reaction in the one-to-one
  101. When user "participant1" creates room "one-to-one room" (v4)
  102. | roomType | 1 |
  103. | invite | participant2 |
  104. # Join and leave to clear the invite notification
  105. Given user "participant2" joins room "one-to-one room" with 200 (v4)
  106. Given user "participant2" leaves room "one-to-one room" with 200 (v4)
  107. When user "participant2" sends message "Message 1" to room "one-to-one room" with 201
  108. And user "participant1" react with "🚀" on message "Message 1" to room "one-to-one room" with 201
  109. Then user "participant2" has the following notifications
  110. | app | object_type | object_id | subject |
  111. | spreed | chat | one-to-one room/Message 1 | participant1-displayname reacted with 🚀 to your private message |
  112. Scenario: Reaction when recipient disabled notifications in the one-to-one
  113. When user "participant1" creates room "one-to-one room" (v4)
  114. | roomType | 1 |
  115. | invite | participant2 |
  116. # Join and leave to clear the invite notification
  117. Given user "participant2" joins room "one-to-one room" with 200 (v4)
  118. Given user "participant2" leaves room "one-to-one room" with 200 (v4)
  119. When user "participant2" sends message "Message 1" to room "one-to-one room" with 201
  120. And user "participant2" sets notifications to disabled for room "one-to-one room" (v4)
  121. And user "participant1" react with "🚀" on message "Message 1" to room "one-to-one room" with 201
  122. Then user "participant2" has the following notifications
  123. | app | object_type | object_id | subject |
  124. Scenario: At-all when recipient is online in the one-to-one
  125. When user "participant1" creates room "one-to-one room" (v4)
  126. | roomType | 1 |
  127. | invite | participant2 |
  128. Given user "participant2" joins room "one-to-one room" with 200 (v4)
  129. When user "participant1" sends message "Hi @all bye" to room "one-to-one room" with 201
  130. Then user "participant2" has the following notifications
  131. | app | object_type | object_id | subject |
  132. | spreed | chat | one-to-one room/Hi @all bye | participant1-displayname mentioned you in a private conversation |
  133. Scenario: At-all when recipient is offline in the one-to-one
  134. When user "participant1" creates room "one-to-one room" (v4)
  135. | roomType | 1 |
  136. | invite | participant2 |
  137. # Join and leave to clear the invite notification
  138. Given user "participant2" joins room "one-to-one room" with 200 (v4)
  139. Given user "participant2" leaves room "one-to-one room" with 200 (v4)
  140. When user "participant1" sends message "Hi @all bye" to room "one-to-one room" with 201
  141. Then user "participant2" has the following notifications
  142. | app | object_type | object_id | subject |
  143. | spreed | chat | one-to-one room/Hi @all bye | participant1-displayname mentioned you in a private conversation |
  144. Scenario: At-all when recipient disabled notifications in the one-to-one
  145. When user "participant1" creates room "one-to-one room" (v4)
  146. | roomType | 1 |
  147. | invite | participant2 |
  148. # Join and leave to clear the invite notification
  149. Given user "participant2" joins room "one-to-one room" with 200 (v4)
  150. Given user "participant2" leaves room "one-to-one room" with 200 (v4)
  151. And user "participant2" sets notifications to disabled for room "one-to-one room" (v4)
  152. When user "participant1" sends message "Hi @all bye" to room "one-to-one room" with 201
  153. Then user "participant2" has the following notifications
  154. | app | object_type | object_id | subject |
  155. Scenario: Normal message when recipient is online in the group room
  156. When user "participant1" creates room "room" (v4)
  157. | roomType | 2 |
  158. | roomName | room |
  159. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  160. Given user "participant2" joins room "room" with 200 (v4)
  161. When user "participant1" sends message "Message 1" to room "room" with 201
  162. Then user "participant2" has the following notifications
  163. | app | object_type | object_id | subject |
  164. Scenario: Normal message when recipient is offline in the group room
  165. When user "participant1" creates room "room" (v4)
  166. | roomType | 2 |
  167. | roomName | room |
  168. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  169. # Join and leave to clear the invite notification
  170. Given user "participant2" joins room "room" with 200 (v4)
  171. Given user "participant2" leaves room "room" with 200 (v4)
  172. When user "participant1" sends message "Message 1" to room "room" with 201
  173. Then user "participant2" has the following notifications
  174. | app | object_type | object_id | subject |
  175. Scenario: Normal message when recipient with all notifications in the group room
  176. When user "participant1" creates room "room" (v4)
  177. | roomType | 2 |
  178. | roomName | room |
  179. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  180. # Join and leave to clear the invite notification
  181. Given user "participant2" joins room "room" with 200 (v4)
  182. Given user "participant2" leaves room "room" with 200 (v4)
  183. And user "participant2" sets notifications to all for room "room" (v4)
  184. When user "participant1" sends message "Message 1" to room "room" with 201
  185. Then user "participant2" has the following notifications
  186. | app | object_type | object_id | subject |
  187. | spreed | chat | room/Message 1 | participant1-displayname sent a message in conversation room |
  188. Scenario: Mention when recipient is online in the group room
  189. When user "participant1" creates room "room" (v4)
  190. | roomType | 2 |
  191. | roomName | room |
  192. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  193. Given user "participant2" joins room "room" with 200 (v4)
  194. When user "participant1" sends message "Hi @participant2 bye" to room "room" with 201
  195. Then user "participant2" has the following notifications
  196. | app | object_type | object_id | subject |
  197. | spreed | chat | room/Hi @participant2 bye | participant1-displayname mentioned you in conversation room |
  198. Scenario: Silent mention when recipient is online in the group room
  199. When user "participant1" creates room "room" (v4)
  200. | roomType | 2 |
  201. | roomName | room |
  202. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  203. # Join and leave to clear the invite notification
  204. Given user "participant2" joins room "room" with 200 (v4)
  205. Given user "participant2" leaves room "room" with 200 (v4)
  206. When user "participant1" silent sends message "Hi @participant2 bye" to room "room" with 201
  207. Then user "participant2" has the following notifications
  208. | app | object_type | object_id | subject |
  209. Scenario: Mention when recipient is offline in the group room
  210. When user "participant1" creates room "room" (v4)
  211. | roomType | 2 |
  212. | roomName | room |
  213. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  214. # Join and leave to clear the invite notification
  215. Given user "participant2" joins room "room" with 200 (v4)
  216. Given user "participant2" leaves room "room" with 200 (v4)
  217. When user "participant1" sends message "Hi @participant2 bye" to room "room" with 201
  218. Then user "participant2" has the following notifications
  219. | app | object_type | object_id | subject |
  220. | spreed | chat | room/Hi @participant2 bye | participant1-displayname mentioned you in conversation room |
  221. Scenario: Mention when recipient with disabled notifications in the group room
  222. When user "participant1" creates room "room" (v4)
  223. | roomType | 2 |
  224. | roomName | room |
  225. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  226. # Join and leave to clear the invite notification
  227. Given user "participant2" joins room "room" with 200 (v4)
  228. Given user "participant2" leaves room "room" with 200 (v4)
  229. And user "participant2" sets notifications to disabled for room "room" (v4)
  230. When user "participant1" sends message "Hi @participant2 bye" to room "room" with 201
  231. Then user "participant2" has the following notifications
  232. | app | object_type | object_id | subject |
  233. Scenario: At-all when recipient is online in the group room
  234. When user "participant1" creates room "room" (v4)
  235. | roomType | 2 |
  236. | roomName | room |
  237. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  238. Given user "participant2" joins room "room" with 200 (v4)
  239. When user "participant1" sends message "Hi @all bye" to room "room" with 201
  240. Then user "participant2" has the following notifications
  241. | app | object_type | object_id | subject |
  242. | spreed | chat | room/Hi @all bye | participant1-displayname mentioned everyone in conversation room |
  243. Scenario: At-all when recipient is offline in the group room
  244. When user "participant1" creates room "room" (v4)
  245. | roomType | 2 |
  246. | roomName | room |
  247. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  248. # Join and leave to clear the invite notification
  249. Given user "participant2" joins room "room" with 200 (v4)
  250. Given user "participant2" leaves room "room" with 200 (v4)
  251. When user "participant1" sends message "Hi @all bye" to room "room" with 201
  252. Then user "participant2" has the following notifications
  253. | app | object_type | object_id | subject |
  254. | spreed | chat | room/Hi @all bye | participant1-displayname mentioned everyone in conversation room |
  255. Scenario: Silent at-all when recipient is offline in the group room
  256. When user "participant1" creates room "room" (v4)
  257. | roomType | 2 |
  258. | roomName | room |
  259. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  260. # Join and leave to clear the invite notification
  261. Given user "participant2" joins room "room" with 200 (v4)
  262. Given user "participant2" leaves room "room" with 200 (v4)
  263. When user "participant1" silent sends message "Hi @all bye" to room "room" with 201
  264. Then user "participant2" has the following notifications
  265. | app | object_type | object_id | subject |
  266. Scenario: At-all when recipient with disabled notifications in the group room
  267. When user "participant1" creates room "room" (v4)
  268. | roomType | 2 |
  269. | roomName | room |
  270. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  271. # Join and leave to clear the invite notification
  272. Given user "participant2" joins room "room" with 200 (v4)
  273. Given user "participant2" leaves room "room" with 200 (v4)
  274. And user "participant2" sets notifications to disabled for room "room" (v4)
  275. When user "participant1" sends message "Hi @all bye" to room "room" with 201
  276. Then user "participant2" has the following notifications
  277. | app | object_type | object_id | subject |
  278. Scenario: Group-mention when recipient is online in the group room
  279. When user "participant1" creates room "room" (v4)
  280. | roomType | 2 |
  281. | roomName | room |
  282. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  283. And user "participant1" adds group "attendees1" to room "room" with 200 (v4)
  284. Given user "participant2" joins room "room" with 200 (v4)
  285. When user "participant1" sends message 'Hi @"group/attendees1" bye' to room "room" with 201
  286. Then user "participant2" has the following notifications
  287. | app | object_type | object_id | subject |
  288. | spreed | chat | room/Hi @"group/attendees1" bye | participant1-displayname mentioned group attendees1 in conversation room |
  289. Scenario: Group-mention when group is not a member of the room
  290. When user "participant1" creates room "room" (v4)
  291. | roomType | 2 |
  292. | roomName | room |
  293. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  294. Given user "participant2" joins room "room" with 200 (v4)
  295. When user "participant1" sends message 'Hi @"group/attendees1" bye' to room "room" with 201
  296. Then user "participant2" has the following notifications
  297. | app | object_type | object_id | subject |
  298. Scenario: Group-mention when recipient is offline in the group room
  299. When user "participant1" creates room "room" (v4)
  300. | roomType | 2 |
  301. | roomName | room |
  302. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  303. And user "participant1" adds group "attendees1" to room "room" with 200 (v4)
  304. # Join and leave to clear the invite notification
  305. Given user "participant2" joins room "room" with 200 (v4)
  306. Given user "participant2" leaves room "room" with 200 (v4)
  307. When user "participant1" sends message 'Hi @"group/attendees1" bye' to room "room" with 201
  308. Then user "participant2" has the following notifications
  309. | app | object_type | object_id | subject |
  310. | spreed | chat | room/Hi @"group/attendees1" bye | participant1-displayname mentioned group attendees1 in conversation room |
  311. Scenario: Silent group-mention when recipient is offline in the group room
  312. When user "participant1" creates room "room" (v4)
  313. | roomType | 2 |
  314. | roomName | room |
  315. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  316. And user "participant1" adds group "attendees1" to room "room" with 200 (v4)
  317. # Join and leave to clear the invite notification
  318. Given user "participant2" joins room "room" with 200 (v4)
  319. Given user "participant2" leaves room "room" with 200 (v4)
  320. When user "participant1" silent sends message 'Hi @"group/attendees1" bye' to room "room" with 201
  321. Then user "participant2" has the following notifications
  322. | app | object_type | object_id | subject |
  323. Scenario: Group-mention when recipient with disabled notifications in the group room
  324. When user "participant1" creates room "room" (v4)
  325. | roomType | 2 |
  326. | roomName | room |
  327. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  328. And user "participant1" adds group "attendees1" to room "room" with 200 (v4)
  329. # Join and leave to clear the invite notification
  330. Given user "participant2" joins room "room" with 200 (v4)
  331. Given user "participant2" leaves room "room" with 200 (v4)
  332. And user "participant2" sets notifications to disabled for room "room" (v4)
  333. When user "participant1" sends message 'Hi @"group/attendees1" bye' to room "room" with 201
  334. Then user "participant2" has the following notifications
  335. | app | object_type | object_id | subject |
  336. Scenario: Replying with all mention types only gives a reply notification
  337. When user "participant1" creates room "room" (v4)
  338. | roomType | 2 |
  339. | roomName | room |
  340. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  341. And user "participant1" adds group "attendees1" to room "room" with 200 (v4)
  342. # Join and leave to clear the invite notification
  343. Given user "participant2" joins room "room" with 200 (v4)
  344. Given user "participant2" leaves room "room" with 200 (v4)
  345. When user "participant2" sends message "Hi part 1" to room "room" with 201
  346. When user "participant1" sends reply 'Hi @all @participant2 @"group/attendees1" bye' on message "Hi part 1" to room "room" with 201
  347. Then user "participant2" has the following notifications
  348. | app | object_type | object_id | subject |
  349. | spreed | chat | room/Hi @all @participant2 @"group/attendees1" bye | participant1-displayname replied to your message in conversation room |
  350. Scenario: Replying with a captioned file gives a reply notification
  351. When user "participant1" creates room "room" (v4)
  352. | roomType | 2 |
  353. | roomName | room |
  354. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  355. And user "participant1" adds group "attendees1" to room "room" with 200 (v4)
  356. # Join and leave to clear the invite notification
  357. Given user "participant2" joins room "room" with 200 (v4)
  358. Given user "participant2" leaves room "room" with 200 (v4)
  359. When user "participant2" sends message "Message 1" to room "room" with 201
  360. Then user "participant1" sees the following messages in room "room" with 200
  361. | room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
  362. | room | users | participant2 | participant2-displayname | Message 1 | [] | |
  363. When user "participant1" shares "welcome.txt" with room "room"
  364. | talkMetaData.caption | Caption 1-1 |
  365. | talkMetaData.replyTo | Message 1 |
  366. Then user "participant1" sees the following messages in room "room" with 200
  367. | room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
  368. | room | users | participant1 | participant1-displayname | Caption 1-1 | "IGNORE" | Message 1 |
  369. | room | users | participant2 | participant2-displayname | Message 1 | [] | |
  370. Then user "participant2" has the following notifications
  371. | app | object_type | object_id | subject |
  372. | spreed | chat | room/Caption 1-1 | participant1-displayname replied to your message in conversation room |
  373. Scenario: Mentions in captions trigger normal mention notifications
  374. When user "participant1" creates room "room" (v4)
  375. | roomType | 2 |
  376. | roomName | room |
  377. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  378. And user "participant1" adds group "attendees1" to room "room" with 200 (v4)
  379. # Join and leave to clear the invite notification
  380. Given user "participant2" joins room "room" with 200 (v4)
  381. Given user "participant2" leaves room "room" with 200 (v4)
  382. When user "participant1" shares "welcome.txt" with room "room"
  383. | talkMetaData.caption | @participant2 |
  384. Then user "participant1" sees the following messages in room "room" with 200
  385. | room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
  386. | room | users | participant1 | participant1-displayname | {mention-user1} | "IGNORE" | |
  387. Then user "participant2" has the following notifications
  388. | app | object_type | object_id | subject |
  389. | spreed | chat | room/{mention-user1} | participant1-displayname mentioned you in conversation room |
  390. Scenario: Delete notification when the message is deleted
  391. When user "participant1" creates room "one-to-one room" (v4)
  392. | roomType | 1 |
  393. | invite | participant2 |
  394. # Join and leave to clear the invite notification
  395. Given user "participant2" joins room "one-to-one room" with 200 (v4)
  396. And user "participant2" leaves room "one-to-one room" with 200 (v4)
  397. And user "participant1" sends message "Message 1" to room "one-to-one room" with 201
  398. Then user "participant2" has the following notifications
  399. | app | object_type | object_id | subject |
  400. | spreed | chat | one-to-one room/Message 1 | participant1-displayname sent you a private message |
  401. When user "participant1" deletes message "Message 1" from room "one-to-one room" with 200 (v1)
  402. Then user "participant2" has the following notifications
  403. | app | object_type | object_id | subject |
  404. Scenario: Reaction when recipient full enables notifications in the group room
  405. When user "participant1" creates room "room" (v4)
  406. | roomType | 2 |
  407. | roomName | room |
  408. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  409. # Join and leave to clear the invite notification
  410. Given user "participant2" joins room "room" with 200 (v4)
  411. Given user "participant2" leaves room "room" with 200 (v4)
  412. When user "participant2" sends message "Message 1" to room "room" with 201
  413. And user "participant2" sets notifications to all for room "room" (v4)
  414. And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
  415. Then user "participant2" has the following notifications
  416. | app | object_type | object_id | subject |
  417. | spreed | chat | room/Message 1 | participant1-displayname reacted with 🚀 to your message in conversation room |
  418. Scenario: Reaction when recipient has default notifications (disabled) in the group room
  419. When user "participant1" creates room "room" (v4)
  420. | roomType | 2 |
  421. | roomName | room |
  422. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  423. # Join and leave to clear the invite notification
  424. Given user "participant2" joins room "room" with 200 (v4)
  425. Given user "participant2" leaves room "room" with 200 (v4)
  426. When user "participant2" sends message "Message 1" to room "room" with 201
  427. And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
  428. Then user "participant2" has the following notifications
  429. | app | object_type | object_id | subject |
  430. Scenario: Lobby: No notifications while being blocked by the lobby
  431. Given user "participant1" creates room "room" (v4)
  432. | roomType | 2 |
  433. | roomName | room |
  434. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  435. # Join and leave to clear the invite notification
  436. And user "participant2" joins room "room" with 200 (v4)
  437. And user "participant2" leaves room "room" with 200 (v4)
  438. And user "participant2" sends message "Message 1" to room "room" with 201
  439. And user "participant2" sets notifications to all for room "room" (v4)
  440. And user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
  441. When user "participant1" sends message "Hi @all bye" to room "room" with 201
  442. And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
  443. When user "participant1" sends message "Hi @participant2" to room "room" with 201
  444. Then user "participant2" has the following notifications
  445. | app | object_type | object_id | subject |
  446. Scenario: Lobby: Notifications for users that ignore the lobby
  447. Given user "participant1" creates room "room" (v4)
  448. | roomType | 2 |
  449. | roomName | room |
  450. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  451. # Join and leave to clear the invite notification
  452. And user "participant2" joins room "room" with 200 (v4)
  453. And user "participant2" leaves room "room" with 200 (v4)
  454. And user "participant2" sends message "Message 1" to room "room" with 201
  455. And user "participant2" sets notifications to all for room "room" (v4)
  456. And user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
  457. And user "participant1" sets permissions for "participant2" in room "room" to "L" with 200 (v4)
  458. And user "participant1" sends message "Hi @all bye" to room "room" with 201
  459. And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
  460. When user "participant1" sends message "Hi @participant2" to room "room" with 201
  461. Then user "participant2" has the following notifications
  462. | app | object_type | object_id | subject |
  463. | spreed | chat | room/Hi @participant2 | participant1-displayname mentioned you in conversation room |
  464. | spreed | chat | room/Message 1 | participant1-displayname reacted with 🚀 to your message in conversation room |
  465. | spreed | chat | room/Hi @all bye | participant1-displayname mentioned everyone in conversation room |
  466. Scenario: Lobby: Notifications for moderators
  467. Given user "participant1" creates room "room" (v4)
  468. | roomType | 2 |
  469. | roomName | room |
  470. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  471. # Join and leave to clear the invite notification
  472. And user "participant2" joins room "room" with 200 (v4)
  473. And user "participant2" leaves room "room" with 200 (v4)
  474. And user "participant2" sends message "Message 1" to room "room" with 201
  475. And user "participant2" sets notifications to all for room "room" (v4)
  476. And user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
  477. And user "participant1" promotes "participant2" in room "room" with 200 (v4)
  478. And user "participant1" sends message "Hi @all bye" to room "room" with 201
  479. And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
  480. When user "participant1" sends message "Hi @participant2" to room "room" with 201
  481. Then user "participant2" has the following notifications
  482. | app | object_type | object_id | subject |
  483. | spreed | chat | room/Hi @participant2 | participant1-displayname mentioned you in conversation room |
  484. | spreed | chat | room/Message 1 | participant1-displayname reacted with 🚀 to your message in conversation room |
  485. | spreed | chat | room/Hi @all bye | participant1-displayname mentioned everyone in conversation room |
  486. Scenario: Lobby: Wipe notifications when being blocked by the lobby
  487. Given user "participant1" creates room "room" (v4)
  488. | roomType | 2 |
  489. | roomName | room |
  490. And user "participant1" adds user "participant2" to room "room" with 200 (v4)
  491. # Join and leave to clear the invite notification
  492. And user "participant2" joins room "room" with 200 (v4)
  493. And user "participant2" leaves room "room" with 200 (v4)
  494. And user "participant2" sends message "Message 1" to room "room" with 201
  495. And user "participant2" sets notifications to all for room "room" (v4)
  496. And user "participant1" sends message "Hi @all bye" to room "room" with 201
  497. And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
  498. And user "participant1" sends message "Hi @participant2" to room "room" with 201
  499. Then user "participant2" has the following notifications
  500. | app | object_type | object_id | subject |
  501. | spreed | chat | room/Hi @participant2 | participant1-displayname mentioned you in conversation room |
  502. | spreed | chat | room/Message 1 | participant1-displayname reacted with 🚀 to your message in conversation room |
  503. | spreed | chat | room/Hi @all bye | participant1-displayname mentioned everyone in conversation room |
  504. When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
  505. Then user "participant2" has the following notifications
  506. | app | object_type | object_id | subject |