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: tests for root post delete helper plugin #182

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

saturninoabril
Copy link
Member

Summary

Tests for root post delete helper plugin

Is the feature in stable branch or under review?

  • Feature in stable branch (master, main)?

https://github.com/mattermost/mattermost-plugin-post-delete-helper

Test client

  • Browser
  • [] Mobile App (version, OS)
  • Desktop App (version, OS)

@saturninoabril saturninoabril added 2: Dev Review Requires review by a core committer 2: QA Review Requires review by a QA tester labels Sep 13, 2024
Copy link
Collaborator

@lindalumitchell lindalumitchell left a 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 !

  1. I agree with your questions / comments about the slash command functions. Adding a couple comments/questions as well.
  2. Wondering if these tests should be marked P3 - Deep Functions (Do extensive scenarios work?) instead of P2 - 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.

@saturninoabril
Copy link
Member Author

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.

@saturninoabril
Copy link
Member Author

@wiggin77 @lindalumitchell Please take a look again, thanks!

@saturninoabril
Copy link
Member Author

@wiggin77 @lindalumitchell Gentle ping for your reviews so we can merge. Thanks!

@wiggin77
Copy link
Member

@saturninoabril just so I'm clear, this PR is a test plan that needs to be implemented?

Copy link
Collaborator

@lindalumitchell lindalumitchell left a 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.

Copy link
Collaborator

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:

  1. 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?
  2. After root post is deleted, it should not be editable, correct? I am able to edit the Deleted message after deleting a root post.
  3. 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?

Copy link
Member Author

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
Copy link
Collaborator

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. :)

Copy link
Member Author

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!

@saturninoabril
Copy link
Member Author

@saturninoabril just so I'm clear, this PR is a test plan that needs to be implemented?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2: Dev Review Requires review by a core committer 2: QA Review Requires review by a QA tester
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants