2022-06-07 15:19:52 +00:00
# This is a sample .feature file
# Squish feature files use the Gherkin language for describing features, a short example
# is given below. You can find a more extensive introduction to the Gherkin format at
# https://cucumber.io/docs/gherkin/reference/
Feature : Status Desktop Chat
2022-08-10 06:57:34 +00:00
# TODO The complete feature / all scenarios have a chance to fail since they rely on the mailserver (at least, to verify a chat is loaded, something in the history needs to be displayed).
A s a u s e r I w a n t t o j o i n a r o o m a n d c h a t a n d d o b a s i c i n t e r a c t i o n s .
2022-06-07 15:19:52 +00:00
T h e f o l l o w i n g s c e n a r i o s c o v e r b a s i c c h a t f l o w s .
Background :
Given A f i r s t t i m e u s e r l a n d s o n t h e s t a t u s d e s k t o p a n d g e n e r a t e s n e w k e y
2022-06-16 01:46:45 +00:00
When u s e r s i g n s u p w i t h u s e r n a m e t e s t e r 123 a n d p a s s w o r d T e s T E r 16843 / ! @ 00
2022-06-07 15:19:52 +00:00
Then t h e u s e r l a n d s o n t h e s i g n e d i n a p p
2022-08-10 06:57:34 +00:00
Scenario : User joins a public room and chats
2022-06-07 15:19:52 +00:00
When u s e r j o i n s c h a t r o o m t e s t
2022-06-07 23:37:11 +00:00
Then u s e r i s a b l e t o s e n d c h a t m e s s a g e
2022-06-07 23:47:19 +00:00
| m e s s a g e |
| H e l l o |
| H o w a r e y o u |
| I a m f r o m s t a t u s |
| t e l l m e h o w y o u d o ? |
2022-07-28 18:58:19 +00:00
2022-07-28 20:14:29 +00:00
2022-07-28 18:58:19 +00:00
Scenario : User can reply to their own message
When u s e r j o i n s c h a t r o o m t e s t
Then u s e r i s a b l e t o s e n d c h a t m e s s a g e
| m e s s a g e |
| R e p l y t o t h i s |
Then t h e u s e r c a n r e p l y t o t h e m e s s a g e a t i n d e x 0 w i t h " T h i s i s a r e p l y "
2022-07-28 20:14:29 +00:00
2022-08-12 18:55:06 +00:00
@mayfail
Scenario : User can reply to another user's message
When u s e r j o i n s c h a t r o o m t e s t
Then t h e u s e r c a n r e p l y t o t h e m e s s a g e a t i n d e x 0 w i t h " T h i s i s a r e p l y t o a n o t h e r u s e r "
2022-07-28 20:14:29 +00:00
Scenario : User joins a room and marks it as read
When u s e r j o i n s c h a t r o o m t e s t
Then t h e u s e r c a n m a r k t h e c h a n n e l t e s t a s r e a d
# TODO find a way to validate that it worked
2022-08-02 20:04:29 +00:00
Scenario : User can delete their own message
When u s e r j o i n s c h a t r o o m a u t o m a t i o n - t e s t
2022-08-05 19:52:34 +00:00
Then u s e r i s a b l e t o s e n d a r a n d o m c h a t m e s s a g e
2022-08-02 20:04:29 +00:00
Then t h e u s e r c a n d e l e t e t h e m e s s a g e a t i n d e x 0
2022-08-05 19:52:34 +00:00
Then t h e l a s t m e s s a g e i s n o t t h e r a n d o m m e s s a g e
2022-08-02 20:04:29 +00:00
2022-08-12 18:55:06 +00:00
@mayfail
Scenario : User cannot delete another user's message
When u s e r j o i n s c h a t r o o m t e s t
Then t h e u s e r c a n n o t d e l e t e t h e l a s t m e s s a g e
@mayfail
Scenario Outline : The user can do a mention
When u s e r j o i n s c h a t r o o m t e s t
And t h e u s e r i n p u t s a m e n t i o n t o <displayName> w i t h m e s s a g e <message>
Then t h e <displayName> m e n t i o n w i t h m e s s a g e <message> h a v e b e e n s e n t
Examples :
| d i s p l a y N a m e | m e s s a g e |
| t e s t e r 1 2 3 | t e s t i n g m e n t i o n |
@mayfail
Scenario Outline : The user can not do a mention to not existing users
When u s e r j o i n s c h a t r o o m t e s t
Then t h e u s e r c a n n o t i n p u t a m e n t i o n t o a n o t e x i s t i n g u s e r <displayName>
Examples :
| d i s p l a y N a m e |
| n o t E x i s t i n g A c c o u n t |
2022-08-12 18:42:06 +00:00
| a s d f g N o N o |
Scenario : User can send an emoji in a message
When u s e r j o i n s c h a t r o o m a u t o m a t i o n - t e s t
When u s e r s e n d s t h e e m o j i h e a r t _ e y e s a s a m e s s a g e
Then t h e e m o j i 😍 i s d i s p l a y e d i n t h e l a s t m e s s a g e
When u s e r s e n d s t h e e m o j i s u n g l a s s e s w i t h m e s s a g e w o w I ' m s o c o o l
Then t h e e m o j i 😎 i s d i s p l a y e d i n t h e l a s t m e s s a g e
And t h e m e s s a g e w o w I ' m s o c o o l i s d i s p l a y e d i n t h e l a s t m e s s a g e
2022-08-18 07:27:57 +00:00
Scenario : User sees chats sorted by most recent activity
When u s e r j o i n s c h a t r o o m f i r s t - c h a t
And u s e r j o i n s c h a t r o o m s e c o n d - c h a t
And u s e r j o i n s c h a t r o o m t h i r d - c h a t
Then u s e r c h a t s a r e s o r t e d a c c o r d i n g l y
| t h i r d - c h a t |
| s e c o n d - c h a t |
| f i r s t - c h a t |
When u s e r s w i t c h e s t o s e c o n d - c h a t c h a t
Then u s e r i s a b l e t o s e n d a r a n d o m c h a t m e s s a g e
And u s e r c h a t s a r e s o r t e d a c c o r d i n g l y
| s e c o n d - c h a t |
| t h i r d - c h a t |
| f i r s t - c h a t |