mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +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
|
@ -9,11 +9,10 @@ Feature: Highlight non-inherited permissions
|
|||
| fullname | shortname |
|
||||
| Course fullname | C_shortname |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
|
||||
@javascript
|
||||
Scenario: Override a permission
|
||||
Given I am on course page "Course fullname"
|
||||
Given I am on "Course fullname" course homepage
|
||||
And I navigate to "Users > Permissions" in current page administration
|
||||
And I select "Manager (0)" from the "roleid" singleselect
|
||||
And I click on "Prohibit" "radio" in the "View added and updated modules in recent activity block" "table_row"
|
||||
|
|
|
@ -49,9 +49,7 @@ Feature: Manage availability conditions
|
|||
|
||||
# OK, toggling works. Set the grade one to Hide and we'll go see if it actually worked.
|
||||
And I click on "Hide" "icon" in the "Restriction by grade" "table_row"
|
||||
And I am on site homepage
|
||||
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 expand all fieldsets
|
||||
And I click on "Add restriction..." "button"
|
||||
|
|
|
@ -57,7 +57,7 @@ Feature: Set up contextual data for tests
|
|||
| Grouping 1 | C1 | GG1 |
|
||||
| Grouping 2 | C1 | GG2 |
|
||||
When I log in as "admin"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
Then I should see "Group 1"
|
||||
And I should see "Group 2"
|
||||
|
@ -86,7 +86,7 @@ Feature: Set up contextual data for tests
|
|||
| mod/forum:editanypost | Allow | student | Course | C1 |
|
||||
| mod/forum:replynews | Prevent | editingteacher | Course | C1 |
|
||||
When I log in as "admin"
|
||||
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 set the field "Advanced role override" to "Student (1)"
|
||||
Then "mod/forum:editanypost" capability has "Allow" permission
|
||||
|
@ -106,7 +106,7 @@ Feature: Set up contextual data for tests
|
|||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
When 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 "Topic 1"
|
||||
|
||||
Scenario: Add role assigns
|
||||
|
@ -142,20 +142,20 @@ Feature: Set up contextual data for tests
|
|||
Then "Edit settings" "link" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "user2"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And "Turn editing on" "link" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "user3"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And "Turn editing on" "link" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "user4"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And "Turn editing on" "link" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "user5"
|
||||
And I should see "You are logged in as"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I should see "You can not enrol yourself in this course."
|
||||
|
||||
Scenario: Add modules
|
||||
|
@ -193,7 +193,7 @@ Feature: Set up contextual data for tests
|
|||
| activity | name | intro | course | idnumber | grade |
|
||||
| assign | Test assignment name with scale | Test assignment description | C1 | assign1 | Test Scale 1 |
|
||||
When I log in as "admin"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
Then I should see "Test assignment name"
|
||||
# Assignment 2.2 module type is disabled by default
|
||||
# And I should see "Test assignment22 name"
|
||||
|
@ -254,7 +254,7 @@ Feature: Set up contextual data for tests
|
|||
| grouping | group |
|
||||
| GG1 | G1 |
|
||||
When I log in as "admin"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
Then the "groups" select box should contain "Group 1 (1)"
|
||||
And the "groups" select box should contain "Group 2 (1)"
|
||||
|
@ -313,7 +313,7 @@ Feature: Set up contextual data for tests
|
|||
| Grade sub category 2 | C1 | Grade category 1 |
|
||||
When I log in as "admin"
|
||||
And I am on course index
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
Then I should see "Grade category 1"
|
||||
And I should see "Grade sub category 2"
|
||||
|
@ -336,7 +336,7 @@ Feature: Set up contextual data for tests
|
|||
| Test Grade Item 2 | C1 | Grade category 1 |
|
||||
| Test Grade Item 3 | C1 | Grade sub category 2 |
|
||||
When I log in as "admin"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Setup > Gradebook setup" in the course gradebook
|
||||
Then I should see "Test Grade Item 1"
|
||||
And I follow "Edit Test Grade Item 1"
|
||||
|
@ -364,7 +364,7 @@ Feature: Set up contextual data for tests
|
|||
| name | scale |
|
||||
| Test Scale 1 | Disappointing, Good, Very good, Excellent |
|
||||
When I log in as "admin"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Scales" in the course gradebook
|
||||
Then I should see "Test Scale 1"
|
||||
And I should see "Disappointing, Good, Very good, Excellent"
|
||||
|
@ -385,7 +385,7 @@ Feature: Set up contextual data for tests
|
|||
And the following config values are set as admin:
|
||||
| enableoutcomes | 1 |
|
||||
When I log in as "admin"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I follow "Outcomes"
|
||||
Then I should see "Grade outcome 1" in the "#addoutcomes" "css_element"
|
||||
And I should see "Grade outcome 2" in the "#removeoutcomes" "css_element"
|
||||
|
@ -413,7 +413,7 @@ Feature: Set up contextual data for tests
|
|||
And the following config values are set as admin:
|
||||
| enableoutcomes | 1 |
|
||||
When I log in as "admin"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Setup > Gradebook setup" in the course gradebook
|
||||
Then I should see "Test Outcome Grade Item 1"
|
||||
And I follow "Edit Test Outcome Grade Item 1"
|
||||
|
@ -430,5 +430,5 @@ Feature: Set up contextual data for tests
|
|||
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
||||
| online_users | Course | C1 | course-view-* | site-pre |
|
||||
When I log in as "admin"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
Then I should see "Online users"
|
||||
|
|
|
@ -19,7 +19,7 @@ Feature: Transform date time string arguments
|
|||
| user | course | role |
|
||||
| teacher1 | C1 | editingteacher |
|
||||
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 "Test assignment name"
|
||||
And I should see "##yesterday##l, j F Y##"
|
||||
And I log out
|
||||
|
|
|
@ -31,7 +31,7 @@ Feature: Edit capabilities
|
|||
|
||||
Scenario: Course capabilities overrides
|
||||
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 "Users > Permissions" in current page administration
|
||||
And I override the system permissions of "Student" role with:
|
||||
| mod/forum:deleteanypost | Prohibit |
|
||||
|
@ -45,8 +45,7 @@ Feature: Edit capabilities
|
|||
|
||||
Scenario: Module capabilities overrides
|
||||
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 a "Forum" to section "1" and I fill the form with:
|
||||
| Forum name | I'm the name |
|
||||
| Description | I'm the introduction |
|
||||
|
|
|
@ -33,7 +33,7 @@ Feature: Verify that all form fields values can be get and set
|
|||
| activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible |
|
||||
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
|
||||
And I log in as "admin"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Reset" node in "Course administration"
|
||||
# Select (multi-select) - Checking "the select box should contain".
|
||||
And I expand all fieldsets
|
||||
|
@ -47,8 +47,7 @@ Feature: Verify that all form fields values can be get and set
|
|||
And the "Unenrol users" select box should not contain "President"
|
||||
And the "Unenrol users" select box should not contain "Baker"
|
||||
And the "Unenrol users" select box should not contain "President, Baker"
|
||||
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 follow "Test this one"
|
||||
And I press "Create page"
|
||||
# Text (textarea & editor) & Select (multi-select) - Checking "I set the following fields to these values".
|
||||
|
@ -98,7 +97,7 @@ Feature: Verify that all form fields values can be get and set
|
|||
| Default format | HTML |
|
||||
| Force format | 1 |
|
||||
And I press "Cancel"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
# Radio - Checking "I set the field" and "the field matches value".
|
||||
And I add a "Choice" to section "1" and I fill the form with:
|
||||
| Choice name | Test choice name |
|
||||
|
@ -113,7 +112,7 @@ Feature: Verify that all form fields values can be get and set
|
|||
And the field "one" matches value "1"
|
||||
And the field "two" matches value ""
|
||||
# Check if field xpath set/match works.
|
||||
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 set the field with xpath "//input[@id='id_idnumber']" to "Course id number"
|
||||
And the field with xpath "//input[@name='idnumber']" matches value "Course id number"
|
||||
|
@ -126,7 +125,7 @@ Feature: Verify that all form fields values can be get and set
|
|||
|
||||
@javascript
|
||||
Scenario: with JS enabled all form fields getters and setters works as expected
|
||||
Then I am on course page "Course 1"
|
||||
Then I am on "Course 1" course homepage
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
# Select (multi-select & AJAX) - Checking "I set the field" and "select box should contain".
|
||||
And I set the field "groups" to "Group 2"
|
||||
|
@ -138,7 +137,7 @@ Feature: Verify that all form fields values can be get and set
|
|||
And the "members" select box should contain "Student 2"
|
||||
And the "members" select box should not contain "Student 3"
|
||||
# Checkbox (AJAX) - Checking "I set the field" and "I set the following fields to these values".
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I add a "Lesson" to section "1"
|
||||
And I set the following fields to these values:
|
||||
| Name | Test lesson |
|
||||
|
|
|
@ -23,9 +23,7 @@ Feature: Forms manipulation
|
|||
| fullname | shortname | category |
|
||||
| Course 1 | C1 | 0 |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
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 "Quiz" to section "1"
|
||||
When I expand all fieldsets
|
||||
Then I should see "Close the quiz"
|
||||
|
|
|
@ -120,9 +120,7 @@ Feature: Add customised file types
|
|||
| Custom description | Froggy file |
|
||||
And I press "Save changes"
|
||||
# Create a resource activity and add it to a course
|
||||
And I am on site homepage
|
||||
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 a "File" to section "1"
|
||||
And I set the following fields to these values:
|
||||
| Name | An example of customised file type |
|
||||
|
|
|
@ -18,7 +18,7 @@ Feature: tool_monitor_rule
|
|||
And I navigate to "Event monitoring rules" node in "Site administration > Reports"
|
||||
And I click on "Enable" "link"
|
||||
And I am on site homepage
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
|
||||
And I press "Add a new rule"
|
||||
And I set the following fields to these values:
|
||||
|
@ -45,8 +45,7 @@ Feature: tool_monitor_rule
|
|||
|
||||
Scenario: Add a rule on course level
|
||||
Given I log in as "teacher1"
|
||||
And I am on site homepage
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
|
||||
When I press "Add a new rule"
|
||||
And I set the following fields to these values:
|
||||
|
@ -66,7 +65,7 @@ Feature: tool_monitor_rule
|
|||
|
||||
Scenario: Delete a rule on course level
|
||||
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 "Event monitoring rules" node in "Course administration > Reports"
|
||||
When I click on "Delete rule" "link"
|
||||
Then I should see "Are you sure you want to delete the rule \"New rule course level\"?"
|
||||
|
@ -76,7 +75,7 @@ Feature: tool_monitor_rule
|
|||
|
||||
Scenario: Edit a rule on course level
|
||||
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 "Event monitoring rules" node in "Course administration > Reports"
|
||||
When I click on "Edit rule" "link"
|
||||
And I set the following fields to these values:
|
||||
|
@ -95,7 +94,7 @@ Feature: tool_monitor_rule
|
|||
|
||||
Scenario: Duplicate a rule on course level
|
||||
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 "Event monitoring rules" node in "Course administration > Reports"
|
||||
When I click on "Duplicate rule" "link" in the "New rule course level" "table_row"
|
||||
Then I should see "Rule successfully duplicated"
|
||||
|
@ -154,7 +153,7 @@ Feature: tool_monitor_rule
|
|||
|
||||
Scenario: Duplicate a rule on site level
|
||||
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 "Event monitoring rules" node in "Course administration > Reports"
|
||||
When I click on "Duplicate rule" "link" in the "New rule site level" "table_row"
|
||||
Then I should see "Rule successfully duplicated"
|
||||
|
|
|
@ -22,7 +22,7 @@ Feature: tool_monitor_subscriptions
|
|||
And I log in as "admin"
|
||||
And I navigate to "Event monitoring rules" node in "Site administration > Reports"
|
||||
And I click on "Enable" "link"
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to "Event monitoring rules" node in "Course administration > Reports"
|
||||
And I press "Add a new rule"
|
||||
And I set the following fields to these values:
|
||||
|
@ -131,7 +131,7 @@ Feature: tool_monitor_subscriptions
|
|||
And I follow "Subscribe to rule \"New rule course level\""
|
||||
And I should see "Subscription successfully created"
|
||||
And "#toolmonitorsubs_r0" "css_element" should exist
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I trigger cron
|
||||
And I am on site homepage
|
||||
When I click on ".popover-region-notifications" "css_element"
|
||||
|
|
|
@ -23,8 +23,7 @@ Feature: Backup user data
|
|||
@javascript
|
||||
Scenario: Delete and restore a quiz with user data
|
||||
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 a "Quiz" to section "1" and I fill the form with:
|
||||
| Name | Quiz 1 |
|
||||
| Description | Test quiz description |
|
||||
|
@ -44,7 +43,7 @@ Feature: Backup user data
|
|||
| Feedback for the response 'False'. | So you think it is false |
|
||||
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 follow "Quiz 1"
|
||||
And I press "Attempt quiz now"
|
||||
And I click on "True" "radio" in the "First question" "question"
|
||||
|
@ -55,8 +54,7 @@ Feature: Backup user data
|
|||
And I should see "5.00 out of 10.00"
|
||||
And I log out
|
||||
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 "Quiz 1" activity
|
||||
And I run all adhoc tasks
|
||||
And I navigate to "Recycle bin" node in "Course administration"
|
||||
|
@ -64,7 +62,7 @@ Feature: Backup user data
|
|||
And I click on "Restore" "link" in the "region-main" "region"
|
||||
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
|
||||
When I navigate to "User report" in the course gradebook
|
||||
Then "Quiz 1" row "Grade" column of "user-grade" table should contain "5"
|
||||
And "Quiz 1" row "Percentage" column of "user-grade" table should contain "50"
|
||||
|
|
|
@ -25,8 +25,7 @@ Feature: Basic recycle bin functionality
|
|||
|
||||
Scenario: Restore a deleted assignment
|
||||
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 a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assign |
|
||||
| Description | Test |
|
||||
|
@ -37,8 +36,7 @@ Feature: Basic recycle bin functionality
|
|||
And I click on "Restore" "link" in the "region-main" "region"
|
||||
And I should see "'Test assign' has been restored"
|
||||
And I wait to be redirected
|
||||
And I am on homepage
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I should see "Test assign" in the "Topic 1" "section"
|
||||
|
||||
Scenario: Restore a deleted course
|
||||
|
@ -64,8 +62,7 @@ Feature: Basic recycle bin functionality
|
|||
@javascript
|
||||
Scenario: Deleting a single item from the recycle bin
|
||||
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 a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assign |
|
||||
| Description | Test |
|
||||
|
@ -84,8 +81,7 @@ Feature: Basic recycle bin functionality
|
|||
@javascript
|
||||
Scenario: Deleting all the items from the recycle bin
|
||||
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 a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Test assign 1 |
|
||||
| Description | Test 1 |
|
||||
|
|
|
@ -33,7 +33,7 @@ Feature: Upload users
|
|||
And I should see "Tom Jones"
|
||||
And I should see "Trent Reznor"
|
||||
And I should see "reznor@example.com"
|
||||
And I am on course page "Maths"
|
||||
And I am on "Maths" course homepage
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
And I set the field "groups" to "Section 1 (1)"
|
||||
And the "members" select box should contain "Tom Jones"
|
||||
|
|
|
@ -20,7 +20,7 @@ Feature: Add a new user tour
|
|||
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
|
||||
And I add steps to the "First tour" tour:
|
||||
| targettype | targetvalue_block | Title | Content |
|
||||
| Block | Course overview | Course overview | This area shows you what's happening in some of your courses |
|
||||
| Block | My overview | My overview | This area shows you what's happening in some of your courses |
|
||||
| Block | Calendar | Calendar | This is the Calendar. All of your assignments and due dates can be found here |
|
||||
And I add steps to the "First tour" tour:
|
||||
| targettype | targetvalue_selector | Title | Content |
|
||||
|
|
|
@ -46,17 +46,14 @@ Feature: Apply tour filters to a tour
|
|||
| Display in middle of page | Welcome | Welcome to your course tour.|
|
||||
And I log out
|
||||
And I log in as "editor1"
|
||||
And I am on site homepage
|
||||
When I am on course page "Course 1"
|
||||
When I am on "Course 1" course homepage
|
||||
Then I should not see "Welcome to your course tour."
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I am on site homepage
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I should see "Welcome to your course tour."
|
||||
And I click on "End tour" "button"
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I am on site homepage
|
||||
And I am on course page "Course 1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I should see "Welcome to your course tour."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue