Skip to content

Commit

Permalink
MDL-71912 core_grading: Update behat step definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihail Geshoski authored and abgreeve committed Nov 9, 2021
1 parent 93b3bf6 commit d06da2d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion grade/grading/form/guide/tests/behat/edit_guide.feature
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Feature: Marking guides can be created and edited
When I press "Save changes"
And I follow "Edit settings"
And I follow "Test assignment 1 name"
And I navigate to "View all submissions" in current page administration
And I follow "View all submissions"
# Checking that the user grade is correct.
Then I should see "80" in the "Student 1" "table_row"
And I log out
Expand Down
6 changes: 2 additions & 4 deletions grade/grading/tests/behat/behat_grading.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ public function i_go_to_activity_advanced_grading_page($userfullname, $activityn

$this->execute('behat_navigation::go_to_breadcrumb_location', $this->escape($activityname));

$this->execute('behat_navigation::i_navigate_to_in_current_page_administration',
get_string('viewgrading', 'mod_assign'));
$this->execute('behat_general::click_link', get_string('viewgrading', 'mod_assign'));

$this->execute('behat_general::i_click_on_in_the',
array(
Expand Down Expand Up @@ -158,8 +157,7 @@ public function i_save_the_advanced_grading_form() {
$this->execute('behat_forms::press_button', get_string('savechanges'));
$this->execute('behat_general::i_click_on', array($this->escape(get_string('editsettings')), 'link'));
$this->execute('behat_forms::press_button', get_string('cancel'));
$this->execute('behat_navigation::i_navigate_to_in_current_page_administration',
get_string('viewgrading', 'mod_assign'));
$this->execute('behat_general::click_link', get_string('viewgrading', 'mod_assign'));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Feature: We can bulk insert grades for students in a course

Scenario: I can bulk insert grades and check their override flags for grade view.
Given I am on the "Test assignment one" "assign activity" page logged in as teacher1
And I navigate to "View all submissions" in current page administration
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the following fields to these values:
| Grade out of 100 | 50 |
Expand Down Expand Up @@ -69,7 +69,7 @@ Feature: We can bulk insert grades for students in a course

Scenario: I can bulk insert grades and check their override flags for user view.
Given I am on the "Test assignment two" "assign activity" page logged in as teacher1
And I navigate to "View all submissions" in current page administration
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the following fields to these values:
| Grade out of 100 | 50 |
Expand Down
2 changes: 1 addition & 1 deletion grade/tests/behat/grade_item_form_unhide.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Feature: Teacher can unhide grades on the edit page allowing students to view th
| activity | course | idnumber | name | intro | assignfeedback_comments_enabled |
| assign | C1 | assign1 | Test assignment name | Test assignment description | 1 |
And I am on the "Test assignment name" "assign activity" page logged in as teacher1
And I navigate to "View all submissions" in current page administration
And follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the following fields to these values:
| Grade out of 100 | 50 |
Expand Down
4 changes: 2 additions & 2 deletions grade/tests/behat/grade_regrade_do_not_override.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Feature: Regrading grades does not unnecessarily mark some as overriden
And I set the field "Available aggregation types" to "Weighted mean of grades"
And I press "Save changes"
And I am on the "Assignment 1" "assign activity" page
And I navigate to "View all submissions" in current page administration
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade out of 100" to "80"
And I press "Save and show next"
Expand Down Expand Up @@ -58,7 +58,7 @@ Feature: Regrading grades does not unnecessarily mark some as overriden
@javascript
Scenario: Confirm overridden course total does not get regraded when activity grade is changed
Given I am on the "Assignment 1" "assign activity" page
And I navigate to "View all submissions" in current page administration
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade out of 100" to "90"
And I press "Save and show next"
Expand Down
2 changes: 1 addition & 1 deletion grade/tests/behat/grade_scales.feature
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Feature: View gradebook when scales are used
And I set the field "grade[modgrade_type]" to "Scale"
And I set the field "grade[modgrade_scale]" to "EN Letterscale"
And I press "Save and display"
And I navigate to "View all submissions" in current page administration
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade" to "A"
And I press "Save changes"
Expand Down
2 changes: 1 addition & 1 deletion grade/tests/behat/grade_single_item_scales.feature
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Feature: View gradebook when single item scales are used
And I set the field "grade[modgrade_type]" to "Scale"
And I set the field "grade[modgrade_scale]" to "EN Singleitem"
And I press "Save and display"
And I navigate to "View all submissions" in current page administration
And I follow "View all submissions"
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the field "Grade" to "A"
And I press "Save changes"
Expand Down

0 comments on commit d06da2d

Please sign in to comment.