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

Behat test to verify a licence in use cannot be deleted (Automate MDLQA-16746)

XMLWordPrintable

      There's coverage for the licence manager page basic actions (add/edit/delete) but there's no coverage for scenarios where admin tries to delete a custom licence linked to a file.

      The reason is because that page throws an exception when the user tries to do that making behat fail, see MDL-77269.

      QA tests to be automated

      Test 3 - User Licence Preferences 
      1. Navigate to Site Administration > Licence > Licence settings
      2. Note the site default licence set (you will need this for a later step)
      3. Deselect the rememberuserlicencepref checkbox and save the settings
      4. Navigate to Private files and add a file using the add icon    ensuring that you select a licence which is NOT the site default licence
      5. Use the add icon  again and check that the Choose licence preselected licence is the site default and not the licence you chose for last file upload (it should be the site default licence)
      Test 4 - Licence used by files cannot be deleted
      1. Create another licence. Ensure that you do not set this license as the site's default licence.
      2. Navigate to Private files and add a new file seleting your custom licence as the file's licence and save changes
      3. Navigate back to Site Administration > Licences > Manage licences
      4. Attempt to delete the custom license, you should see an exception message 'Cannot delete a licence which is currently assigned to one or more files'

            lameze Simey Lameze
            lameze Simey Lameze
            Angelia Dela Cruz Angelia Dela Cruz
            Andrew Lyons Andrew Lyons
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours
                6h

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.