mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-56630 behat: Click on link in specificed block/region
This commit is contained in:
parent
1fd6b25579
commit
dc90838aaa
55 changed files with 216 additions and 183 deletions
|
@ -87,7 +87,7 @@ Feature: Marking guides can be created and edited
|
|||
And I press "Ok"
|
||||
And I follow "Edit settings"
|
||||
And I follow "Test assignment 1 name"
|
||||
And I follow "View all submissions"
|
||||
And I click on "View all submissions" "link" in the "Administration" "block"
|
||||
# Checking that the user grade is correct.
|
||||
Then I should see "80" in the "Student 1" "table_row"
|
||||
And I log out
|
||||
|
|
|
@ -49,7 +49,13 @@ class behat_grading extends behat_base {
|
|||
|
||||
$this->execute('behat_general::click_link', $this->escape($activityname));
|
||||
|
||||
$this->execute('behat_general::click_link', get_string('gradingmanagement', 'grading'));
|
||||
$this->execute('behat_general::i_click_on_in_the',
|
||||
array(
|
||||
get_string('gradingmanagement', 'grading'),
|
||||
'link',
|
||||
'Administration',
|
||||
'block'
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -86,7 +92,13 @@ class behat_grading extends behat_base {
|
|||
|
||||
$this->execute('behat_general::click_link', $this->escape($activityname));
|
||||
|
||||
$this->execute('behat_general::click_link', $this->escape(get_string('viewgrading', 'assign')));
|
||||
$this->execute('behat_general::i_click_on_in_the',
|
||||
array(
|
||||
get_string('viewgrading', 'mod_assign'),
|
||||
'link',
|
||||
'Administration',
|
||||
'block'
|
||||
));
|
||||
|
||||
$this->execute('behat_general::i_click_on_in_the',
|
||||
array(
|
||||
|
@ -157,7 +169,13 @@ class behat_grading extends behat_base {
|
|||
$this->execute('behat_forms::press_button', 'Ok');
|
||||
$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_general::i_click_on', array($this->escape(get_string('viewgrading', 'mod_assign')), 'link'));
|
||||
$this->execute('behat_general::i_click_on_in_the',
|
||||
array(
|
||||
get_string('viewgrading', 'mod_assign'),
|
||||
'link',
|
||||
'Administration',
|
||||
'block'
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,7 +33,7 @@ Feature: We can bulk insert grades for students in a course
|
|||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Test assignment one"
|
||||
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 following fields to these values:
|
||||
| Grade out of 100 | 50 |
|
||||
|
@ -74,7 +74,7 @@ Feature: We can bulk insert grades for students in a course
|
|||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Test assignment two"
|
||||
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 following fields to these values:
|
||||
| Grade out of 100 | 50 |
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue