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: GM to private channel #117

Merged
merged 10 commits into from
Oct 4, 2023
Binary file added data/asset/Error_converting_GM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions data/test-by-folder.json
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,9 @@
{
"folder": "channels/channel-menu",
"tests": [
"Convert a GM to Private channel with users on same team",
"Leave and Archive channel actions display as destructive",
"Throw Error when Converting a GM to Private channel with users from different teams",
"channels/DMs/GMs move to submenus should have appropriate menu items"
]
},
Expand Down
45 changes: 45 additions & 0 deletions data/test-cases/channels/channel-menu/test-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
# (Required) Ensure all values are filled up
name: "Convert a GM to Private channel with users on same team"
status: Active
priority: Normal
folder: Channel menu
authors: "@yasserfaraazkhan"
team_ownership: []
priority_p1_to_p4: P3 - Deep Functions (Do extensive scenarios work?)

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

# (Optional) Test type and tools
cypress: null
detox: null
mmctl: null
playwright: null
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**

1. Login into mattermost.
2. Create a GM channel with users between 2 to 7 from same team.
3. Post a message.
4. From the Channel menu, click on 'Convert to Private Channel'.
5. Verify User can see a pop up, with a heading `Convert to Private Channe` and an alert message `Conversation history will be visible to any channel members`.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved
6. Verify User can enter a Channel name and Select Team from the dropdown (this dropdown won't appear if the users are in just 1 team).
7. Click on Create a Private Channel.
8. Verify the created channel is a Private channel.
9. Verify the Post is still in the channel after conversion.
43 changes: 43 additions & 0 deletions data/test-cases/channels/channel-menu/test-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
# (Required) Ensure all values are filled up
name: "Throw Error when Converting a GM to Private channel with users from different teams"
status: Active
priority: Normal
folder: Channel menu
authors: "@yasserfaraazkhan"
team_ownership: []
priority_p1_to_p4: P3 - Deep Functions (Do extensive scenarios work?)

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

# (Optional) Test type and tools
cypress: null
detox: null
mmctl: null
playwright: null
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**

1. Login into mattermost.
2. Create 2 teams and have users assigned to them.
3. Create a GM channel with users between 2 to 7, and they should be from different team.
4. From the Channel menu, click on 'Convert to Private Channel'.
5. Verify User can see a pop up, with a heading `Convert to Private Channe` and an alert message `Unable to convert to a channel because group members are part of different teams`.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved

![Screenshot](/data/asset/Error_converting_GM.png)
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved