MDL-56630 behat: Click on link in specificed block/region

This commit is contained in:
Rajesh Taneja 2016-11-08 14:38:48 +08:00
parent 1fd6b25579
commit dc90838aaa
No known key found for this signature in database
GPG key ID: B363F7FB787F80E4
55 changed files with 216 additions and 183 deletions

View file

@ -25,7 +25,7 @@ Feature: We can change the grading type and maximum grade point values
@javascript
Scenario: Validate that switching the type of grading used correctly disables input form elements
When I follow "Test Assignment 1"
And I follow "Edit settings"
And I click on "Edit settings" "link" in the "Administration" "block"
And I expand all fieldsets
And I set the field "grade[modgrade_type]" to "Point"
Then the "Scale" "select" should be disabled
@ -41,12 +41,12 @@ Feature: We can change the grading type and maximum grade point values
@javascript
Scenario: Create an activity with a maximum grade point value less than the system maximum
When I follow "Test Assignment 1"
And I follow "Edit settings"
And I click on "Edit settings" "link" in the "Administration" "block"
And I expand all fieldsets
And I set the field "grade[modgrade_type]" to "point"
And I set the field "grade[modgrade_point]" to "600"
And I press "Save and display"
And I follow "Edit settings"
And I click on "Edit settings" "link" in the "Administration" "block"
Then the field "grade[modgrade_point]" matches value "600"
And the "Scale" "select" should be disabled
And I press "Save and return to course"
@ -54,12 +54,12 @@ Feature: We can change the grading type and maximum grade point values
@javascript
Scenario: Create an activity with a scale as the grade type
When I follow "Test Assignment 1"
And I follow "Edit settings"
And I click on "Edit settings" "link" in the "Administration" "block"
And I expand all fieldsets
And I set the field "grade[modgrade_type]" to "Scale"
And I set the field "grade[modgrade_scale]" to "Separate and Connected ways of knowing"
And I press "Save and display"
And I follow "Edit settings"
And I click on "Edit settings" "link" in the "Administration" "block"
Then the field "grade[modgrade_scale]" matches value "Separate and Connected ways of knowing"
And the "Maximum grade" "field" should be disabled
And I press "Save and return to course"
@ -67,18 +67,18 @@ Feature: We can change the grading type and maximum grade point values
@javascript
Scenario: Create an activity with no grade as the grade type
When I follow "Test Assignment 1"
And I follow "Edit settings"
And I click on "Edit settings" "link" in the "Administration" "block"
And I expand all fieldsets
And I set the field "grade[modgrade_type]" to "None"
And I press "Save and display"
And I follow "Edit settings"
And I click on "Edit settings" "link" in the "Administration" "block"
And the "Scale" "select" should be disabled
And the "Maximum grade" "field" should be disabled
And I press "Save and return to course"
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"
And I click on "Edit settings" "link" in the "Administration" "block"
And I expand all fieldsets
And I set the field "grade[modgrade_type]" to "Point"
And I set the field "grade[modgrade_point]" to "20000"
@ -88,7 +88,7 @@ Feature: We can change the grading type and maximum grade point values
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"
And I click on "Edit settings" "link" in the "Administration" "block"
And I expand all fieldsets
And I set the field "grade[modgrade_type]" to "point"
And I set the field "grade[modgrade_point]" to "600"
@ -100,7 +100,7 @@ Feature: We can change the grading type and maximum grade point values
And I am on site homepage
And I follow "Course 1"
And I follow "Test Assignment 1"
And I follow "Edit settings"
And I click on "Edit settings" "link" in the "Administration" "block"
And I press "Save and display"
Then I should see "Invalid grade value. This must be an integer between 1 and 100"
And I press "Cancel"

View file

@ -44,12 +44,12 @@ Feature: View gradebook when scales are used
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Test assignment one"
And I follow "Edit settings"
And I click on "Edit settings" "link" in the "Administration" "block"
And I expand all fieldsets
And I set the field "grade[modgrade_type]" to "Scale"
And I set the field "grade[modgrade_scale]" to "Letterscale"
And I press "Save and display"
And I follow "View all submissions"
And I click on "View all submissions" "link" in the "Administration" "block"
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"

View file

@ -38,12 +38,12 @@ Feature: View gradebook when single item scales are used
And I log in as "teacher1"
And I follow "Course 1"
And I follow "Test assignment one"
And I follow "Edit settings"
And I click on "Edit settings" "link" in the "Administration" "block"
And I expand all fieldsets
And I set the field "grade[modgrade_type]" to "Scale"
And I set the field "grade[modgrade_scale]" to "Singleitem"
And I press "Save and display"
And I follow "View all submissions"
And I click on "View all submissions" "link" in the "Administration" "block"
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"