-
Notifications
You must be signed in to change notification settings - Fork 18
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: tests for root post delete helper plugin #182
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look great, thanks @saturninoabril !
- I agree with your questions / comments about the slash command functions. Adding a couple comments/questions as well.
- Wondering if these tests should be marked
P3 - Deep Functions (Do extensive scenarios work?)
instead ofP2 - Core Functions (Do core functions work?)
?
- I think the primary way we would use the priority field is in relation to the overall product. So while these are core functions of the plugin itself, perhaps the plugin functions wouldn't be prioritized as core functions of the overall product. What do you think? I know this field isn't necessarily consistent in this way across all test cases, but would be a good time to start aligning, I think.
I agree and really good point! Now updated. Having these priority consistent would make it easier to edit on how we're doing test coverage per priority level. |
@wiggin77 @lindalumitchell Please take a look again, thanks! |
@wiggin77 @lindalumitchell Gentle ping for your reviews so we can merge. Thanks! |
@saturninoabril just so I'm clear, this PR is a test plan that needs to be implemented? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay on re-reviewing this! One non-blocking nit / question, but looks good to me.
**Expected** | ||
|
||
The "Remove root post" option should be available for a root post. When selected, the root message is replaced with `*Deleted*` (default), attachments and reactions are removed, the root post is marked as `Edited`, and the thread remains unchanged. After deletion, the "Remove root post" option is no longer visible for the root post. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should steps also be added to verify:
- After root post is deleted, reaction should not be able to be added. In my testing, I am able to click to add a reaction to the deleted root post, and it appears briefly then disappears. Seems the reaction should not be available to add at all?
- After root post is deleted, it should not be editable, correct? I am able to edit the Deleted message after deleting a root post.
- After a root post is deleted, should users still be able to reply in that thread? I am able to. Perhaps a test should be added to verify the expected behavior either way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch Linda! Let's hear from @wiggin77 then I'll update accordingly.
- For 1 and 2, I raised a similar concern about the "Delete" (menu option in red) but I was told such option cannot be suppressed from the plugin. Maybe the same is true for other post options?
- For 2, I can click "Edit" and enter a change but on save, it didn't take effect. The text remain as is (with
*Deleted*
). - For 3, it may make sense to not allow replying to a deleted root post but I'll defer to DE.
|
||
1. Obtain the plugin by either downloading it from the [repository](https://github.com/mattermost/mattermost-plugin-post-delete-helper) or by building it from source. | ||
2. Upload the plugin to the Mattermost server. | ||
3. Perform sanity check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be more explicit about what is involved in the sanity check? E.g. Can the plugin be started and stopped? Or, given the steps to follow that test the plugin functionality, maybe the "sanity check" step isn't needed here?
Also, a nit: should have a .
at the end of the sentence for consistency. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Steps 1 and 2 cover general plugin functionality. To make it more plugin-specific, I've added "perform sanity check," which could focus on a core function (deleting a root post). However, I’ve kept the details minimal, as it could correspond to any of the tests from 2 to 7. However, as I read again, looks good to remove step 3. (I'll update but will wait for the other comment).
Thanks!
Yes. Either in the plugin repo itself or could wait to go straight to the monorepo since the functionality will eventually become part of the core product. |
Summary
Tests for root post delete helper plugin
Is the feature in stable branch or under review?
https://github.com/mattermost/mattermost-plugin-post-delete-helper
Test client