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

@ -17,8 +17,7 @@ Feature: Add blocks
| student1 | C1 | student |
| student2 | C1 | student |
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
When I add the "Blog menu" block
Then I should see "View my entries about this course"

View file

@ -36,7 +36,7 @@ Feature: Add and configure blocks throughout the site
And I set the following fields to these values:
| Page contexts | Display throughout the entire site |
And I press "Save changes"
When I am on course page "Course 1"
When I am on "Course 1" course homepage
Then I should see "Comments" in the "Comments" "block"
And I should see "Save comment" in the "Comments" "block"
And I am on site homepage
@ -44,7 +44,7 @@ Feature: Add and configure blocks throughout the site
And I set the following fields to these values:
| Default weight | -10 (first) |
And I press "Save changes"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
# The first block matching the pattern should be top-left block
And I should see "Comments" in the "//*[@id='region-pre' or @id='block-region-side-pre']/descendant::*[contains(concat(' ', normalize-space(@class), ' '), ' block ')]" "xpath_element"
@ -55,8 +55,7 @@ Feature: Add and configure blocks throughout the site
Scenario: Blocks on courses can have roles assigned to them
Given I log in as "teacher1"
And I am on course page "Course 1"
And I follow "Turn editing on"
And I am on "Course 1" course homepage with editing mode on
And I add the "Search forums" block
Then I should see "Assign roles in Search forums block"
@ -71,4 +70,4 @@ Feature: Add and configure blocks throughout the site
| Block title | Foo " onload="document.getElementsByTagName('body')[0].remove()" alt=" |
| Content | Example |
When I press "Save changes"
Then I should see "Course overview"
Then I should see "My overview"

View file

@ -12,8 +12,7 @@ Feature: Show hidden blocks in a docked block region when editing
| user | course | role |
| admin | C1 | editingteacher |
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 the "Search forums" block
And I add the "Latest announcements" block
And I add the "Upcoming events" block

View file

@ -9,8 +9,7 @@ Feature: Block visibility
| fullname | shortname | category |
| Course 1 | C1 | 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
@javascript
Scenario: Hiding all blocks on the page should remove the column they're in

View file

@ -15,9 +15,7 @@ Feature: Block appearances
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I am on site homepage
And I am on course page "Course 1"
And I follow "Turn editing on"
And I am on "Course 1" course homepage with editing mode on
And I add a "Survey" to section "1" and I fill the form with:
| Name | Test survey name |
| Survey type | ATTLS (20 item version) |
@ -32,8 +30,7 @@ Feature: Block appearances
And I press "Save changes"
And I log out
And I log in as "teacher1"
And I am on course page "Course 1"
And I follow "Turn editing on"
And I am on "Course 1" course homepage with editing mode on
And I add the "Comments" block
And I configure the "Comments" block
And I set the following fields to these values:
@ -43,7 +40,7 @@ Feature: Block appearances
Scenario: Block settings can be modified so that a block apprears on any page
When I follow "Test survey name"
Then I should see "Comments" in the "Comments" "block"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I configure the "Comments" block
And I set the following fields to these values:
| Display on page types | Any course page |

View file

@ -15,9 +15,7 @@ Feature: Block region moving
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
And I am on site homepage
And I am on course page "Course 1"
And I follow "Turn editing on"
And I am on "Course 1" course homepage with editing mode on
And I add a "Survey" to section "1" and I fill the form with:
| Name | Test survey name |
| Survey type | ATTLS (20 item version) |
@ -32,8 +30,7 @@ Feature: Block region moving
And I press "Save changes"
And I log out
And I log in as "teacher1"
And I am on course page "Course 1"
And I follow "Turn editing on"
And I am on "Course 1" course homepage with editing mode on
And I add the "Comments" block
And I configure the "Comments" block
And I set the following fields to these values:

View file

@ -17,8 +17,7 @@ Feature: Allowed blocks controls
Scenario: Blocks can be added with the default permissions
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
When I add the "Course completion status" block
And I add the "Activities" block
Then I should see "Activities" in the "Activities" "block"
@ -28,13 +27,12 @@ Feature: Allowed blocks controls
Given I log in as "admin"
And I set the following system permissions of "Teacher" role:
| block/activity_modules:addinstance | Prohibit |
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 "Teacher" role with:
| block/completionstatus:addinstance | Prohibit |
And I log out
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
Then the add block selector should not contain "Activities" block
And the add block selector should not contain "Course completion status" block

View file

@ -9,8 +9,7 @@ Feature: The context of a block can always be returned to it's original state.
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
When I am on course page "Course 1"
And I follow "Turn editing on"
When I am on "Course 1" course homepage with editing mode on
And I add the "Tags" block
Then I should see "Tags" in the "Tags" "block"
And I navigate to course participants
@ -18,7 +17,7 @@ Feature: The context of a block can always be returned to it's original state.
And I set the following fields to these values:
| Display on page types | Any page |
And I press "Save changes"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Assignment1 |
| Description | Description |
@ -28,11 +27,11 @@ Feature: The context of a block can always be returned to it's original state.
| Display on page types | Any assignment module page |
And I press "Save changes"
And I should see "Tags" in the "Tags" "block"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And "Tags" "block" should not exist
And I navigate to course participants
And "Tags" "block" should not exist
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Assignment2 |
| Description | Description |
@ -42,7 +41,7 @@ Feature: The context of a block can always be returned to it's original state.
And I set the following fields to these values:
| Display on page types | Any page |
And I press "Save changes"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I should see "Tags" in the "Tags" "block"
And I navigate to course participants
And I should see "Tags" in the "Tags" "block"