MDL-58265 core_test: replace I turn editing on steps

Also remove few more unnecessary steps that redirects behat to
site home page to actually get to the course.

Part of MDL-55611 epic.
This commit is contained in:
Simey Lameze 2017-03-15 15:13:09 +08:00 committed by Damyon Wiese
parent 3353cfd8c1
commit fdeeaff954
458 changed files with 1697 additions and 2148 deletions

View file

@ -18,8 +18,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
| activity | course | idnumber | name | intro |
| assign | C1 | assign1 | Assignment1 | Assignment 1 intro |
And I log in as "admin"
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
@ -30,8 +29,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
Then I navigate to "General settings" node in "Site administration > Grades"
And I set the field "Show minimum grade" to "0"
And I press "Save changes"
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I click on "Edit assign Assignment1" "link"
And I should not see "Minimum grade"
@ -42,8 +40,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
When I navigate to "Grader report" node in "Site administration > Grades > Report settings"
And I set the field "Show calculations" to "0"
And I press "Save changes"
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
Then "Edit calculation for Course total" "link" should not exist
@ -53,7 +50,6 @@ Feature: Site settings can be used to hide parts of the gradebook UI
Then I navigate to "Grade category settings" node in "Site administration > Grades"
And I set the field "Allow category grades to be manually overridden" to "0"
And I press "Save changes"
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And "tr .course input[type='text']" "css_element" should not exist

View file

@ -41,7 +41,7 @@ Feature: We can use calculated grade totals
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
And I log out
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I change window size to "large"
@ -256,7 +256,7 @@ Feature: We can use calculated grade totals
And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
And I log out
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Test outcome item one":
| Extra credit | 1 |
@ -268,7 +268,7 @@ Feature: We can use calculated grade totals
And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)"
And I log out
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Course 1":
| Aggregation | Natural |
@ -370,8 +370,7 @@ Feature: We can use calculated grade totals
Scenario: Natural aggregation with drop lowest
When I log out
And I log in as "admin"
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I set the following settings for grade item "Sub category 1":

View file

@ -33,8 +33,7 @@ Feature: Changing the aggregation of an item affects its weight and extra credit
And I log in as "admin"
And I set the following administration settings values:
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I follow "Edit Cat mean"

View file

@ -21,8 +21,7 @@ Feature: Average grades are displayed in the gradebook
| student2 | C1 | student |
| student3 | C1 | student |
And I log in as "admin"
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
# Enable averages
And I navigate to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
@ -58,8 +57,7 @@ Feature: Average grades are displayed in the gradebook
# Check the user grade table
And I log in as "student1"
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "User report" in the course gradebook
Then I should see "50.00" in the ".level2.column-grade" "css_element"
Then I should see "50.00" in the ".level2.column-average" "css_element"

View file

@ -19,8 +19,7 @@ Feature: Calculated grade items can be used in the gradebook
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "admin"
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
@javascript

View file

@ -20,8 +20,7 @@ Feature: Gradebook calculations for calculated grade items before the fix 201506
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "admin"
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
@javascript

View file

@ -29,7 +29,7 @@ Feature: We can understand the gradebook user report
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
And I log out
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "60.00" to the user "Student 1" for the grade item "Test assignment one"

View file

@ -32,8 +32,7 @@ Feature: Editing a grade item
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
And I log out
And I log in as "teacher1"
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I press "Add category"
And I set the following fields to these values:

View file

@ -19,8 +19,7 @@ Feature: Extra credit contributions are normalised when going out of bounds
And I log in as "admin"
And I set the following administration settings values:
| grade_aggregations_visible | Simple weighted mean of grades,Mean of grades (with extra credits),Natural |
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I press "Add grade item"
And I set the following fields to these values:
@ -45,7 +44,7 @@ Feature: Extra credit contributions are normalised when going out of bounds
And I press "Save changes"
And I log out
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Manual item 1"

View file

@ -20,8 +20,7 @@ Feature: We can change the maximum and minimum number of points for manual items
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1"
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I press "Add grade item"
And I set the following fields to these values:
@ -35,7 +34,7 @@ Feature: We can change the maximum and minimum number of points for manual items
And I press "Save changes"
Scenario: Change maximum number of points on a graded item.
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 1"

View file

@ -34,7 +34,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when
And I press "Save changes"
When I log out
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "50.00" to the user "Student 1" for the grade item "Test assignment one"
@ -43,7 +43,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when
And I set the following settings for grade item "Test assignment four":
| Hidden | 1 |
And I press "Save changes"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > User report" in the course gradebook
And I select "Myself" from the "View report as" singleselect
And I select "Student 1" from the "Select all or one user" singleselect
@ -55,7 +55,7 @@ Feature: Student and teacher's view of aggregated grade items is consistent when
| Course total | - | 100.00 | 0200 | 50.00 % | - |
When I log out
And I log in as "student1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "User report" in the course gradebook
Then the following should exist in the "user-grade" table:
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |

View file

@ -28,8 +28,7 @@ Feature: Grade item validation
| Name | Letter scale |
| Scale | Disappointing, Good, Very good, Excellent |
And I press "Save changes"
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I press "Add grade item"
And I set the following fields to these values:

View file

@ -21,7 +21,7 @@ Feature: We can customise the letter boundary of a course.
| activity | course | idnumber | name | intro | grade |
| assign | C1 | a1 | Test assignment one | Submit something! | 100 |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
| Grade display type | Letter |

View file

@ -22,7 +22,7 @@ Feature: We can customise the letter boundary of a course in gradebook version 2
| activity | course | idnumber | name | intro | grade |
| assign | C1 | a1 | Test assignment one | Submit something! | 100 |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Course grade settings" in the course gradebook
And I set the following fields to these values:
| Grade display type | Letter |

View file

@ -25,8 +25,7 @@ Feature: We can use a minimum grade different than zero
And I log in as "admin"
And I set the following administration settings values:
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I press "Add grade item"
And I set the following fields to these values:
@ -84,7 +83,7 @@ Feature: We can use a minimum grade different than zero
| Exclude empty grades | 0 |
And I log out
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
When I give the grade "-25.00" to the user "Student 1" for the grade item "Manual item 1"

View file

@ -24,7 +24,7 @@ Feature: Weights in natural aggregation are adjusted if the items are excluded f
| assign | C1 | a4 | Test assignment four (extra) | x | 20 |
| assign | C1 | a5 | Test assignment five (extra) | x | 10 |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Test assignment four (extra)":
| Extra credit | 1 |

View file

@ -25,7 +25,7 @@ Feature: Gradebook calculations for extra credit items before the fix 20150619
| assign | C1 | a4 | Test assignment four (extra) | x | 20 |
| assign | C1 | a5 | Test assignment five (extra) | x | 10 |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the following settings for grade item "Test assignment four (extra)":
| Extra credit | 1 |

View file

@ -31,7 +31,7 @@ Feature: We can use natural aggregation and weights will be normalised to a tota
| assign | C1 | a6 | Test assignment six | Submit something! | Sub category 1 | 10 |
| assign | C1 | a7 | Test assignment seven | Submit nothing! | Sub category 1 | 15 |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
@javascript

View file

@ -32,7 +32,7 @@ Feature: Gradebook calculations for natural weights normalisation before the fix
| assign | C1 | a6 | Test assignment six | Submit something! | Sub category 1 | 10 |
| assign | C1 | a7 | Test assignment seven | Submit nothing! | Sub category 1 | 15 |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
@javascript

View file

@ -15,7 +15,7 @@ Feature: Grade letters can be overridden
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Letters > Edit" in the course gradebook
Scenario Outline: Grade letters can be completely overridden

View file

@ -19,8 +19,7 @@ Feature: We can change the grading type and maximum grade point values
| Grade point maximum | 900 |
| Grade point default | 800 |
And I press "Save changes"
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
@javascript
Scenario: Validate that switching the type of grading used correctly disables input form elements
@ -97,8 +96,7 @@ Feature: We can change the grading type and maximum grade point values
And I set the following fields to these values:
| Grade point maximum | 100 |
And I press "Save changes"
And I am on site homepage
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test Assignment 1"
And I navigate to "Edit settings" in current page administration
And I press "Save and display"

View file

@ -42,7 +42,7 @@ Feature: View gradebook when scales are used
| activity | course | idnumber | name | intro | gradecategory |
| assign | C1 | a1 | Test assignment one | Submit something! | Sub category 1 |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test assignment one"
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
@ -70,7 +70,7 @@ Feature: View gradebook when scales are used
And I set the field "Grade" to "F"
And I press "Save changes"
And I press "Ok"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Course grade settings" in the course gradebook
And I set the field "Show weightings" to "Show"
And I set the field "Show contribution to course total" to "Show"

View file

@ -38,7 +38,7 @@ Feature: Control the aggregation of the scales
Scenario Outline: Scales can be excluded from aggregation
Given I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
When I give the grade "10" to the user "Student 1" for the grade item "Grade me"
@ -59,7 +59,7 @@ Feature: Control the aggregation of the scales
| grade_includescalesinaggregation | 1 |
And I log out
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > User report" in the course gradebook
And I select "Student 1" from the "Select all or one user" singleselect
And the following should exist in the "user-grade" table:
@ -83,7 +83,7 @@ Feature: Control the aggregation of the scales
@javascript
Scenario: Weights of scales cannot be edited when they are not aggregated
Given I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
When I set the following settings for grade item "Course 1":
@ -98,7 +98,7 @@ Feature: Control the aggregation of the scales
And I should not see "Weight"
And the following config values are set as admin:
| grade_includescalesinaggregation | 1 |
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Gradebook setup" in the course gradebook
And I set the field "Override weight of Grade me" to "1"
And the field "Override weight of Grade me" matches value "95.238"

View file

@ -36,7 +36,7 @@ Feature: View gradebook when single item scales are used
| activity | course | idnumber | name | intro | gradecategory |
| assign | C1 | a1 | Test assignment one | Submit something! | Sub category 1 |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test assignment one"
And I navigate to "Edit settings" in current page administration
And I expand all fieldsets
@ -48,7 +48,7 @@ Feature: View gradebook when single item scales are used
And I set the field "Grade" to "A"
And I press "Save changes"
And I press "Ok"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Setup > Course grade settings" in the course gradebook
And I set the field "Show weightings" to "Show"
And I set the field "Show contribution to course total" to "Show"

View file

@ -19,7 +19,7 @@ Feature: We can set the grade to pass value
| name | scale |
| Test Scale 1 | Disappointing, Good, Very good, Excellent |
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
@javascript
Scenario: Validate that switching the type of grading used correctly disables grade to pass
@ -58,7 +58,7 @@ Feature: We can set the grade to pass value
And I turn editing mode on
And I click on "Edit assign Test Assignment 1" "link"
Then the field "Grade to pass" matches value "25"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test Assignment 1"
And I follow "Edit settings"
And I expand all fieldsets
@ -83,7 +83,7 @@ Feature: We can set the grade to pass value
Then the field "Grade to pass" matches value "3"
And I set the field "Grade to pass" to "4"
And I press "Save changes"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test Assignment 1"
And I follow "Edit settings"
And the field "Grade to pass" matches value "4"
@ -119,7 +119,7 @@ Feature: We can set the grade to pass value
And the field "Grade to pass" matches value "10"
And I set the field "Grade to pass" to "15"
And I press "Save changes"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test Workshop 1"
And I follow "Edit settings"
And the field "Submission grade to pass" matches value "45"
@ -149,7 +149,7 @@ Feature: We can set the grade to pass value
Then the field "Grade to pass" matches value "9.5"
And I set the field "Grade to pass" to "8"
And I press "Save changes"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test Quiz 1"
And I follow "Edit settings"
And the field "Grade to pass" matches value "8.00"
@ -167,7 +167,7 @@ Feature: We can set the grade to pass value
Then the field "Grade to pass" matches value "90"
And I set the field "Grade to pass" to "80"
And I press "Save changes"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test Lesson 1"
And I follow "Edit settings"
And the field "Grade to pass" matches value "80"
@ -186,7 +186,7 @@ Feature: We can set the grade to pass value
Then the field "Grade to pass" matches value "90"
And I set the field "Grade to pass" to "80"
And I press "Save changes"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I click on "Edit settings" "link" in the "Test Database 1" activity
And the field "Grade to pass" matches value "80"
@ -214,7 +214,7 @@ Feature: We can set the grade to pass value
Then the field "Grade to pass" matches value "90"
And I set the field "Grade to pass" to "80"
And I press "Save changes"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test Forum 1"
And I follow "Edit settings"
And the field "Grade to pass" matches value "80"
@ -233,7 +233,7 @@ Feature: We can set the grade to pass value
Then the field "Grade to pass" matches value "90"
And I set the field "Grade to pass" to "80"
And I press "Save changes"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test Glossary 1"
And I follow "Edit settings"
And the field "Grade to pass" matches value "80"

View file

@ -22,8 +22,7 @@ Feature: We can enter in grades and view reports from the gradebook
| grade_aggregations_visible | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
And I log out
And I log in as "teacher1"
And I am on course page "Course 1"
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name 1 |
| Description | Submit your online text |
@ -34,14 +33,14 @@ Feature: We can enter in grades and view reports from the gradebook
| assignsubmission_onlinetext_enabled | 1 |
And I log out
And I log in as "student1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test assignment name 1"
When I press "Add submission"
And I set the following fields to these values:
| Online text | This is a submission for assignment 1 |
And I press "Save changes"
Then I should see "Submitted for grading"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test assignment name 2"
When I press "Add submission"
And I set the following fields to these values:
@ -50,7 +49,7 @@ Feature: We can enter in grades and view reports from the gradebook
Then I should see "Submitted for grading"
And I log out
And I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "View > Grader report" in the course gradebook
And I turn editing mode on
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name 1"