MDL-55074 theme_behat: Behat fixes for user_grade_navigation
This commit is contained in:
+2
-1
@@ -149,9 +149,10 @@ switch ($mode) {
|
||||
if ($course->id == SITEID) {
|
||||
$activenode = $PAGE->navigation->find('user' . $user->id, null);
|
||||
} else {
|
||||
$currentcoursenode = $PAGE->navigation->find('currentcourse', null);
|
||||
$currentcoursenode = $PAGE->navigation->find($course->id, navigation_node::TYPE_COURSE);
|
||||
$activenode = $currentcoursenode->find_active_node();
|
||||
}
|
||||
|
||||
// Check to see if the active node is a user name.
|
||||
if (!preg_match('/^user\d{0,}$/', $activenode->key)) { // No user name found.
|
||||
$userurl = new moodle_url('/user/view.php', array('id' => $user->id, 'course' => $course->id));
|
||||
|
||||
@@ -64,7 +64,7 @@ Feature: The student can navigate to their grades page and user grade report.
|
||||
Scenario: Log in as a parent and view a childs grades.
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Turn editing on"
|
||||
And I turn editing mode on
|
||||
And I add the "Mentees" block
|
||||
And I navigate to "Define roles" node in "Site administration > Users > Permissions"
|
||||
And I click on "Add a new role" "button"
|
||||
@@ -94,7 +94,7 @@ Feature: The student can navigate to their grades page and user grade report.
|
||||
| Course name | Grade |
|
||||
| Course 2 | - |
|
||||
| Course 1 | 217.00 |
|
||||
And I follow "Course 1"
|
||||
And I click on "Course 1" "link" in the "region-main" "region"
|
||||
And the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| Test assignment one | 75.00 % | 150.00 | 0–300 | 50.00 % | 37.50 % |
|
||||
|
||||
Reference in New Issue
Block a user