Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserfaraazkhan committed Dec 9, 2024
1 parent d618559 commit 3c0ea26
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 27 deletions.
2 changes: 1 addition & 1 deletion data/test-by-folder.json
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@
"Edit Post to add attachments on Desktop app/Web app",
"Edit Post to remove attachments on Desktop app/Web app",
"Verify Edit History with Attachments",
"Verify User can download from Edit History of a post",
"Verify User can download the files after restoring old post with attachments",
"Verify User deleted files are not listed under channel files",
"View message edit history and restore previous versions"
]
Expand Down
7 changes: 3 additions & 4 deletions data/test-cases/channels/edited-post/1-Edit-Attachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,17 @@ steps_hashed: null

Steps:

1. Navigate to a channel post.
1. Navigate to a Channel/Gm/DM where current user has a post to edit.
2. Click the "Edit" option in the post actions menu.
3. Use the "Attach" button (paperclip icon) to upload a file.
4. Save the edited post.
5. Verify the attachment is visible.
6. Verify a `Added today` label is shown.

### Scenario 2: User should be able to drag and drop attachments while editing a post.

Steps:

1. Navigate to a channel post.
1. Navigate to a Channel/Gm/DM where current user has a post to edit.
2. Click the "Edit" option in the post actions menu.
3. Drag and drop a file into the editable area.
4. Verify the attachment is visible.
Expand All @@ -57,7 +56,7 @@ Steps:

Steps:

1. Navigate to a threaded post in a channel.
1. Navigate to a Channel/Gm/DM where current user has a threaded post to edit.
2. Click the "Edit" option in the post actions menu.
3. Use the "Attach" button (paperclip icon) to upload a file or drag and drop a file into the editable area.
4. Save the edited post.
Expand Down
6 changes: 2 additions & 4 deletions data/test-cases/channels/edited-post/2-Remove-Attachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,11 @@ Preconditions: A post with at least one attachment exists.

Steps:

1. Navigate to a post with an attachment.
1. Navigate to a Channel/Gm/DM where current user has a post with attachment to edit.
2. Click "Edit" in the post actions menu.
3. Remove the attachment by clicking the delete icon (X) on the attachment thumbnail.
4. Verify a confirmation modal pops up.
5. Click on the `Delete` button.
6. Save the edited post.
7. Verify the attachment is not visible.
8. Verify a message `Attachment deleted` is shown.
- If multiple attachments are deleted, the message should indicate `<Number of> attachments deleted`.
9. Hover on the label, and verify a tooltip with attachment names is displayed.
8. Hover on the label, and verify a tooltip with attachment names is displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Steps:
4. Restore the version of the post that does not have the attachment.
5. Verify the post is updated. The files are not visible to other users.
6. Verify the file public link shows a file not found error.
- From Admin account, verify the file public link shows a file not found error.

### Scenario 3: Verify the files do not show under Channel files.

Expand Down
27 changes: 9 additions & 18 deletions data/test-cases/channels/edited-post/4-Download-Attachment.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# (Required) Ensure all values are filled up
name: "Verify User can download from Edit History of a post"
name: "Verify User can download the files after restoring old post with attachments"
status: Active
priority: Normal
folder: Edited Post
Expand Down Expand Up @@ -33,27 +33,18 @@ case_hashed: null
steps_hashed: null
---

### Scenario 1: User should be able to download from Edit History of a post.
### Scenario 1: User should be able to download files after restoring a old version.

Preconditions: A post with at least one attachment exists.
Preconditions:

Steps:

1. Navigate to a post that was edited with new attachments.
2. Click on the "Edited" option shown beside the post.
3. Verify an RHS panel is shown to the user with the date and time when the post was edited.
4. Download the attachment from the version other than the current one.
5. Verify the file is successfully downloaded.

### Scenario 2: User should not be able to download from Edit History of a post if the attachment is deleted.

Preconditions: A post with at least one attachment exists. Enable Public link for the attachment.
- A post with attachment should have been edited.
- Current edited version of post should not have attachment.

Steps:

1. Navigate to a post that was edited with new attachments.
1. Navigate to a post.
2. Click on the "Edited" option shown beside the post.
3. Verify an RHS panel is shown to the user with the date and time when the post was edited.
4. Restore the version of the post that does not have the attachment.
5. Verify the post is updated. The files are not visible to other users.
6. Verify the file public link shows a file not found error.
4. Restore the old version of post that has attachment.
5. Download the attachment from the post.
6. Verify the file is successfully downloaded.
17 changes: 17 additions & 0 deletions data/test-cases/channels/edited-post/5-Channel-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,20 @@ Steps:
5. Restore the version of the post that does not have the attachment.
6. Verify the post is updated. The files are not visible to other users.
7. Verify the Channel files do not have the attachment anymore.

### Scenario 1: Verify the User deleted files are not accessible by Sysadmin through file's public link.

Preconditions:

- Enable Public link to the files.

Steps:

1. Verify the attachment is visible in Channel files.
2. Navigate to a post that was edited with new attachments.
3. Copy the public link of the files and past it in the channel.
4. Edit the Post and remove attachments.
5. Verify the post is updated. The files are not visible to other users.
6. Verify the Channel files do not have the attachment anymore.
7. Click on the public file link shared in the channel.
8. Verify User and System admin both see File not found error.

0 comments on commit 3c0ea26

Please sign in to comment.