Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Test cases for Scheduled Message feature #183

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions data/test-by-folder.json
Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,16 @@
"Webapp: Nickname - Add"
]
},
{
"folder": "channels/schedule-messages",
"tests": [
"Verify User can Delete a scheduled message in DM/GM/Channel",
"Verify User can Edit a scheduled message in DM/GM/Channel",
"Verify User can create a scheduled message in DM/GM/Channel",
"Verify User can identify the cases for Failed scheduled message",
"Verify if the Failed Scheduled message is sent out after server recovered from and Outage issue"
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
]
},
{
"folder": "channels/scroll",
"tests": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
# (Required) Ensure all values are filled up
name: "Verify User can create a scheduled message in DM/GM/Channel"
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
status: Active
priority: Normal
folder: Schedule Messages
authors: "@yasserfaraazkhan"
team_ownership:
- ICU
priority_p1_to_p4: P2 - Core Functions (Do core functions work?)
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved

# (Optional)
location: null
component: null
tags: []
labels: []
tested_by_contributor: ''

# (Optional) Test type and tools
cypress: N/A
detox: N/A
mmctl: N/A
playwright: N/A
rainforest: []
manual_test_environments: []

# Do not change
id: null
key: null
created_on: null
last_updated: null
case_hashed: null
steps_hashed: null
---

**Step 1**

### Scenario 1: Able to schedule a message to a future Date in GM/Channel
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved

Steps:

1. Log into User's account.
2. Type a message in the GM/Channel post text box.
3. Click on the Dropdown beside Send button.
4. Choose a pre-defined Date from the options.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we verify the timezone behavior for scheduling? I believe the expected behavior is the date and time dialog is in the users configured timezone, can you confirm @harshilsharma63 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats correct, it should be in the user's configured TZ, not the timezone of the browser.

5. Verify the message is scheduled and user can see one of the below mentioned message in the Channel
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
- If the message is scheduled for today, show “Messages scheduled for today at 3:00 PM.”
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
- If the message is scheduled for the next day, show “Messages scheduled for tomorrow at 3:00 PM.”
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
- If the message is scheduled within a week, show “Message scheduled for Monday at 3:00 PM.”
- If the message is scheduled >= 1 week, show “Message scheduled for Oct 16 at 3:00 PM.”
6. Verify User can see an option `See all scheduled messages`.
7. Click on `See all scheduled messages`.
8. Verify use is taken to Scheduled tab and can see the ccheduled messages.
9. The messages should have a tag `Scheduled` and the time mentioned and have one of the below message displayed
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
- If the message is scheduled for today, show “Send today at 3:00 PM”.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
- If the message is scheduled for the next day, show “Send tomorrow at 3:00 PM”
- If the message is scheduled within a week, show “Send Monday at 3:00 PM”
- If the message is scheduled >= 1 week, show “Send Oct 16 at 3:00 PM”

### Scenario 2: Able to schedule Multiple message in GM/Channel

1. Follow above steps to create one more scheduled message.
2. Verify User can see number of messages scheduled in a channel. Example: the user should see `2 messages scheduled to be sent. See all scheduled messages`.

### Scenario 3: Able to schedule a message in a DM.

1. Log into User's account.
2. Open a Dirent message with User A.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
3. Type a message in the text box.
4. Click on the Dropdown beside Send button. example: Tomorrow at 9:00 AM
- If the User A is in different timezone. the option should show `Tomorrow at 9:00 AM. 10:00 AM User A's time`.
5. Choose a pre-defined Date from the options.
6. Verify the message is scheduled and user can see the message `Your draft has been scheduled for tomorrow at 9:00 AM <current user's time zone>`.
7. Click on `See all scheduled messages`.
8. Verify use is taken to Scheduled tab and can see the Scheduled message.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved

### Scenario 4: Able to schedule a message on a custom time in GM/Channel

1. Log into User's account.
2. Type a message in the GM/Channel post text box.
3. Click on the Dropdown beside Send button.
4. Click on `Choose a custom time`.
5. Verify a modal is opened and by default the date is set to `Tomorrow` and time is `09:00 AM`
- If its a DM then the Modal should show time on which user will receive the message. Example: `<Day> at <time> for Username`.
6. Click on `See all scheduled messages`.
7. Verify use is taken to Scheduled tab and can see the Scheduled message.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved

### Scenario 5: Able to schedule a message within a Threaded message

1. Log into User's account.
2. Create a threaded post in a Channel.
3. Open the thread on the RHS.
4. Schedule a message.
5. Verify user can see a message saying `You have <#Number> scheduled message. <link> See all <link>`
6. Goto Threads page.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
7. Open the thread where above message is scheduled.
8. Verify user can see on of the below message
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
- If the message is scheduled for today, show “Messages scheduled for today at 3:00 PM.”
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
- If the message is scheduled for the next day, show “Messages scheduled for tomorrow at 3:00 PM.”
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
- If the message is scheduled within a week, show “Message scheduled for Monday at 3:00 PM.”
- If the message is scheduled >= 1 week, show “Message scheduled for Oct 16 at 3:00 PM.”
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
# (Required) Ensure all values are filled up
name: "Verify User can Edit a scheduled message in DM/GM/Channel"
status: Active
priority: Normal
folder: Schedule Messages
authors: "@yasserfaraazkhan"
team_ownership:
- ICU
priority_p1_to_p4: P2 - Core Functions (Do core functions work?)
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved

# (Optional)
location: null
component: null
tags: []
labels: []
tested_by_contributor: ''

# (Optional) Test type and tools
cypress: N/A
detox: N/A
mmctl: N/A
playwright: N/A
rainforest: []
manual_test_environments: []

# Do not change
id: null
key: null
created_on: null
last_updated: null
case_hashed: null
steps_hashed: null
---

**Step 1**

Prerequisites:

1. Should have scheduled messages in a DM/GM/Channel.

### Scenario 1: Able to Edit the contents of a scheduled message.

Steps:

1. Log into User's account.
2. Goto `Scheduled` tab under drafts page.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
3. Hover on the message you want to edit.
4. Click on `Edit` icon.
5. Update the post text.
6. Click on Save.
7. Verify the post is updated.

### Scenario 2: Able to reschedule the time.

Steps:

1.
1. Log into User's account.
2. Goto `Scheduled` tab under drafts page.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
3. Hover on the message you want to edit.
4. Click on `Reschedule` icon.
5. Verify a Modal is opened.
6. Update the date and time to something in future.
7. Click on Save button.
8. Verify the Scheduled message time is updated to a future date.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
# (Required) Ensure all values are filled up
name: "Verify User can Delete a scheduled message in DM/GM/Channel"
status: Active
priority: Normal
folder: Schedule Messages
authors: "@yasserfaraazkhan"
team_ownership:
- ICU
priority_p1_to_p4: P2 - Core Functions (Do core functions work?)
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved

# (Optional)
location: null
component: null
tags: []
labels: []
tested_by_contributor: ''

# (Optional) Test type and tools
cypress: N/A
detox: N/A
mmctl: N/A
playwright: N/A
rainforest: []
manual_test_environments: []

# Do not change
id: null
key: null
created_on: null
last_updated: null
case_hashed: null
steps_hashed: null
---

**Step 1**

Prerequisites:

1. Should have scheduled messages in a DM/GM/Channel.

### Scenario 1: Able to Delete the scheduled message.

Steps:

1. Log into User's account.
2. Goto `Scheduled` tab under drafts page.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
3. Hover on the message you want to edit.
4. Click on `Delete` icon.
5. Verify a confirmation prompt is shown.
6. Click on `Confirm` button.
7. Verify the post is deleted.
8. Goto Channel and verify the Number of scheduled message is reduced.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
# (Required) Ensure all values are filled up
name: "Verify User can identify the cases for Failed scheduled message"
status: Active
priority: Normal
folder: Schedule Messages
authors: "@yasserfaraazkhan"
team_ownership:
- ICU
priority_p1_to_p4: P2 - Core Functions (Do core functions work?)
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved

# (Optional)
location: null
component: null
tags: []
labels: []
tested_by_contributor: ''

# (Optional) Test type and tools
cypress: N/A
detox: N/A
mmctl: N/A
playwright: N/A
rainforest: []
manual_test_environments: []

# Do not change
id: null
key: null
created_on: null
last_updated: null
case_hashed: null
steps_hashed: null
---

**Step 1**

Prerequisites:

1. Should have scheduled messages in a DM/GM/Channel.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved

### Scenario 1: Should not send message if User is not in the Channel anymore.

Steps:

1. Log into User's account.
2. Leave the channel where a message was scheduled to be sent.
3. Goto Scheduled Tab in Drafts page.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
4. Verify the Error message is on the top of the list.
5. Verify there is a Header `<number> of your scheduled drafts cannot be sent`.
6. Verify the User can see Error message `You’re not a member anymore of the channel.`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that how the message is phrased? Seems like it could be more like "You are not a member of the channel anymore" or "You are no longer a member of the channel."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think yes.
I'll check with @harshilsharma63 and @abhijit-singh if this message can be changed.

7. Verify the message has a tag `Not in the channel` in red alert.

### Scenario 2: Should not send message if Channel is Archived.

1. Log into User's account.
2. Archive the channel where a message was scheduled to be sent.
3. Goto Scheduled Tab in Drafts page.
4. Verify the User can see Error message `Channel is archived`.
5. Verify the message has a tag `Channel is archived` in red alert.

### Scenario 3: Should not send message if Channel is Read-only.

1. Log into Admin's account.
2. Goto Channel settings.
3. Disable `Create Posts` permission for the channel.
4. Log into User's account.
5. Goto Scheduled Tab in Drafts page.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
6. Verify the User can see Error message `Channel is now read only`.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
7. Verify the message has a tag `Channel is read only` in red alert.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved

### Scenario 4: Should not send message if User is removed from a Private Channel.

1. Log into User's account.
2. Leave the Private channel where User had some scheduled messages.
3. Goto Scheduled Tab in Drafts page.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
4. Verify the message has a tag `Not in the channel` in red alert.
5. Verify the User can see `No Channel` in the Channels section.

### Scenario 5: Verify LHS Count displayed when scheduled message fails to be sent.

1. Log into User's account.
2. Verify there is no error icon near Drafts on the LHS
3. Leave the channel where a message was scheduled to be sent.
4. Verify the user can see Error icon in red color.
5. Hover on the Icon a tooltip saying `One of your scheduled drafts cannot be sent`.
6. Goto Scheduled Tab in Drafts page.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
7. Hoven on the Failed message and delete it.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
8. Verify the Error message is not shown on the LHS anymore.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
# (Required) Ensure all values are filled up
name: "Verify if the Failed Scheduled message is sent out after server recovered from and Outage issue"
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
status: Active
priority: Normal
folder: Schedule Messages
authors: "@yasserfaraazkhan"
team_ownership:
- ICU
priority_p1_to_p4: P2 - Core Functions (Do core functions work?)
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved

# (Optional)
location: null
component: null
tags: []
labels: []
tested_by_contributor: ''

# (Optional) Test type and tools
cypress: N/A
detox: N/A
mmctl: N/A
playwright: N/A
rainforest: []
manual_test_environments: []

# Do not change
id: null
key: null
created_on: null
last_updated: null
case_hashed: null
steps_hashed: null
---

**Step 1**

Prerequisites:

1. Should have scheduled messages in a DM/GM/Channel.

### Scenario 1: The server recovers within a timestamp of 30 minutes and the message is sent out

Steps:

1. Log into User's account.
2. Simulate server outage for a time period when the message was scheduled.
- Option 1: User Jmeter or k6 tool to generate huge traffic on the server.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
- Option 2: If the instance is created using Cloud plugin, try options like `--database` or `hibernate`
3. Wait till the scheduled message fails due to server outage
4. Once the serer recovers, Verify if the scheduled message is sent out within 30 mins.

### Scenario 2: The server does not recover within a timestamp of 30 minutes. Messages is marked as Failed.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved

1. Log into User's account.
2. Simulate server outage for a longer time period when the message was scheduled.
3. Verify that the message is not sent to the channel.
4. Hover on the message.
5. Verify User only gets option to Copy text and Delete option.
Loading