From b3fab1d80e6a4a4f4d9f717a7ffbb931dc96cda7 Mon Sep 17 00:00:00 2001 From: Amaia Anabitarte Date: Mon, 11 Apr 2022 12:36:38 +0200 Subject: [PATCH] MDL-74475 behat: Option to jump to course edit page --- lib/tests/behat/behat_navigation.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/tests/behat/behat_navigation.php b/lib/tests/behat/behat_navigation.php index b32bc3f88ec..7a10a491756 100644 --- a/lib/tests/behat/behat_navigation.php +++ b/lib/tests/behat/behat_navigation.php @@ -718,6 +718,7 @@ class behat_navigation extends behat_base { * | Page type | Identifier meaning | description | * | Category | category idnumber | List of courses in that category. | * | Course | course shortname | Main course home pag | + * | Course editing | course shortname | Edit settings page for the course | * | Activity | activity idnumber | Start page for that activity | * | Activity editing | activity idnumber | Edit settings page for that activity | * | [modname] Activity | activity name or idnumber | Start page for that activity | @@ -745,6 +746,14 @@ class behat_navigation extends behat_base { } return new moodle_url('/course/index.php', ['categoryid' => $categoryid]); + case 'course editing': + $courseid = $this->get_course_id($identifier); + if (!$courseid) { + throw new Exception('The specified course with shortname, fullname, or idnumber "' . + $identifier . '" does not exist'); + } + return new moodle_url('/course/edit.php', ['id' => $courseid]); + case 'course': $courseid = $this->get_course_id($identifier); if (!$courseid) {