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: Highlight Keywords without notification #119

Merged
merged 11 commits into from
Oct 24, 2023
7 changes: 6 additions & 1 deletion data/test-by-folder.json
Original file line number Diff line number Diff line change
Expand Up @@ -1696,11 +1696,16 @@
{
"folder": "channels/settings",
"tests": [
"Admin Login | Verify Highlight Keywords without notifications is available only for Professional license",
"Custom Theme - Sidebar Styles",
"Deprecate? Changes to Settings are not saved when user does not click on Save button",
"Display: Click to open threads",
"Highlight Keywords without notifications | Should be able to add a long phrase and word by pressing Tab or Comma",
"Highlight Keywords without notifications | Should highlight phrases set by logged in user",
"Highlight Keywords without notifications | Verify if the Highlight Feature is working previously posted messages",
"Notification sound modal selection should reset when settings canceled",
"Settings Display Theme - Settings View"
"Settings Display Theme - Settings View",
"User Login | Verify Highlight Keywords without notifications is available only for Professional license"
]
},
{
Expand Down
52 changes: 52 additions & 0 deletions data/test-cases/channels/settings/tes.md
M-ZubairAhmed marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
# (Required) Ensure all values are filled up
name: "Admin Login | Verify Highlight Keywords without notifications is available only for Professional license"
status: Active
priority: Normal
folder: Settings
authors: "@yasserfaraazkhan"
team_ownership:
- ICU
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**

Scenario: When instance is on a free subscription.

1. Login to mattermost with Admin account and goto Settings -> Notification modal.
2. Scroll to `Keywords That Get Highlighted (without notifications)` section.
3. Verify that the Setting is disabled and we see `Professional` tag indicating it is available after upgrading the instance to Professional license.
4. Click on the Professional tag.
5. Verify that a modal with title `Highlighted Keywords without notifications with Mattermost Professional` appears.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi @marianunez @abhijit-singh ,
will the title contain Upgrade to use .. like in the below example

image

6. Click on `View Plans` button.
7. Verify that the pricing modal is opened.
M-ZubairAhmed marked this conversation as resolved.
Show resolved Hide resolved

Scenario: When instance is on a Professsional, Enterprise license or an Enterprise Trial license.

1. Login to mattermost with Admin account and goto Settings -> Notification modal.
2. Scroll to `Keywords That Get Highlighted (without notifications)` section.
3. Verify that the Setting is enabled and has `Edit` button.
52 changes: 52 additions & 0 deletions data/test-cases/channels/settings/test-0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
# (Required) Ensure all values are filled up
name: "User Login | Verify Highlight Keywords without notifications is available only for Professional license"
status: Active
priority: Normal
folder: Settings
authors: "@yasserfaraazkhan"
team_ownership:
- ICU
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**

Scenario: When instance is on a free subscription.

1. Login to mattermost with Non-Admin account and goto Settings -> Notification modal.
2. Scroll to `Keywords That Get Highlighted (without notifications)` section.
3. Verify that the Setting is disabled and we see `Professional` tag indicating it is available after upgrading the instance to Professional license.
4. Click on the Professional tag.
5. Verify that a modal with title `Highlighted Keywords without notifications with Mattermost Professional` appears.
6. Click on `Notify Admin` button.
7. Verify that the button turns grey and is disabled. The button will have text `Notification sent!`

Scenario: When instance is on a Professsional, Enterprise license or an Enterprise Trial license.

1. Login to mattermost and goto Settings -> Notification modal.
2. Scroll to `Keywords That Get Highlighted (without notifications)` section.
3. Verify that the Setting is enabled and has `Edit` button.
55 changes: 55 additions & 0 deletions data/test-cases/channels/settings/test-1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
# (Required) Ensure all values are filled up
name: "Highlight Keywords without notifications | Should highlight phrases set by logged in user"
status: Active
priority: Normal
folder: Settings
authors: "@yasserfaraazkhan"
team_ownership:
- ICU
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**

Test Data:

- Should have a Professional License
- have 2 users, **User A**, **User B**

Scenario: When logged in user posts a phrase

1. Login to mattermost with **User A** account and goto Settings -> Notification modal.
2. In the `Keywords That Get Highlighted (without notifications)` section, type a test phrases and words. Example: `Testing`, `Testing the keyword highlight without notification feature`.
3. Press `Tab` or `Comma` and press `Save` button.
4. Open any channel, and post the example phrase.
5. Verify the Phrase is Highlighted by a yellow background in the center.
6. Click on the post and verify the Phrase is Highlighted by a yellow background in the RHS.
yasserfaraazkhan marked this conversation as resolved.
Show resolved Hide resolved

Scenario: When Other user posts a phrase.

7. From **User B** account, post the same phrase.
8. Verify in **User A**'s account that the phrase is highlighted.
58 changes: 58 additions & 0 deletions data/test-cases/channels/settings/test-2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
# (Required) Ensure all values are filled up
name: "Highlight Keywords without notifications | Should be able to add a long phrase and word by pressing Tab or Comma"
status: Active
priority: Normal
folder: Settings
authors: "@yasserfaraazkhan"
team_ownership:
- ICU
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**

Test Data:

- Should have a Professional License

Scenario: Use `Tab` to add a Phrase as a Keyword to be highlighted.

1. Login to mattermost account and goto Settings -> Notification modal.
2. In the `Keywords That Get Highlighted (without notifications)` section.
3. Type a test phrase `Testing the keyword highlight without notification feature`.
4. Press `Tab` to conclude the phrase.
5. Press `Save` button.
6. Expand `Keywords That Get Highlighted (without notifications)` again.
7. Verify the phrase is saved.

Scenario: Use `Comma` to add a Phrase as a Keyword to be highlighted.

1. Goto `Keywords That Get Highlighted (without notifications)` section in the settings.
2. Type test Words and separate them by pressing `comma` Example: `Testing`, `keyword`, `highlight`.
3. Press `Save` button.
4. Expand `Keywords That Get Highlighted (without notifications)` again.
5. Verify the phrase is saved.
52 changes: 52 additions & 0 deletions data/test-cases/channels/settings/test-3.md
M-ZubairAhmed marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
# (Required) Ensure all values are filled up
name: "Highlight Keywords without notifications | Verify if the Highlight Feature is working previously posted messages"
status: Active
priority: Normal
folder: Settings
authors: "@yasserfaraazkhan"
team_ownership:
- ICU
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**

Test Data:

- Should have a Professional License

Scenario: Edit a Phrase

1. Login to mattermost account.
2. In a channel Post a message `Testing the keyword highlight without notification feature`.
3. goto Settings -> Notification modal.
4. In the `Keywords That Get Highlighted (without notifications)` section, type a test phrase `Testing the keyword highlight without` and a word `feature`.
5. Press `Tab` to conclude the phrase.
6. Press `Save` button.
7. Go back to the Channel, and verify the words in Step 4 are highlight as expected
8. Open the Settings again and delete the Keywords added.
9. Go back to the Channel, and verify the none of the words are highlighted