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

@ -21,8 +21,7 @@ Feature: availability_completion
Scenario: Test condition
# Basic setup.
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 a completion tickbox.
And I add a "Page" to section "1" and I fill the form with:
@ -47,7 +46,7 @@ Feature: availability_completion
# Log back in as student.
When 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 2 should not appear yet.
Then I should not see "Page 2" in the "region-main" "region"

View file

@ -19,7 +19,7 @@ Feature: Confirm that conditions on completion no longer cause a bug
Scenario: Multiple completion conditions on glossary
# Set up course.
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 "Edit settings" node in "Course administration"
And I expand all fieldsets
And I set the field "Enable completion tracking" to "Yes"

View file

@ -21,8 +21,7 @@ Feature: availability_date
Scenario: Test condition
# Basic setup.
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 a date condition that does match (from the past).
And I add a "Page" to section "1"
@ -54,7 +53,7 @@ Feature: availability_date
# Log back in as student.
When 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 should appear, but page 2 does not.
Then I should see "Page 1" in the "region-main" "region"

View file

@ -21,8 +21,7 @@ Feature: availability_grade
Scenario: Test condition
# Basic setup.
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 an assignment.
And I add a "Assignment" to section "1" and I fill the form with:
@ -70,7 +69,7 @@ Feature: availability_grade
And I click on "Edit settings" "link" in the "P3" activity
And I expand all fieldsets
And the field "Maximum grade percentage (exclusive)" matches value ""
And I am on course page "Course 1"
And I am on "Course 1" course homepage
# Add a Page with a grade condition for 10%.
And I add a "Page" to section "4"
@ -90,7 +89,7 @@ Feature: availability_grade
# Log in as student without a grade yet.
When 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
# Do the assignment.
And I follow "A1"
@ -108,7 +107,7 @@ Feature: availability_grade
# Log back in as teacher.
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
# Give the assignment 40%.
And I follow "A1"
@ -123,7 +122,7 @@ Feature: availability_grade
# Log back in as student.
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
# Check pages are visible.
Then I should see "P2" in the "region-main" "region"

View file

@ -21,8 +21,7 @@ Feature: availability_group
Scenario: Test condition
# Basic setup.
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
# Start to add a Page. If there aren't any groups, there's no Group option.
And I add a "Page" to section "1"
@ -38,7 +37,7 @@ Feature: availability_group
| G2 | C1 | GI2 |
# This step used to be 'And I follow "C1"', but Chrome thinks the breadcrumb
# is not clickable, so we'll go via the home page instead.
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And I add a "Page" to section "1"
And I expand all fieldsets
And I click on "Add restriction..." "button"
@ -83,7 +82,7 @@ Feature: availability_group
# Log back in as student.
When 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
# No pages should appear yet.
Then I should not see "P1" in the "region-main" "region"
@ -96,7 +95,7 @@ Feature: availability_group
| student1 | GI1 |
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
# P1 (any groups) and P2 should show but not P3.
Then I should see "P1" in the "region-main" "region"

View file

@ -27,8 +27,7 @@ Feature: availability_grouping
Scenario: Test condition
# Basic setup.
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
# Start to add a Page. If there aren't any groupings, there's no Grouping option.
And I add a "Page" to section "1"
@ -40,7 +39,7 @@ Feature: availability_grouping
# Back to course page but add groups.
# This step used to be 'And I follow "C1"', but Chrome thinks the breadcrumb
# is not clickable, so we'll go via the home page instead.
And I am on course page "Course 1"
And I am on "Course 1" course homepage
And the following "groupings" exist:
| name | course | idnumber |
| GX1 | C1 | GXI1 |
@ -76,7 +75,7 @@ Feature: availability_grouping
# Log back in as student.
When 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
# No pages should appear yet.
Then I should not see "P1" in the "region-main" "region"
@ -88,7 +87,7 @@ Feature: availability_grouping
| grouping | group |
| GXI1 | GI1 |
And I log in as "student1"
And I am on course page "Course 1"
And I am on "Course 1" course homepage
# P1 should show but not B2.
Then I should see "P1" in the "region-main" "region"

View file

@ -21,8 +21,7 @@ Feature: availability_profile
Scenario: Test condition
# Basic setup.
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
And I add a "Page" to section "1"
@ -55,7 +54,7 @@ Feature: availability_profile
# Log back in as student.
When 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
# I see P1 but not P2.
Then I should see "P1" in the "region-main" "region"
@ -80,8 +79,7 @@ Feature: availability_profile
And I click on "Update profile" "button"
# Set Page activity which has requirement on this field.
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"
And I set the following fields to these values:
| Name | P1 |
@ -106,5 +104,5 @@ Feature: availability_profile
# Log out and back in as student. Should be able to see activity.
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
Then I should see "P1" in the "region-main" "region"