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

@ -57,7 +57,7 @@ Feature: Set up contextual data for tests
| Grouping 1 | C1 | GG1 |
| Grouping 2 | C1 | GG2 |
When I log in as "admin"
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
Then I should see "Group 1"
And I should see "Group 2"
@ -86,7 +86,7 @@ Feature: Set up contextual data for tests
| mod/forum:editanypost | Allow | student | Course | C1 |
| mod/forum:replynews | Prevent | editingteacher | Course | C1 |
When I log in as "admin"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Users > Permissions" in current page administration
And I set the field "Advanced role override" to "Student (1)"
Then "mod/forum:editanypost" capability has "Allow" permission
@ -106,7 +106,7 @@ Feature: Set up contextual data for tests
| user | course | role |
| student1 | C1 | student |
When I log in as "student1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
Then I should see "Topic 1"
Scenario: Add role assigns
@ -142,20 +142,20 @@ Feature: Set up contextual data for tests
Then "Edit settings" "link" should exist in current page administration
And I log out
And I log in as "user2"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And "Turn editing on" "link" should exist in current page administration
And I log out
And I log in as "user3"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And "Turn editing on" "link" should exist in current page administration
And I log out
And I log in as "user4"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And "Turn editing on" "link" should exist in current page administration
And I log out
And I log in as "user5"
And I should see "You are logged in as"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I should see "You can not enrol yourself in this course."
Scenario: Add modules
@ -193,7 +193,7 @@ Feature: Set up contextual data for tests
| activity | name | intro | course | idnumber | grade |
| assign | Test assignment name with scale | Test assignment description | C1 | assign1 | Test Scale 1 |
When I log in as "admin"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
Then I should see "Test assignment name"
# Assignment 2.2 module type is disabled by default
# And I should see "Test assignment22 name"
@ -254,7 +254,7 @@ Feature: Set up contextual data for tests
| grouping | group |
| GG1 | G1 |
When I log in as "admin"
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
Then the "groups" select box should contain "Group 1 (1)"
And the "groups" select box should contain "Group 2 (1)"
@ -313,7 +313,7 @@ Feature: Set up contextual data for tests
| Grade sub category 2 | C1 | Grade category 1 |
When I log in as "admin"
And I am on course index
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 I should see "Grade category 1"
And I should see "Grade sub category 2"
@ -336,7 +336,7 @@ Feature: Set up contextual data for tests
| Test Grade Item 2 | C1 | Grade category 1 |
| Test Grade Item 3 | C1 | Grade sub category 2 |
When I log in as "admin"
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
Then I should see "Test Grade Item 1"
And I follow "Edit Test Grade Item 1"
@ -364,7 +364,7 @@ Feature: Set up contextual data for tests
| name | scale |
| Test Scale 1 | Disappointing, Good, Very good, Excellent |
When I log in as "admin"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Scales" in the course gradebook
Then I should see "Test Scale 1"
And I should see "Disappointing, Good, Very good, Excellent"
@ -385,7 +385,7 @@ Feature: Set up contextual data for tests
And the following config values are set as admin:
| enableoutcomes | 1 |
When I log in as "admin"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Outcomes"
Then I should see "Grade outcome 1" in the "#addoutcomes" "css_element"
And I should see "Grade outcome 2" in the "#removeoutcomes" "css_element"
@ -413,7 +413,7 @@ Feature: Set up contextual data for tests
And the following config values are set as admin:
| enableoutcomes | 1 |
When I log in as "admin"
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
Then I should see "Test Outcome Grade Item 1"
And I follow "Edit Test Outcome Grade Item 1"
@ -430,5 +430,5 @@ Feature: Set up contextual data for tests
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| online_users | Course | C1 | course-view-* | site-pre |
When I log in as "admin"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
Then I should see "Online users"

View file

@ -19,7 +19,7 @@ Feature: Transform date time string arguments
| 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 follow "Test assignment name"
And I should see "##yesterday##l, j F Y##"
And I log out

View file

@ -31,7 +31,7 @@ Feature: Edit capabilities
Scenario: Course capabilities overrides
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 "Users > Permissions" in current page administration
And I override the system permissions of "Student" role with:
| mod/forum:deleteanypost | Prohibit |
@ -45,8 +45,7 @@ Feature: Edit capabilities
Scenario: Module capabilities overrides
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 "Forum" to section "1" and I fill the form with:
| Forum name | I'm the name |
| Description | I'm the introduction |

View file

@ -33,7 +33,7 @@ Feature: Verify that all form fields values can be get and set
| activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible |
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
And I log in as "admin"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Reset" node in "Course administration"
# Select (multi-select) - Checking "the select box should contain".
And I expand all fieldsets
@ -47,8 +47,7 @@ Feature: Verify that all form fields values can be get and set
And the "Unenrol users" select box should not contain "President"
And the "Unenrol users" select box should not contain "Baker"
And the "Unenrol users" select box should not contain "President, Baker"
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 follow "Test this one"
And I press "Create page"
# Text (textarea & editor) & Select (multi-select) - Checking "I set the following fields to these values".
@ -98,7 +97,7 @@ Feature: Verify that all form fields values can be get and set
| Default format | HTML |
| Force format | 1 |
And I press "Cancel"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
# Radio - Checking "I set the field" and "the field matches value".
And I add a "Choice" to section "1" and I fill the form with:
| Choice name | Test choice name |
@ -113,7 +112,7 @@ Feature: Verify that all form fields values can be get and set
And the field "one" matches value "1"
And the field "two" matches value ""
# Check if field xpath set/match works.
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I navigate to "Edit settings" node in "Course administration"
And I set the field with xpath "//input[@id='id_idnumber']" to "Course id number"
And the field with xpath "//input[@name='idnumber']" matches value "Course id number"
@ -126,7 +125,7 @@ Feature: Verify that all form fields values can be get and set
@javascript
Scenario: with JS enabled all form fields getters and setters works as expected
Then I am on course page "Course 1"
Then I am on "Course 1" course homepage
And I navigate to "Users > Groups" in current page administration
# Select (multi-select & AJAX) - Checking "I set the field" and "select box should contain".
And I set the field "groups" to "Group 2"
@ -138,7 +137,7 @@ Feature: Verify that all form fields values can be get and set
And the "members" select box should contain "Student 2"
And the "members" select box should not contain "Student 3"
# Checkbox (AJAX) - Checking "I set the field" and "I set the following fields to these values".
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I add a "Lesson" to section "1"
And I set the following fields to these values:
| Name | Test lesson |

View file

@ -23,9 +23,7 @@ Feature: Forms manipulation
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
And I am on site homepage
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 "Quiz" to section "1"
When I expand all fieldsets
Then I should see "Close the quiz"