Differences Between: [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]
1 <?php 2 // This file is part of Moodle - http://moodle.org/ 3 // 4 // Moodle is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // Moodle is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>. 16 17 /** 18 * Behat course-related step definition overrides for the Classic theme. 19 * 20 * @package theme_classic 21 * @category test 22 * @copyright 2019 Michael Hawkins 23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 */ 25 26 // NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php. 27 28 require_once (__DIR__ . '/../../../../course/tests/behat/behat_course.php'); 29 30 /** 31 * Course-related step definition overrides for the Classic theme. 32 * 33 * @package theme_classic 34 * @category test 35 * @copyright 2019 Michael Hawkins 36 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 37 */ 38 class behat_theme_classic_behat_course extends behat_course { 39 40 /** 41 * Go to the course participants. 42 */ 43 public function i_navigate_to_course_participants() { 44 $coursestr = behat_context_helper::escape(get_string('courses')); 45 $mycoursestr = behat_context_helper::escape(get_string('mycourses')); 46 $xpath = "//div[contains(@class,'block')]//li[p/*[string(.)=$coursestr or string(.)=$mycoursestr]]"; 47 $this->execute('behat_general::i_click_on_in_the', [get_string('participants'), 'link', $xpath, 'xpath_element']); 48 } 49 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body