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

Behat: Direct URL links for courses, activities

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Allow the full Moodle behat test suite to run (or manually run the relevant feature files, if you like) and check there aren't additional failures in the files listed below:

      lib/tests/behat/action_modal.feature
      lib/tests/behat/alpha_chooser.feature
      lib/tests/behat/largeforms.feature
      lib/tests/behat/locking.feature
      lib/tests/behat/permissionmanager.feature
      lib/tests/behat/readonlyform.feature
      lib/tests/behat/securelayout.feature

       

      Show
      Allow the full Moodle behat test suite to run (or manually run the relevant feature files, if you like) and check there aren't additional failures in the files listed below: lib/tests/behat/action_modal.feature lib/tests/behat/alpha_chooser.feature lib/tests/behat/largeforms.feature lib/tests/behat/locking.feature lib/tests/behat/permissionmanager.feature lib/tests/behat/readonlyform.feature lib/tests/behat/securelayout.feature  
    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE
    • Pull Master Branch:
      MDL-68492-master

      Description

      MDL-66335 adds the ability to jump directly to pages in Behat, optionally at the same time as logging in. This can make Behat tests a great deal faster to run, as well as shorter to read and write.

      As yet, there are only a few page types implemented (mainly in quiz), which makes it less useful than it might be.

      I propose adding two core page types: Course and Activity. The former would link to a course page based on shortname; the latter would link to an activity view page by idnumber, using the standard activity URL logic that is available in course modinfo.

      Here are syntax examples:

      When I am on the "forum1" "Activity" page logged in as "admin"
      When I am on the "forum1" "Activity" page
      When I am on the "C1" "Course" page
      When I am on the "C1" "Course" page logged in as "admin"
      

      I'll implement the actual code change, and also as a separate commit make most of the relevant changes to features in lib/tests/behat (there aren't too many to be unmanageable) so that we have examples of usage in core as well as a test that it works.

        Attachments

          Activity

            People

            Assignee:
            quen Sam Marshall
            Reporter:
            quen Sam Marshall
            Peer reviewer:
            Tim Hunt Tim Hunt
            Integrator:
            Andrew Lyons Andrew Lyons
            Tester:
            CiBoT CiBoT
            Participants:
            Component watchers:
            Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/May/20

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m