Skip to content

Commit

Permalink
[MI-3823]: Added the test cases for linking and unlinking channel on …
Browse files Browse the repository at this point in the history
…MM. (#23) (#145)

* [MI-3823]: Added the test cases for phase 3.

* [MI-3823]: Added the test cases for linking and unlinking channels on MM.

* [MI-3823]: refactored the scenarios.

* .

* changed the folder name

* changed the folder name.

* fixed the comments.

* changed the folder name.

* fixed the comments.

* fixed the unlink feature and added a new scenario.

* fixed the comments.

* fixed the comments.
  • Loading branch information
arush-vashishtha authored Feb 15, 2024
1 parent 8675dc6 commit 3cfa4c3
Show file tree
Hide file tree
Showing 5 changed files with 273 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
# (Required) Ensure all values are filled up
name: "Error while linking a channel on MM"
status: Active
priority: Normal
folder: ui-integration
authors: "@arush-vashishtha"
team_ownership: []
priority_p1_to_p4: P2 - Core Functions (Do core functions 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. Any error occurred while linking a channel from the RHS of the MS Teams sync plugin on MM.

**Step 2**

1. Any error occurred while linking a channel from the RHS of the MS Teams sync plugin on MM.
2. Click on the `Try Again` button in the `Unable to link channels` dialog.

**Step 3**

1. Any error occurred while linking a channel from the RHS of the MS Teams sync plugin on MM.
2. Click on the `Cancel` or `x` button in the `Unable to link channels` dialog.

**Step 4**

1. Link an already linked channel on MM from the RHS of the MS Teams sync plugin.

**Expected**

The `Unable to link channels` dialog should open on MM.
After step 2, `Link a channel` dialog should again open with pre-filled values on MM.
After step 3, the `Unable to link channels` dialog should close and the RHS of MS Teams sync plugin should persist its state.
After step 4, the `Unable to link channels` dialog should open on MM.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
# (Required) Ensure all values are filled up
name: "Error while unlinking a channel on MM"
status: Active
priority: Normal
folder: ui-integration
authors: "@arush-vashishtha"
team_ownership: []
priority_p1_to_p4: P2 - Core Functions (Do core functions 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. Any error occurred while unlinking a channel from the RHS of the MS Teams sync plugin on MM.

**Step 2**

1. Any error occurred while unlinking a channel from the RHS of the MS Teams sync plugin on MM.
2. Click on the `Try Again` button in the `Unlink error` dialog.

**Step 3**

1. Any error occurred while unlinking a channel from the RHS of the MS Teams sync plugin on MM.
2. Click on the `Cancel` or `x` button in the `Unlink error` dialog.

**Expected**

The `Unlink error` dialog should open on MM.
After step 2, unlinking should again start for the same channels on MM.
After step 3, the `Unlink error` dialog should close and the RHS of MS Teams sync plugin should persist its state.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
# (Required) Ensure all values are filled up
name: "Hovering over a row in the linked channel list"
status: Active
priority: Normal
folder: ui-integration
authors: "@arush-vashishtha"
team_ownership: []
priority_p1_to_p4: P2 - Core Functions (Do core functions 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. Hover the cursor over the row of linked channels in the list in RHS of the MS Teams sync plugin on MM.

**Expected**

The row should get highlighted upon hovering the cursor and the unlink button should become visible in the RHS of the MS Teams sync plugin on MM.
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
# (Required) Ensure all values are filled up
name: "Linking a channel on MM"
status: Active
priority: Normal
folder: ui-integration
authors: "@arush-vashishtha"
team_ownership: []
priority_p1_to_p4: P2 - Core Functions (Do core functions 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. Click on the `Link a channel` button in the RHS of the MS Teams sync plugin on MM.
2. Search and select the desired `Mattermost channel`, the desired `Microsoft team` and a desired `Microsoft channel` for the selected MS team in the `Link a channel` dialog.
3. Click on the `Link channels` button in the `Link a channel` dialog.

**Step 2**

1. Click on the `Link a channel` button in the RHS of the MS Teams sync plugin on MM.
2. Click on the `cancel` or `x` button in the `Link a channel` dialog.


**Step 3**

1. Click on the `Link a channel` button in the RHS of the MS Teams sync plugin on MM.
2. Click on the `Link channels` button in the `Link a channel` dialog.

**Step 4**

1. Click on the `Link a channel` button in the RHS of the MS Teams sync plugin on MM.
2. Click on the dropdown to select the desired `Microsoft channel` when the `Mattermost channel` and `Microsoft team` are not selected in the `Link a channel` dialog.

**Step 5**
1. Enter the slash command `/msteams-sync link` in the channel on MM.
2. Search and select the desired `Mattermost channel`, the desired `Microsoft team` and a desired `Microsoft channel` for the selected MS team in the `Link a channel` dialog.
3. Click on the `Link channels` button in the `Link a channel` dialog.

**Expected**

The desired channel should get linked and a toast message should be visible in the RHS of MS Teams sync plugin for successfull linking with an update in the list of linked channels on MM.

Check failure on line 64 in data/test-cases/plugins/ms-teams-sync/ui-integration/Linking_channel.md

View workflow job for this annotation

GitHub Actions / test

successfull ==> successful
After step 2, the `Link a channel` dialog should close and the RHS should persist its state.
After step 3, the `Link channels` button should be disabled in the `Link a channel` dialog.
After step 4, the dropdown list should be disabled for the `Microsoft Teams channel` when the `Microsoft Teams team` is not selected in the `Link a channel` dialog.
After step 5, the desired channel should get linked with an update in the `List of linked channels` in the RHS of the MS Teams sync plugin on MM.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
# (Required) Ensure all values are filled up
name: "Unlinking a channel on MM"
status: Active
priority: Normal
folder: ui-integration
authors: "@arush-vashishtha"
team_ownership: []
priority_p1_to_p4: P2 - Core Functions (Do core functions 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. Hover over the desired row in the list of linked channels and click on unlink button on the row in the RHS of the MS Teams sync plugin on MM.
2. Click on the `Unlink channels` button in the `Unlink channel` dialog on MM.

**Step 2**

1. Hover over the desired row in the list of linked channels and click on unlink button on the row in the RHS of the MS Teams sync plugin on MM.
2. Click on the `Cancel` or `x` button in the `Unlink channel` dialog on MM.

**Step 3**

1. Unlink all the linked channels from the `List of linked channels` on MM from RHS of MS Teams sync plugin.

**Expected**

The desired channel should be unlinked and the RHS of MS Teams sync plugin should get updated with a toast message regarding the successful unlinking.
After step 2, the `Unlink channel` dialog should close and the RHS of MS Teams sync plugin should persist its state.
After step 3, the `List of linked channels` should be empty and the user should be able to see the `Link a channel` button in the RHS of the MS Teams sync plugin on MM.

0 comments on commit 3cfa4c3

Please sign in to comment.