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

@ -16,8 +16,7 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al
| user | course | role |
| teacher1 | C1 | editingteacher |
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 "Forum" to section "1" and I fill the form with:
| Forum name | Test forum name |
| Description | Test forum description |
@ -30,7 +29,7 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al
And I press "Save changes"
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
When I follow "Test forum name"
Then I should not see "Subscribe to this forum"
@ -43,7 +42,7 @@ Feature: Guest users can auto-enrol themself in courses where guest access is al
And I press "Save changes"
And I log out
And I log in as "student1"
When I am on course page "Course 1"
When I am on "Course 1" course homepage
Then I should see "Guest access"
And I set the following fields to these values:
| Password | moodle_rules |

View file

@ -30,7 +30,7 @@ Feature: Check that settings are adhered to when creating an enrolment plugin
Scenario: As an admin set site-wide settings for the enrolment plugin and ensure they are used
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 "Enrolment methods" node in "Course administration > Users"
And I select "Publish as LTI tool" from the "Add method" singleselect
When I expand all fieldsets

View file

@ -21,8 +21,7 @@ Feature: Check that the page listing the shared external tools is functioning as
Scenario: I want to edit an external tool
Given 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 |
| Description | Submit your online text |

View file

@ -34,7 +34,7 @@ Feature: Enrolments are synchronised with meta courses
And I am on course index
Scenario: Add meta enrolment instance without groups
When I am on course page "Course 3"
When I am on "Course 3" course homepage
And I add "Course meta link" enrolment method with:
| Link course | C1C1 |
And I navigate to "Enrolled users" node in "Course administration > Users"
@ -43,11 +43,11 @@ Feature: Enrolments are synchronised with meta courses
And I should not see "Groupcourse" in the "table.userenrolment" "css_element"
Scenario: Add meta enrolment instance with groups
When I am on course page "Course 3"
When I am on "Course 3" course homepage
And I add "Course meta link" enrolment method with:
| Link course | C1C1 |
| Add to group | Groupcourse 1 |
And I am on course page "Course 3"
And I am on "Course 3" course homepage
And I add "Course meta link" enrolment method with:
| Link course | C2C2 |
| Add to group | Groupcourse 2 |
@ -62,7 +62,7 @@ Feature: Enrolments are synchronised with meta courses
And I should not see "Groupcourse 2" in the "Student 4" "table_row"
Scenario: Add meta enrolment instance with auto-created groups
When I am on course page "Course 3"
When I am on "Course 3" course homepage
And I add "Course meta link" enrolment method with:
| Link course | C1C1 |
| Add to group | Create new group |
@ -75,11 +75,11 @@ Feature: Enrolments are synchronised with meta courses
And the "Groups" select box should contain "Course 1 course (4)"
Scenario: Backup and restore of meta enrolment instance
When I am on course page "Course 3"
When I am on "Course 3" course homepage
And I add "Course meta link" enrolment method with:
| Link course | C1C1 |
| Add to group | Groupcourse 1 |
And I am on course page "Course 3"
And I am on "Course 3" course homepage
And I add "Course meta link" enrolment method with:
| Link course | C2C2 |
When I backup "Course 3" course using this options:
@ -94,7 +94,7 @@ Feature: Enrolments are synchronised with meta courses
And I press "Perform restore"
And I trigger cron
And I am on course index
And I am on course page "Course 4"
And I follow "Course 4"
And I navigate to "Enrolment methods" node in "Course administration > Users"
Then I should see "Course meta link (Course 1)"
And I should see "Course meta link (Course 2)"

View file

@ -34,13 +34,13 @@ Feature: Users can be defined as key holders in courses where self enrolment is
@javascript
Scenario: The key holder name is displayed on site home page
Given I log in as "admin"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
When I add "Self enrolment" enrolment method with:
| Custom instance name | Test student enrolment |
| Enrolment key | moodle_rules |
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 should see "You should have received this enrolment key from:"
And I should see "Manager 1"
And I set the following fields to these values:

View file

@ -21,11 +21,11 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
@javascript
Scenario: Self-enrolment enabled as guest
Given I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I add "Self enrolment" enrolment method with:
| Custom instance name | Test student enrolment |
And I log out
When I am on course page "Course 1"
When I am on "Course 1" course homepage
And I press "Log in as a guest"
Then I should see "Guests cannot access this course. Please log in."
And I press "Continue"
@ -33,25 +33,25 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
Scenario: Self-enrolment enabled
Given I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
When I add "Self enrolment" enrolment method with:
| Custom instance name | Test student enrolment |
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 press "Enrol me"
Then I should see "Topic 1"
And I should not see "Enrolment options"
Scenario: Self-enrolment enabled requiring an enrolment key
Given I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
When I add "Self enrolment" enrolment method with:
| Custom instance name | Test student enrolment |
| Enrolment key | moodle_rules |
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 set the following fields to these values:
| Enrolment key | moodle_rules |
And I press "Enrol me"
@ -61,17 +61,17 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
Scenario: Self-enrolment disabled
Given I log in as "student1"
When I am on course page "Course 1"
When I am on "Course 1" course homepage
Then I should see "You can not enrol yourself in this course"
Scenario: Self-enrolment enabled requiring a group enrolment key
Given I log in as "teacher1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
When I add "Self enrolment" enrolment method with:
| Custom instance name | Test student enrolment |
| Enrolment key | moodle_rules |
| Use group enrolment keys | Yes |
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
And I press "Create group"
And I set the following fields to these values:
@ -80,7 +80,7 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
And I press "Save changes"
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 set the following fields to these values:
| Enrolment key | Test-groupenrolkey1 |
And I press "Enrol me"

View file

@ -24,7 +24,7 @@ Feature: Users can be added to multiple groups at once
Scenario: Adding a user to one group
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 "Enrolled users" node in "Course administration > Users"
And I click on "Add user into group" "link" in the "student1" "table_row"
When I set the field "Add user into group" to "Group 1"
@ -33,7 +33,7 @@ Feature: Users can be added to multiple groups at once
Scenario: Adding a user to multiple group
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 "Enrolled users" node in "Course administration > Users"
And I click on "Add user into group" "link" in the "student1" "table_row"
When I set the field "Add user into group" to "Group 1, Group 2, Group 3"

View file

@ -13,7 +13,7 @@ Feature: User can be enrolled into a course
| Course 001 | C001 |
And I log in as "admin"
And I am on course index
And I am on course page "Course 001"
And I am on "Course 001" course homepage
Scenario: User can be enrolled without javascript
When I enrol "Studie One" user as "Student"

View file

@ -39,7 +39,7 @@ Feature: Enrolled users can be filtered by group
Scenario Outline:
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 "Enrolled users" node in "Course administration > Users"
When I set the field "Group" to "<group>"

View file

@ -19,7 +19,7 @@ Feature: Manage enrollments from participants page
| student2 | C1 | student |
| 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 course participants
Scenario: Check the participants link when "All partipants" selected