mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
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:
parent
3353cfd8c1
commit
fdeeaff954
458 changed files with 1697 additions and 2148 deletions
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue