Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-77120

Behat test to verify users with 'deleteanymessage' capability can delete message for others (Automate MDLQA-13511)

    XMLWordPrintable

Details

    Description

      The goal of this test is to verify users with 'moodle/site:deleteanymessage' can delete message for other users.

      QA test to be automated: MDLQA-13511

      QA testing instructions

      1. Log in as a teacher and go to a course.
      2. Create a group with group messaging set to Yes.
      3. Add the student to the group plus yourself as teacher.
      4. Click the messages icon to open the messaging drawer and try sending a few messages to the student privately and to the group.
      5. Try selecting any message then click the delete icon.
      6. Check that you see the text 'Are you sure you would like to delete the selected messages? This will not delete them for other conversation participants.'
      7. Go ahead and delete the message.
      8. Check that the message is deleted.
      9. Using the other browser, log in as the student, click the messages icon to open the messaging drawer.
      10. Check that all private and group messages from the teacher are displayed, and that the message that the teacher deleted is still visible for the student.
      11. Try sending a few messages to the teacher privately and to the group.
      12. Log out then log in as admin, go to Site administration / Users / Permissions / Define roles and add a new role called 'Messages deleter'. Set the role archetype to none, select System as context type where the role may be assigned, allow the capability moodle/site:deleteanymessage then scroll to the bottom of the page and save changes.
      13. Go to Site administration / Users / Permissions / Assign system roles and assign the teacher the role of 'Messages deleter'.
      14. In the browser logged in as a teacher, open the messaging drawer and select any message then click the delete icon.
      15. Check that you see the text 'Are you sure you would like to delete the selected messages?' and a checkbox 'Delete for me and for everyone else'.
      16. Tick the checkbox then click the delete button.
      17. Check that the message is deleted.
      18. Using the other browser, log in as the student and check that the message that the teacher deleted is deleted for you too.
      19. Repeat steps 14 to 18, selecting and deleting several messages, selecting group or private messages, sometimes ticking the 'Delete for me and for everyone else' checkbox and sometimes not.
      20. In each case, as the student, check that messages are deleted for you too as expected.

      Attachments

        Issue Links

          Activity

            People

              andelacruz Angelia Dela Cruz
              lameze Simey Lameze
              Simey Lameze Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 1 day, 33 minutes
                  1w 1d 33m