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

@ -20,8 +20,7 @@ Feature: A teacher can set a wiki to be collaborative or individual
| student1 | C1 | student |
| student2 | C1 | student |
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 "Wiki" to section "1" and I fill the form with:
| Wiki name | Collaborative wiki name |
| Description | Collaborative wiki description |
@ -32,7 +31,7 @@ Feature: A teacher can set a wiki to be collaborative or individual
And I set the following fields to these values:
| HTML format | Collaborative teacher1 edition |
And I press "Save"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I add a "Wiki" to section "1" and I fill the form with:
| Wiki name | Individual wiki name |
| Description | Individual wiki description |
@ -45,7 +44,7 @@ Feature: A teacher can set a wiki to be collaborative or individual
And I press "Save"
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 "Collaborative wiki name"
Then I should see "Collaborative teacher1 edition"
And I follow "Edit"
@ -54,7 +53,7 @@ Feature: A teacher can set a wiki to be collaborative or individual
And I press "Save"
And I should not see "Collaborative teacher1 edition"
And I should see "Collaborative student1 edition"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Individual wiki name"
And I should not see "Individual teacher1 edition"
And I press "Create page"
@ -63,7 +62,7 @@ Feature: A teacher can set a wiki to be collaborative or individual
And I press "Save"
And I log out
And I log in as "student2"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Individual wiki name"
And I should not see "Individual teacher1 edition"
And I should not see "Individual student1 edition"
@ -73,10 +72,10 @@ Feature: A teacher can set a wiki to be collaborative or individual
And I press "Save"
And I log out
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 "Collaborative wiki name"
And I should see "Collaborative student1 edition"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Individual wiki name"
And I should see "Individual teacher1 edition"
And I should not see "Individual student1 edition"

View file

@ -17,8 +17,7 @@ Feature: Edited wiki pages handle tags correctly
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
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 "Wiki" to section "1" and I fill the form with:
| Wiki name | Test wiki name |
| Description | Test wiki description |
@ -28,7 +27,7 @@ Feature: Edited wiki pages handle tags correctly
Scenario: Wiki page edition of custom tags works as expected
Given I log in as "student1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test wiki name"
And I press "Create page"
When I set the following fields to these values:
@ -54,7 +53,7 @@ Feature: Edited wiki pages handle tags correctly
And I press "Continue"
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 follow "Test wiki name"
And I press "Create page"
And I click on ".form-autocomplete-downarrow" "css_element"

View file

@ -20,8 +20,7 @@ Feature: A history of each wiki page is available
| student1 | C1 | student |
| student2 | C1 | student |
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 "Wiki" to section "1" and I fill the form with:
| Wiki name | Test wiki name |
| Description | Test wiki description |
@ -34,7 +33,7 @@ Feature: A history of each wiki page is available
And I press "Save"
And I log out
When I log in as "student1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test wiki name"
And I follow "Edit"
And I set the following fields to these values:
@ -42,7 +41,7 @@ Feature: A history of each wiki page is available
And I press "Save"
And I log out
And I log in as "student2"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test wiki name"
And I follow "Edit"
And I set the following fields to these values:

View file

@ -17,8 +17,7 @@ Feature: Edited wiki pages may be previewed before saving
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
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 "Wiki" to section "1" and I fill the form with:
| Wiki name | Test wiki name |
| Description | Test wiki description |
@ -26,7 +25,7 @@ Feature: Edited wiki pages may be previewed before saving
| Wiki mode | Collaborative wiki |
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 follow "Test wiki name"
When I press "Create page"
And I set the following fields to these values:

View file

@ -15,8 +15,7 @@ Feature: Teachers can reset wiki pages, tags and files
| 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 "Wiki" to section "1" and I fill the form with:
| Wiki name | Test wiki |
| Description | Test wiki description |

View file

@ -19,8 +19,7 @@ Feature: Users can comment on wiki pages
| student1 | C1 | student |
| student2 | C1 | student |
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 "Wiki" to section "1" and I fill the form with:
| Wiki name | Test wiki name |
| Description | Test wiki description |
@ -33,7 +32,7 @@ Feature: Users can comment on wiki pages
And I press "Save"
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 follow "Test wiki name"
And I follow "Comments"
And I follow "Add comment"
@ -59,7 +58,7 @@ Feature: Users can comment on wiki pages
Scenario: Student cannot edit another student's comment
When I log out
And I log in as "student2"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Test wiki name"
And I follow "Comments"
Then "Edit" "link" should not exist in the "wiki-comments" "table"
@ -69,7 +68,7 @@ Feature: Users can comment on wiki pages
Scenario: Teacher can delete a student comment
When I log out
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 wiki name"
And I follow "Comments"
Then "Edit" "link" should not exist in the "wiki-comments" "table"

View file

@ -15,8 +15,7 @@ Feature: There is a choice of formats for editing a wiki page
| 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 "Wiki" to section "1" and I fill the form with:
| Wiki name | Test wiki name |
| Description | Test wiki description |

View file

@ -22,8 +22,7 @@ Feature: Users can search wikis
@javascript
Scenario: Searching collaborative wiki
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 "Wiki" to section "1" and I fill the form with:
| Wiki name | Collaborative wiki name |
| Description | Collaborative wiki description |
@ -34,10 +33,10 @@ Feature: Users can search wikis
And I set the following fields to these values:
| HTML format | Collaborative teacher1 page [[new page]] |
And I press "Save"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
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 follow "Collaborative wiki name"
And I follow "new page"
And I press "Create page"
@ -61,8 +60,7 @@ Feature: Users can search wikis
@javascript
Scenario: Searching individual wiki
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 "Wiki" to section "1" and I fill the form with:
| Wiki name | Individual wiki name |
| Description | Individual wiki description |
@ -75,7 +73,7 @@ Feature: Users can search wikis
And I press "Save"
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 follow "Individual wiki name"
And I press "Create page"
And I set the following fields to these values:
@ -87,7 +85,7 @@ Feature: Users can search wikis
And I should not see "Individual teacher1 page"
And I log out
And I log in as "student2"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Individual wiki name"
And I press "Create page"
And I set the following fields to these values:
@ -100,7 +98,7 @@ Feature: Users can search wikis
And I should not see "Individual teacher1 page"
And I log out
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 "Individual wiki name"
And I set the field "searchstring" to "page"
And I press "Search wikis"
@ -128,8 +126,7 @@ Feature: Users can search wikis
| student1 | G1 |
| student2 | G2 |
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 "Wiki" to section "1" and I fill the form with:
| Wiki name | Group wiki name |
| Description | Wiki description |
@ -154,7 +151,7 @@ Feature: Users can search wikis
And I press "Save"
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 follow "Group wiki name"
And I follow "new page1"
And I press "Create page"
@ -169,7 +166,7 @@ Feature: Users can search wikis
And I should not see "All participants teacher1 page"
And I log out
And I log in as "student2"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I follow "Group wiki name"
And I follow "new page2"
And I press "Create page"
@ -185,5 +182,5 @@ Feature: Users can search wikis
And I should not see "All participants teacher1 page"
And I log out
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 "Group wiki name"