Skip to content

Commit

Permalink
feat: Test cases for Scheduled Message feature (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserfaraazkhan authored Oct 29, 2024
1 parent eac72e9 commit 31aeadd
Show file tree
Hide file tree
Showing 16 changed files with 712 additions and 2 deletions.
1 change: 1 addition & 0 deletions data/folder-by-parent.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"Multi-Team and DMs",
"Permalink Preview",
"Profile Settings",
"Schedule Messages",
"Scroll",
"Search",
"Search Date Filter",
Expand Down
9 changes: 9 additions & 0 deletions data/folders.json
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,15 @@
"fullNames": ["Channels", "Profile Settings"],
"fullPath": "channels/profile-settings"
},
{
"id": 18534840,
"parentId": 3142963,
"name": "Schedule Messages",
"index": 36,
"folderType": "TEST_CASE",
"fullNames": ["Channels", "Schedule Messages"],
"fullPath": "channels/schedule-messages"
},
{
"id": 404333,
"parentId": 3142963,
Expand Down
9 changes: 8 additions & 1 deletion data/key-and-path.json
Original file line number Diff line number Diff line change
Expand Up @@ -6311,5 +6311,12 @@
{ "key": "MM-T5639", "path": "mobile-v2/drafts", "id": 191284133 },
{ "key": "MM-T5640", "path": "desktop-app--native-specific-/landing-page", "id": 193404883 },
{ "key": "MM-T5641", "path": "notifications-banner", "id": 195498645 },
{ "key": "MM-T5642", "path": "notifications-banner", "id": 195498646 }
{ "key": "MM-T5642", "path": "notifications-banner", "id": 195498646 },
{ "key": "MM-T5643", "path": "channels/schedule-messages", "id": 195718903 },
{ "key": "MM-T5644", "path": "channels/schedule-messages", "id": 195718908 },
{ "key": "MM-T5645", "path": "channels/schedule-messages", "id": 195718911 },
{ "key": "MM-T5646", "path": "channels/schedule-messages", "id": 195718912 },
{ "key": "MM-T5647", "path": "channels/schedule-messages", "id": 195718913 },
{ "key": "MM-T5648", "path": "channels/schedule-messages", "id": 195718918 },
{ "key": "MM-T5649", "path": "channels/schedule-messages", "id": 195718920 }
]
12 changes: 12 additions & 0 deletions data/test-by-folder.json
Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,18 @@
"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 from the Drafts Page",
"Verify User can create a scheduled message in DM/GM/Channel",
"Verify User can identify the cases for failed scheduled message",
"Verify User can remove scheduled setting from a scheduled message",
"Verify if the Failed scheduled message is sent out after server recovered from an outage issue"
]
},
{
"folder": "channels/scroll",
"tests": [
Expand Down
1 change: 1 addition & 0 deletions data/test-cases-folders.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
"channels/multi-team-and-dms": "Multi-Team and DMs",
"channels/permalink-preview": "Permalink Preview",
"channels/profile-settings": "Profile Settings",
"channels/schedule-messages": "Schedule Messages",
"channels/scroll": "Scroll",
"channels/search": "Search",
"channels/search-date-filter": "Search Date Filter",
Expand Down
33 changes: 33 additions & 0 deletions data/test-cases-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4835,6 +4835,39 @@
}
]
},
{
"name": "Schedule Messages",
"routes": [
{
"name": "Verify User can create a scheduled message in DM/GM/Channel",
"file": "channels/schedule-messages/MM-T5643.md"
},
{
"name": "Verify User can Edit a scheduled message in DM/GM/Channel",
"file": "channels/schedule-messages/MM-T5644.md"
},
{
"name": "Verify User can Delete a scheduled message in DM/GM/Channel",
"file": "channels/schedule-messages/MM-T5645.md"
},
{
"name": "Verify User can identify the cases for failed scheduled message",
"file": "channels/schedule-messages/MM-T5646.md"
},
{
"name": "Verify if the Failed scheduled message is sent out after server recovered from an outage issue",
"file": "channels/schedule-messages/MM-T5647.md"
},
{
"name": "Verify User can create a scheduled message from the Drafts Page",
"file": "channels/schedule-messages/MM-T5648.md"
},
{
"name": "Verify User can remove scheduled setting from a scheduled message",
"file": "channels/schedule-messages/MM-T5649.md"
}
]
},
{
"name": "Scroll",
"routes": [
Expand Down
7 changes: 7 additions & 0 deletions data/test-cases-slugs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,13 @@
"channels/profile-settings/mm-t4656",
"channels/profile-settings/mm-t4914",
"channels/profile-settings/mm-t711",
"channels/schedule-messages/mm-t5643",
"channels/schedule-messages/mm-t5644",
"channels/schedule-messages/mm-t5645",
"channels/schedule-messages/mm-t5646",
"channels/schedule-messages/mm-t5647",
"channels/schedule-messages/mm-t5648",
"channels/schedule-messages/mm-t5649",
"channels/scroll/mm-t2365",
"channels/scroll/mm-t2366",
"channels/scroll/mm-t2367",
Expand Down
28 changes: 28 additions & 0 deletions data/test-cases-toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13888,6 +13888,34 @@
"name": "No Performance issues or channel locking",
"slug": "channels/scroll/mm-t2379"
},
"channels/schedule-messages/mm-t5648": {
"name": "Verify User can create a scheduled message from the Drafts Page",
"slug": "channels/schedule-messages/mm-t5648"
},
"channels/schedule-messages/mm-t5649": {
"name": "Verify User can remove scheduled setting from a scheduled message",
"slug": "channels/schedule-messages/mm-t5649"
},
"channels/schedule-messages/mm-t5646": {
"name": "Verify User can identify the cases for failed scheduled message",
"slug": "channels/schedule-messages/mm-t5646"
},
"channels/schedule-messages/mm-t5647": {
"name": "Verify if the Failed scheduled message is sent out after server recovered from an outage issue",
"slug": "channels/schedule-messages/mm-t5647"
},
"channels/schedule-messages/mm-t5643": {
"name": "Verify User can create a scheduled message in DM/GM/Channel",
"slug": "channels/schedule-messages/mm-t5643"
},
"channels/schedule-messages/mm-t5644": {
"name": "Verify User can Edit a scheduled message in DM/GM/Channel",
"slug": "channels/schedule-messages/mm-t5644"
},
"channels/schedule-messages/mm-t5645": {
"name": "Verify User can Delete a scheduled message in DM/GM/Channel",
"slug": "channels/schedule-messages/mm-t5645"
},
"channels/autocomplete/mm-t3393": {
"name": "RN apps: Autocomplete - Search",
"slug": "channels/autocomplete/mm-t3393"
Expand Down
2 changes: 1 addition & 1 deletion data/test-cases/channels/messaging/MM-T3319.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ key: MM-T3319
created_on: "2020-08-20T17:49:26Z"
last_updated: ""
case_hashed: 3bc7d5004be92ac6b96a05e397b28bd9f4fdeba390513f636c2d63f112583d705b4a74d1ba01fa1f403afe79d5418c6b
steps_hashed: a8a944c457ccda0b1139f8d6680092f1ad2c456c2f158bc20faa2ec77323a84fced6f1df26ba8aa4214f186155e5f895
steps_hashed: 6225261c601f271ab9f981220bc287f8bc1223a2c51a40da406ae9f94c8e79ef2e643edbdcd89a5aabfb0a05bca46ea9
---

<!-- (Auto-generated) Based on frontmatter's "key" and "name" -->
Expand Down
175 changes: 175 additions & 0 deletions data/test-cases/channels/schedule-messages/MM-T5643.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
---
# (Required) Ensure all values are filled up
name: "Verify User can create a scheduled message in DM/GM/Channel"
status: Active
priority: Normal
folder: Schedule Messages
authors: "@yasserfaraazkhan"
team_ownership:
- ICU
priority_p1_to_p4: P3 - Deep Functions (Do extensive scenarios work?)

# (Optional)
location: Messaging
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: 195718903
key: MM-T5643
created_on: "2024-10-24T08:45:27Z"
last_updated: "2024-10-24T14:15:26Z"
case_hashed: d05be8ac2af60609427fea7e4ee82f58a9343edc6037c08db842d12b7c2826b98fca93f58f5df52da8346998f5be98cb
steps_hashed: 13a9765fcfdaa0ac676509d3b411db184d528a1d71592358de836b41f9c07a7c992c08aba61ca2b18cf1b8aa3c71038b
---

<!-- (Auto-generated) Based on frontmatter's "key" and "name" -->

## MM-T5643: Verify User can create a scheduled message in DM/GM/Channel

---

**Step 1**

### Scenario 1: Able to schedule a message to a future Date in GM/Channel

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.

5. Verify the message is scheduled and user can see one of the below mentioned messages in the Channel

- If the message is scheduled for today, show “Message scheduled for today at 3:00 PM.”
- If the message is scheduled for the next day, show “Message scheduled for tomorrow at 3:00 PM.”
- 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 user is taken to Scheduled tab and can see the Scheduled messages.

9. The messages should have a tag `Scheduled` and the time mentioned and have one of the below messages displayed

- If the message is scheduled for today, show “Send today at 3:00 PM”
- 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 Direct message with User A.
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 user is taken to Scheduled tab and can see the Scheduled message.

### 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 user is taken to Scheduled tab and can see the Scheduled message.

### Scenario 5: Able to schedule a message within a Threaded message with no replies

1. Log into User's account.

2. Create a root 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. Go to Threads page.

7. Open the thread where above message is scheduled.

8. Verify user can see one of the below messages

- If the message is scheduled for today, show “Message scheduled for today at 3:00 PM.”
- If the message is scheduled for the next day, show “Message scheduled for tomorrow at 3:00 PM.”
- 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.”

9. Let the scheduled message be launched.

10. Verify the root post has scheduled message as a reply under it.

11. Verify the User is following the thread (based on the setting in System Console > Posts > Automatically Follow Threads)

### Scenario 6: Able to schedule a message with attachments

1. Log into User's account.
2. Create a threaded post with attachments like Image, Video, PDF in a Channel.
3. Click on the Dropdown beside Send button.
4. Choose a pre-defined Date from the options.
5. Goto Scheduled tab.
6. Verify the newly scheduled message is visible with attachments.

### Scenario 7: Able to view attachments in the scheduled message

1. Log into User's account.
2. Create a threaded post with attachments like Image, Video, PDF in a Channel.
3. Click on the Dropdown beside Send button.
4. Choose a pre-defined Date from the options.
5. Go to Scheduled tab.
6. Verify the newly scheduled message is visible with attachments in the Scheduled tab.

### Scenario 8: Able to see User's timezome in the DM Channel when scheduling a message

1. Log into User's account.
2. Open a DM with User B.
3. Verify User B's timezone is shown before post text box.
4. Schedule a message dropdown.
5. Verify below the options `Tomorrow at`, `Monday at` the User B's time is also displayed.
6. Click on `Choose a custom time`.
7. Select Date and time.
8. Verify the User B's timezone is displayed on the schedule message modal.

### Scenario 9: Able to send scheduled message immediately

1. Log into User's account.
2. Type a message in the DM/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`.
6. Click on `Scheduled` button.
7. Click on `See all scheduled messages`.
8. Verify user is taken to Scheduled tab and can see the Scheduled message.
9. Hover on the scheduled message.
10. Click on `Send` button.
11. Verify user is take to the DM/GM/Channel.
12. Veerify the scheduled post is visible in the channel.
Loading

0 comments on commit 31aeadd

Please sign in to comment.