MDL-49324 grades: Remove unnecessary @javascript tag from tests
authorAndrew Nicols <andrew@nicols.co.uk>
Fri, 29 Jan 2016 06:19:23 +0000 (14:19 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 24 Feb 2016 06:39:09 +0000 (14:39 +0800)
grade/report/singleview/tests/behat/bulk_insert_grades.feature
grade/report/singleview/tests/behat/singleview.feature
grade/report/user/tests/behat/view_usereport.feature
grade/tests/behat/grade_UI_settings.feature
grade/tests/behat/grade_override_letter.feature
grade/tests/behat/grade_point_maximum.feature
grade/tests/behat/grade_scales_aggregation.feature
grade/tests/behat/grade_single_item_scales.feature
grade/tests/behat/grade_to_pass.feature

index a06a182..218a832 100644 (file)
@@ -29,7 +29,6 @@ Feature: We can bulk insert grades for students in a course
       | assign | C1 | a3 | Test assignment three | Submit something! |
       | assign | C1 | a4 | Test assignment four | Submit nothing!    |
 
-  @javascript
   Scenario: I can bulk insert grades and check their override flags for grade view.
     Given I log in as "teacher1"
     And I follow "Course 1"
@@ -44,7 +43,7 @@ Feature: We can bulk insert grades for students in a course
     And I follow "Single view for Test assignment one"
     Then the field "Grade for james (Student) 1" matches value "50.00"
     And the field "Override for james (Student) 1" matches value "0"
-    And I click on "Perform bulk insert" "checkbox"
+    And I set the field "Perform bulk insert" to "1"
     And I set the field "Insert value" to "1.0"
     And I press "Save"
     And I press "Continue"
@@ -56,8 +55,8 @@ Feature: We can bulk insert grades for students in a course
     And the field "Override for anna (Student) 3" matches value "1"
     And the field "Grade for zac (Student) 4" matches value "1.00"
     And the field "Override for zac (Student) 4" matches value "1"
-    And I click on "All grades" "option"
-    And I click on "Perform bulk insert" "checkbox"
+    And I set the field "For" to "All grades"
+    And I set the field "Perform bulk insert" to "1"
     And I set the field "Insert value" to "2.0"
     And I press "Save"
     And I press "Continue"
@@ -70,7 +69,6 @@ Feature: We can bulk insert grades for students in a course
     And the field "Grade for zac (Student) 4" matches value "2.00"
     And the field "Override for zac (Student) 4" matches value "1"
 
-  @javascript
   Scenario: I can bulk insert grades and check their override flags for user view.
     Given I log in as "teacher1"
     And I follow "Course 1"
@@ -83,11 +81,11 @@ Feature: We can bulk insert grades for students in a course
     And I press "Continue"
     And I follow "View gradebook"
     And I follow "Single view for Test assignment two"
-    And I click on "Student 1" "option"
+    And I select "Student 1" from the "Select user..." singleselect
     Then the field "Grade for Test assignment two" matches value "50.00"
     And the field "Override for Test assignment two" matches value "0"
-    And I click on "Perform bulk insert" "checkbox"
-    And I click on "Empty grades" "option"
+    And I set the field "For" to "Empty grades"
+    And I set the field "Perform bulk insert" to "1"
     And I set the field "Insert value" to "1.0"
     And I press "Save"
     And I press "Continue"
index 8036568..f12404d 100644 (file)
@@ -50,13 +50,13 @@ Feature: We can use Single view
 
   @javascript
   Scenario: I can update grades, add feedback and exclude grades.
-    Given I click on "Single view" "option"
-    And I click on "Student 4" "option"
-    And I click on "Override for Test assignment one" "checkbox"
+    Given I select "Single view" from the "Grade report" singleselect
+    And I select "Student 4" from the "Select user..." singleselect
+    And I set the field "Override for Test assignment one" to "1"
     When I set the following fields to these values:
         | Grade for Test assignment one | 10.00 |
         | Feedback for Test assignment one | test data |
-    And I click on "Exclude for Test assignment four" "checkbox"
+    And I set the field "Exclude for Test assignment four" to "1"
     And I press "Save"
     Then I should see "Grades were set for 2 items"
     And I press "Continue"
@@ -74,14 +74,13 @@ Feature: We can use Single view
     And I set the following fields to these values:
         | Grade for james (Student) 1 | 12.05 |
         | Feedback for james (Student) 1 | test data2 |
-    And I click on "Exclude for holly (Student) 2" "checkbox"
+    And I set the field "Exclude for holly (Student) 2" to "1"
     And I press "Save"
     Then I should see "Grades were set for 2 items"
     And I press "Continue"
     And the field "Grade for james (Student) 1" matches value "12.05"
     And the field "Exclude for holly (Student) 2" matches value "1"
-    And I click on "Single view" "link"
-    And I click on "new grade item 1" "option"
+    And I select "new grade item 1" from the "Select grade item..." singleselect
     And I click on "Very good" "option"
     And I press "Save"
     Then I should see "Grades were set for 1 items"
@@ -97,13 +96,12 @@ Feature: We can use Single view
     And I follow "Single view for Student 1"
     Then I should see "Student 1"
 
-  @javascript
   Scenario: I can bulk update grades.
     Given I follow "Single view for Student 1"
     Then I should see "Student 1"
-    When I click on "All grades" "option"
+    When I set the field "For" to "All grades"
     And I set the field "Insert value" to "1.0"
-    And I click on "Perform bulk insert" "checkbox"
+    And I set the field "Perform bulk insert" to "1"
     And I press "Save"
     Then I should see "Grades were set for 8 items"
 
index b4051b8..9bc1f8f 100644 (file)
@@ -14,7 +14,5 @@ Feature: We can use the user report
       And I follow "Course 1"
       And I navigate to "Grades" node in "Course administration"
       And I select "User report" from the "Grade report" singleselect
-      And I press "Go"
       And I select "All users (0)" from the "Select all or one user" singleselect
-      And I click on "Go" "button" in the "#choosegradeuser" "css_element"
       Then I should see "No students enrolled in this course yet"
index 72b1feb..e01b928 100644 (file)
@@ -28,7 +28,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
     When I click on "Edit  assign Assignment1" "link"
     And I should see "Minimum grade"
     Then I navigate to "General settings" node in "Site administration > Grades"
-    And I click on "Show minimum grade" "checkbox"
+    And I set the field "Show minimum grade" to "0"
     And I press "Save changes"
     And I am on site homepage
     And I follow "Course 1"
@@ -40,7 +40,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
   Scenario: Hide calculation icons
     And "Edit calculation for   Course total" "link" should exist
     When I navigate to "Grader report" node in "Site administration > Grades > Report settings"
-    And I click on "Show calculations" "checkbox"
+    And I set the field "Show calculations" to "0"
     And I press "Save changes"
     And I am on site homepage
     And I follow "Course 1"
@@ -51,7 +51,7 @@ Feature: Site settings can be used to hide parts of the gradebook UI
   Scenario: Disable category overriding
     And "tr .course input[type='text']" "css_element" should exist
     Then I navigate to "Grade category settings" node in "Site administration > Grades"
-    And I click on "Allow category grades to be manually overridden" "checkbox"
+    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 follow "Course 1"
index 12ac7d3..6abdcb9 100644 (file)
@@ -204,4 +204,4 @@ Feature: Grade letters can be overridden
       | 89.99 %  | 85.00 %  | β      |
       | 84.99 %  | 70.00 %  | γ      |
       | 69.99 %  | 55.00 %  | δ      |
-      | 54.99 %  | 0.00 %   | Ω      |
\ No newline at end of file
+      | 54.99 %  | 0.00 %   | Ω      |
index 1070302..c750f81 100644 (file)
@@ -76,7 +76,6 @@ Feature: We can change the grading type and maximum grade point values
     And the "Maximum grade" "field" should be disabled
     And I press "Save and return to course"
 
-  @javascript
   Scenario: Create an activity with a maximum grade point value higher than the system maximum
     When I follow "Test Assignment 1"
     And I follow "Edit settings"
@@ -87,7 +86,6 @@ Feature: We can change the grading type and maximum grade point values
     Then I should see "Invalid grade value. This must be an integer between 1 and 900"
     And I press "Cancel"
 
-  @javascript
   Scenario: Create an activity with a valid maximum grade point and then change the system maximum to be lower
     When I follow "Test Assignment 1"
     And I follow "Edit settings"
index 2c74e52..b866294 100644 (file)
@@ -36,7 +36,6 @@ Feature: Control the aggregation of the scales
       | grade_includescalesinaggregation | 0 |
     And I log out
 
-  @javascript
   Scenario Outline: Scales can be excluded from aggregation
     Given I log in as "teacher1"
     And I follow "Course 1"
index 190e1f7..ed3a96a 100644 (file)
@@ -56,7 +56,6 @@ Feature: View gradebook when single item scales are used
     And I follow "Grader report"
     And I turn editing mode on
 
-  @javascript
   Scenario: Test displaying single item scales in gradebook in aggregation method Natural
     When I turn editing mode off
     Then the following should exist in the "user-grades" table:
@@ -67,36 +66,33 @@ Feature: View gradebook when single item scales are used
       | Range              | Ace!–Ace! | 0.00–1.00      | 0.00–1.00    |
       | Overall average    | Ace!      | 1.00           | 1.00         |
     And I follow "User report"
-    And I set the field "Select all or one user" to "Student 1"
+    And I select "Student 1" from the "Select all or one user" singleselect
     And the following should exist in the "user-grade" table:
       | Grade item          | Grade | Range     | Contribution to course total |
       | Test assignment one | Ace!  | Ace!–Ace! | 100.00 %                     |
       | Sub category 1 total| 1.00  | 0–1       | -                            |
       | Course total        | 1.00  | 0–1       | -                            |
-    And I set the field "Select all or one user" to "Student 2"
+    And I select "Student 2" from the "Select all or one user" singleselect
     And the following should exist in the "user-grade" table:
       | Grade item          | Grade | Range     | Contribution to course total |
       | Test assignment one | -     | Ace!–Ace! | -                            |
       | Sub category 1 total| -     | 0–1       | -                            |
       | Course total        | -     | 0–1       | -                            |
-    And I set the field "jump" to "Gradebook setup"
+    And I select "Gradebook setup" from the "jump" singleselect
     And the following should exist in the "grade_edit_tree_table" table:
       | Name                | Max grade |
       | Test assignment one | 1.00      |
       | Sub category 1 total| 1.00      |
       | Course total        | 1.00      |
 
-  @javascript
   Scenario Outline: Test displaying single item scales in gradebook in all other aggregation methods
     When I follow "Edit   Course 1"
     And I set the field "Aggregation" to "<aggregation>"
     And I press "Save changes"
     And I follow "Edit   Sub category 1"
-    And I expand all fieldsets
-    And I set the field "Aggregation" to "<aggregation>"
-    And I set the field "Category name" to "Sub category (<aggregation>)"
-    # And I set the field "Maximum grade" to "5"
-    # And I set the field "Minimum grade" to "1"
+    And I set the following fields to these values:
+      | Aggregation     | <aggregation> |
+      | Category name   | Sub category (<aggregation>) |
     And I press "Save changes"
     And I turn editing mode off
     Then the following should exist in the "user-grades" table:
@@ -108,19 +104,18 @@ Feature: View gradebook when single item scales are used
       | Range              | Ace!–Ace! | 0.00–100.0     | 0.00–100.00    |
       | Overall average    | Ace!      | <catavg>       | <overallavg>   |
     And I follow "User report"
-    And I set the field "Select all or one user" to "Student 1"
-    And I click on "Select all or one user" "select"
+    And I select "Student 1" from the "Select all or one user" singleselect
     And the following should exist in the "user-grade" table:
       | Grade item                                       | Grade          | Range       | Contribution to course total |
       | Test assignment one                              | Ace!           | Ace!–Ace!   | <contrib1>                   |
       | Sub category (<aggregation>) total<aggregation>. | <cattotal1>    | 0–100       | -                            |
       | Course total<aggregation>.                       | <coursetotal1> | 0–100       | -                            |
-    And I set the field "jump" to "Gradebook setup"
+    And I select "Gradebook setup" from the "jump" singleselect
     And the following should exist in the "grade_edit_tree_table" table:
-      | Name                         | Max grade |
-      | Test assignment one          | Ace! (1)  |
+      | Name                                             | Max grade |
+      | Test assignment one                              | Ace! (1)  |
       | Sub category (<aggregation>) total<aggregation>. | 100.00    |
-      | Course total<aggregation>.   | 100.00    |
+      | Course total<aggregation>.                       | 100.00    |
 
     Examples:
       | aggregation                         | contrib1 | cattotal1 | coursetotal1 | catavg | overallavg |
index 34360b1..7125b62 100644 (file)
@@ -45,7 +45,6 @@ Feature: We can set the grade to pass value
     Then I should see "The grade to pass can not be greater than the maximum possible grade 50"
     And I press "Cancel"
 
-  @javascript
   Scenario: Set a valid grade to pass for an assignment activity using points
     When I turn editing mode on
     And I add a "Assignment" to section "1" and I fill the form with:
@@ -69,7 +68,6 @@ Feature: We can set the grade to pass value
     And I click on "Edit  assign Test Assignment 1" "link"
     And the field "Grade to pass" matches value "30"
 
-  @javascript
   Scenario: Set a valid grade to pass for an assignment activity using scales
     When I turn editing mode on
     And I add a "Assignment" to section "1" and I fill the form with:
@@ -81,7 +79,7 @@ Feature: We can set the grade to pass value
     And I navigate to "Grades" node in "Course administration"
     And I turn editing mode on
     And I click on "Edit  assign Test Assignment 1" "link"
-    And I follow "Show more..."
+    And I expand all fieldsets
     Then the field "Grade to pass" matches value "3"
     And I set the field "Grade to pass" to "4"
     And I press "Save changes"
@@ -90,7 +88,6 @@ Feature: We can set the grade to pass value
     And I follow "Edit settings"
     And the field "Grade to pass" matches value "4"
 
-  @javascript
   Scenario: Set a invalid grade to pass for an assignment activity using scales
     When I turn editing mode on
     And I add a "Assignment" to section "1" and I fill the form with:
@@ -101,7 +98,6 @@ Feature: We can set the grade to pass value
       | Grade to pass | 10 |
     Then I should see "The grade to pass can not be greater than the maximum possible grade 4"
 
-  @javascript
   Scenario: Set a valid grade to pass for workshop activity
     When I turn editing mode on
     And I add a "Workshop" to section "1" and I fill the form with:
@@ -114,12 +110,12 @@ Feature: We can set the grade to pass value
     And I navigate to "Grades" node in "Course administration"
     And I turn editing mode on
     And I click on "Edit  workshop Test Workshop 1 (submission)" "link"
-    And I follow "Show more..."
+    And I expand all fieldsets
     Then the field "Grade to pass" matches value "40"
     And I set the field "Grade to pass" to "45"
     And I press "Save changes"
     And I click on "Edit  workshop Test Workshop 1 (assessment)" "link"
-    And I follow "Show more..."
+    And I expand all fieldsets
     And the field "Grade to pass" matches value "10"
     And I set the field "Grade to pass" to "15"
     And I press "Save changes"
@@ -129,7 +125,6 @@ Feature: We can set the grade to pass value
     And the field "Submission grade to pass" matches value "45"
     And the field "Assessment grade to pass" matches value "15"
 
-  @javascript
   Scenario: Set an invalid grade to pass for workshop activity
     When I turn editing mode on
     And I add a "Workshop" to section "1" and I fill the form with:
@@ -142,7 +137,6 @@ Feature: We can set the grade to pass value
     Then "The grade to pass can not be greater than the maximum possible grade 80" "text" should exist in the "#fitem_id_submissiongradepass .error" "css_element"
     Then "The grade to pass can not be greater than the maximum possible grade 20" "text" should exist in the "#fitem_id_gradinggradepass .error" "css_element"
 
-  @javascript
   Scenario: Set a valid grade to pass for quiz activity
     When I turn editing mode on
     And I add a "Quiz" to section "1" and I fill the form with:
@@ -151,7 +145,7 @@ Feature: We can set the grade to pass value
     And I navigate to "Grades" node in "Course administration"
     And I turn editing mode on
     And I click on "Edit  quiz Test Quiz 1" "link"
-    And I follow "Show more..."
+    And I expand all fieldsets
     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"
@@ -160,7 +154,6 @@ Feature: We can set the grade to pass value
     And I follow "Edit settings"
     And the field "Grade to pass" matches value "8.00"
 
-  @javascript
   Scenario: Set a valid grade to pass for lesson activity
     When I turn editing mode on
     And I add a "Lesson" to section "1" and I fill the form with:
@@ -170,7 +163,7 @@ Feature: We can set the grade to pass value
     And I navigate to "Grades" node in "Course administration"
     And I turn editing mode on
     And I click on "Edit  lesson Test Lesson 1" "link"
-    And I follow "Show more..."
+    And I expand all fieldsets
     Then the field "Grade to pass" matches value "90"
     And I set the field "Grade to pass" to "80"
     And I press "Save changes"
@@ -179,7 +172,6 @@ Feature: We can set the grade to pass value
     And I follow "Edit settings"
     And the field "Grade to pass" matches value "80"
 
-  @javascript
   Scenario: Set a valid grade to pass for database activity
     When I turn editing mode on
     And I add a "Database" to section "1" and I fill the form with:
@@ -190,7 +182,7 @@ Feature: We can set the grade to pass value
     And I navigate to "Grades" node in "Course administration"
     And I turn editing mode on
     And I click on "Edit  data Test Database 1" "link"
-    And I follow "Show more..."
+    And I expand all fieldsets
     Then the field "Grade to pass" matches value "90"
     And I set the field "Grade to pass" to "80"
     And I press "Save changes"
@@ -199,7 +191,6 @@ Feature: We can set the grade to pass value
     And I follow "Edit settings"
     And the field "Grade to pass" matches value "80"
 
-  @javascript
   Scenario: Set an invalid grade to pass for forum activity
     When I turn editing mode on
     And I add a "Forum" to section "1" and I fill the form with:
@@ -210,7 +201,6 @@ Feature: We can set the grade to pass value
       | scale[modgrade_point] | 60 |
     Then I should see "The grade to pass can not be greater than the maximum possible grade 60"
 
-  @javascript
   Scenario: Set a valid grade to pass for forum activity
     When I turn editing mode on
     And I add a "Forum" to section "1" and I fill the form with:
@@ -221,7 +211,7 @@ Feature: We can set the grade to pass value
     And I navigate to "Grades" node in "Course administration"
     And I turn editing mode on
     And I click on "Edit  forum Test Forum 1" "link"
-    And I follow "Show more..."
+    And I expand all fieldsets
     Then the field "Grade to pass" matches value "90"
     And I set the field "Grade to pass" to "80"
     And I press "Save changes"
@@ -230,7 +220,6 @@ Feature: We can set the grade to pass value
     And I follow "Edit settings"
     And the field "Grade to pass" matches value "80"
 
-  @javascript
   Scenario: Set a valid grade to pass for glossary activity
     When I turn editing mode on
     And I add a "Glossary" to section "1" and I fill the form with:
@@ -241,7 +230,7 @@ Feature: We can set the grade to pass value
     And I navigate to "Grades" node in "Course administration"
     And I turn editing mode on
     And I click on "Edit  glossary Test Glossary 1" "link"
-    And I follow "Show more..."
+    And I expand all fieldsets
     Then the field "Grade to pass" matches value "90"
     And I set the field "Grade to pass" to "80"
     And I press "Save changes"