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

@ -39,8 +39,7 @@ Feature: display_availability
Scenario: Activity availability display
# Set up.
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
# Add a Page with 1 restriction.
When I add a "Page" to section "1"
@ -101,7 +100,7 @@ Feature: display_availability
# Change to student view.
Given 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
# Page 1 display still there but should be dimmed and not a link.
Then I should see "Page 1" in the "#section-1 .dimmed_text" "css_element"
@ -121,8 +120,7 @@ Feature: display_availability
Scenario: Section availability display
# Set up.
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
# Add a restriction to section 1 (visible to students).
When I edit the section "1"
@ -144,7 +142,7 @@ Feature: display_availability
And I press "Save changes"
# This is necessary because otherwise it fails in Chrome, see MDL-44959
And I am on course page "Course 1"
And I am on "Course 1" course homepage
# Add Pages to each section.
And I add a "Page" to section "1" and I fill the form with:
@ -168,7 +166,7 @@ Feature: display_availability
# Change to student view.
Given 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
# The contents of both sections should be hidden.
Then I should not see "Page 1" in the "region-main" "region"

View file

@ -32,8 +32,7 @@ Feature: edit_availability
Given the following config values are set as admin:
| enableavailability | 0 |
When 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 "Page" to section "1"
Then "Restrict access" "fieldset" should not exist
@ -44,7 +43,7 @@ Feature: edit_availability
And the following config values are set as admin:
| enableavailability | 1 |
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I add a "Page" to section "1"
Then "Restrict access" "fieldset" should exist
@ -56,10 +55,7 @@ Feature: edit_availability
Scenario: Edit availability using settings in activity form
# Set up.
Given I log in as "teacher1"
And I am on course page "Course 1"
# Add a Page and check it has None in so far.
And I turn editing mode on
And I am on "Course 1" course homepage with editing mode on
And I add a "Page" to section "1"
And I expand all fieldsets
Then I should see "None" in the "Restrict access" "fieldset"
@ -147,8 +143,7 @@ Feature: edit_availability
Scenario: Edit availability using settings in section form
# Set up.
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
# Edit a section
When I edit the section "1"
@ -168,8 +163,7 @@ Feature: edit_availability
Given the following config values are set as admin:
| enableavailability | 0 |
And I log in as "admin"
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"
When I expand all fieldsets
Then "Add group/grouping access restriction" "button" should not exist
@ -181,8 +175,7 @@ Feature: edit_availability
| name | course | idnumber |
| GX1 | C1 | GXI1 |
And I log in as "admin"
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 set the following fields to these values:
| Forum name | MyForum |