Skip to content

Commit

Permalink
Add tests for Global Retention policy in hours (#181)
Browse files Browse the repository at this point in the history
* Test cases for Global Retetion in hours

* Test cases for Global Retetion in hours

* Correct typos

* As per Deno - formating for italic text requires correction

* Make 2 of the steps more explicit to avoid possibility overlapping scenarios hidding a bug.

* Update data/test-cases/suite/system-console/compliance/data-retention-policy/SetGlobalPolicyForAttachmentInHours.md

Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>

* Update data/test-cases/suite/system-console/compliance/data-retention-policy/SetGlobalPolicyForAttachmentInHours.md

Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>

* Update data/test-cases/suite/system-console/compliance/data-retention-policy/SetGlobalPolicyForMessagesInHours.md

Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>

* Update data/test-cases/suite/system-console/compliance/data-retention-policy/SetGlobalPolicyForMessagesInHours.md

Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>

---------

Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
  • Loading branch information
DHaussermann and saturninoabril authored Sep 19, 2024
1 parent c17da26 commit 2823184
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
# (Required) Ensure all values are filled up
name: "Set global policy for messages in hours"
status: Active
priority: Normal
folder: Data Retention Policy
authors: "@DHaussermann"
team_ownership:
- Suite Users
priority_p1_to_p4: P3 - Deep Functions (Do extensive scenarios work?)

# (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:
- Webapp
- Desktop

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

**Step 1**

1\. Login as System Admin\
2\. Enable /test commands\
3\. Open any channel\
4\. Create posts that are older than 1 hour ex: _/test posts images=3 time=1726147464000_ (based on you current time) but less than 1 day old\
5\. Make some post that are not backdated ex: _/test posts images=3_\
6\. Navigate to _Data Retention_ in the system console\
7\. Set a global policy to have all attachments deleted within 1 hour\
8\. Remove any global policy for deleting posts
9\. Click _Run Deletion Job Now_ to run data retention job\
10\. Ensure the job completes successfully\
11\. Return to the user side and refresh the webapp OR login again in a new browser session

**Expected**

11.1 In the channel from step _3._ the attachments on the backdated posts should be deleted\
11.2 In the channel from step _3._ the posts themselves should remain\
11.3 In the channel from step _3._ the posts that are not backdated should still have their attachments in place
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
# (Required) Ensure all values are filled up
name: "Set global policy for messages in hours"
status: Active
priority: Normal
folder: Data Retention Policy
authors: "@DHaussermann"
team_ownership:
- Suite Users
priority_p1_to_p4: P3 - Deep Functions (Do extensive scenarios work?)

# (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:
- Webapp
- Desktop

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

**Step 1**

1\. Login as System Admin\
2\. Enable /test commands\
3\. Open any channel\
4\. Create posts that are older than 1 hour ex: _/test posts range=10 time=1726147464000_ (based on you current time) but less than 1 day old\
5\. Make some post that are not backdated ex: _/test posts range=10_\
6\. Navigate to _Data Retention_ in the system console\
7\. Set a global policy to have all posts deleted within 1 hour\
8\. Click _Run Deletion Job Now_ to run data retention job\
9\. Ensure the job completes successfully\
10\. Return to the user side and refresh the webapp OR login again in a new browser session

**Expected**

10.1 In the channel from step _3._ the backdated posts should be deleted\
10.2 In the channel from step _3._ the posts that are not backdated should still be in the channel\

0 comments on commit 2823184

Please sign in to comment.