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

Behat: Direct URL links for courses, activities

    XMLWordPrintable

    Details

      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
            Integrator:
            Andrew Nicols
            Tester:
            CiBoT
            Participants:
            Component watchers:
            Andrew Nicols, 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