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
2022-08-25 08:27:20 +00:00
Then t h e 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-07-28 18:58:19 +00:00
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-08-12 13:10:20 +00:00
Scenario : User can edit a 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 |
| E d i t m e |
2022-08-25 08:27:20 +00:00
When t h e u s e r e d i t s t h e m e s s a g e a t i n d e x 0 a n d c h a n g e s i t t o " E d i t e d b y m e "
2022-08-12 13:10:20 +00:00
Then t h e m e s s a g e ( e d i t e d ) 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-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-19 14:57:09 +00:00
Then t h e 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-15 17:16:01 +00:00
Scenario : User can clear chat history
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 |
| 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 ? |
When t h e u s e r c l e a r s c h a t h i s t o r y
Then t h e c h a t i s c l e a r e d
2022-08-25 08:27:20 +00:00
2022-08-12 12:11:57 +00:00
Scenario : User can send a gif
2022-09-15 16:32:14 +00:00
When t h e u s e r o p e n s t h e c h a t s e c t i o n
And 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
Then T h e u s e r i s a b l e t o s e n d a g i f m e s s a g e
When t h e u s e r o p e n s a p p s e t t i n g s s c r e e n
And t h e u s e r o p e n s t h e m e s s a g i n g s e t t i n g s
Then t e n o r G I F s p r e v i e w i s e n a b l e d
Scenario Outline : User can activate image unfurling
When t h e u s e r o p e n s t h e c h a t s e c t i o n
And 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
And t h e u s e r s e n d s t h e c h a t m e s s a g e <image_url>
Then t h e i m a g e <image_url> i s n o t u n f u r l e d i n t h e c h a t
When t h e u s e r o p e n s a p p s e t t i n g s s c r e e n f r o m c h a t
And t h e u s e r o p e n s t h e m e s s a g i n g s e t t i n g s
And t h e u s e r a c t i v a t e s l i n k p r e v i e w
And t h e u s e r a c t i v a t e s i m a g e u n f u r l i n g
And t h e u s e r o p e n s t h e c h a t s e c t i o n
Then t h e i m a g e <image_url> i s u n f u r l e d i n t h e c h a t
Examples :
| i m a g e _ u r l |
| h t t p s : / / g i t h u b . c o m / s t a t u s - i m / s t a t u s - d e s k t o p / r a w / m a s t e r / t e s t / u i - t e s t / f i x t u r e s / i m a g e s / d o g g o . j p e g |
2022-08-25 08:27:20 +00:00
2022-08-17 14:47:06 +00:00
Scenario : The user is able to use emoji suggestions
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 t h e u s e r t y p e s " h e l l o : t h u m b s "
Then t h e u s e r s e l e c t s e m o j i i n t h e s u g g e s t i o n l i s t
When t h e u s e r p r e s s e d e n t e r
2022-08-25 08:27:20 +00:00
Then t h e m e s s a g e 👍 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-15 17:16:01 +00:00
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
2022-08-25 08:27:20 +00:00
Then t h e 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-18 07:27:57 +00:00
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 |
2022-08-25 08:27:20 +00:00
2022-08-19 11:54:20 +00:00
Scenario : User can type message with emoji autoreplace
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
Then t h e 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 " H e l l o : ) "
2022-08-30 14:14:04 +00:00
Then t h e m e s s a g e 🙂 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 H e l l o 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-11 19:16:59 +00:00
Scenario : User can send a sticker after installing a free pack
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
Then t h e u s e r c a n i n s t a l l t h e s t i c k e r p a c k a t p o s i t i o n 4
Then t h e u s e r c a n s e n d t h e s t i c k e r a t p o s i t i o n 2 i n t h e l i s t