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

@ -47,8 +47,7 @@ Feature: View structural changes in recent activity block
Scenario: Check that Added module information is displayed respecting view capability
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 the "Recent activity" block
When I add a "Forum" to section "1" and I fill the form with:
| name | ForumVisibleGroups |
@ -100,7 +99,7 @@ Feature: View structural changes in recent activity block
And I should see "ForumSeparateGroupsG2" in the "Recent activity" "block"
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 "ForumVisibleGroups" in the "Recent activity" "block"
And I should see "ForumSeparateGroups" in the "Recent activity" "block"
And I should see "ForumNoGroups" in the "Recent activity" "block"
@ -111,7 +110,7 @@ Feature: View structural changes in recent activity block
And I should not see "ForumSeparateGroupsG2" in the "Recent activity" "block"
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 should see "ForumVisibleGroups" in the "Recent activity" "block"
And I should see "ForumSeparateGroups" in the "Recent activity" "block"
And I should see "ForumNoGroups" in the "Recent activity" "block"
@ -122,7 +121,7 @@ Feature: View structural changes in recent activity block
And I should see "ForumSeparateGroupsG2" in the "Recent activity" "block"
And I log out
And I log in as "student3"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I should see "ForumVisibleGroups" in the "Recent activity" "block"
And I should see "ForumSeparateGroups" in the "Recent activity" "block"
And I should see "ForumNoGroups" in the "Recent activity" "block"
@ -134,7 +133,7 @@ Feature: View structural changes in recent activity block
And I log out
# Teachers have capability to see all groups and hidden activities
And I log in as "assistant1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I should see "ForumHidden" in the "Recent activity" "block"
And I should see "ForumVisibleGroupsG1" in the "Recent activity" "block"
And I should see "ForumSeparateGroupsG1" in the "Recent activity" "block"
@ -144,8 +143,7 @@ Feature: View structural changes in recent activity block
Scenario: Updates and deletes in recent activity block
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 the "Recent activity" block
And I add a "Forum" to section "1" and I fill the form with:
| name | ForumNew |
@ -155,7 +153,7 @@ Feature: View structural changes in recent activity block
And I log out
And I wait "1" seconds
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 "Added Forum" in the "Recent activity" "block"
And I should see "ForumNew" in the "Recent activity" "block"
And I log out
@ -163,7 +161,7 @@ Feature: View structural changes in recent activity block
And I wait "1" seconds
# Update forum as a teacher
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 "ForumNew"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
@ -173,7 +171,7 @@ Feature: View structural changes in recent activity block
And I wait "1" seconds
# Student 1 already saw that forum was created, now he can see that forum was updated
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 not see "Added Forum" in the "Recent activity" "block"
And I should not see "ForumNew" in the "Recent activity" "block"
And I should see "Updated Forum" in the "Recent activity" "block"
@ -182,7 +180,7 @@ Feature: View structural changes in recent activity block
And I wait "1" seconds
# Student 2 has bigger interval and he can see one entry that forum was created but with the new name
And I log in as "student2"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I should see "Added Forum" in the "Recent activity" "block"
And I should not see "ForumNew" in the "Recent activity" "block"
And I should not see "Updated Forum" in the "Recent activity" "block"
@ -191,15 +189,14 @@ Feature: View structural changes in recent activity block
And I wait "1" seconds
# Delete forum as a teacher
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 delete "ForumUpdated" activity
And I run all adhoc tasks
And I log out
And I wait "1" seconds
# Students 1 and 2 see that forum was deleted
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 not see "Added Forum" in the "Recent activity" "block"
And I should not see "ForumNew" in the "Recent activity" "block"
And I should not see "Updated Forum" in the "Recent activity" "block"
@ -209,7 +206,7 @@ Feature: View structural changes in recent activity block
And I wait "1" seconds
# Student 3 never knew that forum was created, so he does not see anything
And I log in as "student3"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I should not see "Added Forum" in the "Recent activity" "block"
And I should not see "ForumNew" in the "Recent activity" "block"
And I should not see "Updated Forum" in the "Recent activity" "block"