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

Behat: Direct URL links for courses, activities

XMLWordPrintable

    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MDL-68492-master
    • 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  

      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.

            quen Sam Marshall
            quen Sam Marshall
            Tim Hunt Tim Hunt
            Andrew Lyons Andrew Lyons
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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