Merge branch 'wip-MDL-56614-master-2' of https://github.com/marinaglancy/moodle
This commit is contained in:
@@ -16,8 +16,7 @@ Feature: Display extended course names
|
||||
And I should not see "C_shortname Course fullname"
|
||||
|
||||
Scenario: Courses list with extended course names
|
||||
Given I expand "Site administration" node
|
||||
And I click on "Courses" "link" in the "//div[@id='settingsnav']/descendant::li[contains(concat(' ', normalize-space(@class), ' '), ' type_setting ')][contains(., 'Appearance')]" "xpath_element"
|
||||
Given I navigate to "Appearance > Courses" in site administration
|
||||
And I set the field "Display extended course names" to "1"
|
||||
When I press "Save changes"
|
||||
And I am on site homepage
|
||||
|
||||
@@ -25,7 +25,7 @@ Feature: An administrator can filter user accounts by role, cohort and other pro
|
||||
And I log in as "admin"
|
||||
And I add "User Two (two@example.com)" user to "CH1" cohort members
|
||||
And I add "User Three (three@example.com)" user to "CH1" cohort members
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
|
||||
Scenario: Filter user accounts by role and cohort
|
||||
When I set the following fields to these values:
|
||||
|
||||
@@ -8,6 +8,8 @@ Feature: Manage availability conditions
|
||||
Scenario: Display list of availability conditions
|
||||
# Check the report doesn't show when not enabled.
|
||||
Given I log in as "admin"
|
||||
And I press "Customise this page"
|
||||
And I add the "Administration" block if not present
|
||||
And the following config values are set as admin:
|
||||
| enableavailability | 0 |
|
||||
And I expand "Site administration" node
|
||||
|
||||
@@ -59,8 +59,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
Then I should see "Group 1"
|
||||
And I should see "Group 2"
|
||||
And I follow "Groupings"
|
||||
@@ -90,8 +89,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Permissions"
|
||||
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
|
||||
And I press "Cancel"
|
||||
@@ -134,30 +132,31 @@ Feature: Set up contextual data for tests
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| user4 | C1 | custom1 |
|
||||
| user2 | C1 | student |
|
||||
| user3 | C1 | editingteacher |
|
||||
And the following "role assigns" exist:
|
||||
| user | role | contextlevel | reference |
|
||||
| user1 | manager | System | |
|
||||
| user2 | editingteacher | Category | CAT1 |
|
||||
| user3 | editingteacher | Course | C1 |
|
||||
| user5 | custom2 | System | |
|
||||
When I log in as "user1"
|
||||
And I am on site homepage
|
||||
Then I should see "Front page settings"
|
||||
Then "Edit settings" "link" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "user2"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I should see "Turn editing on"
|
||||
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 site homepage
|
||||
And I follow "Course 1"
|
||||
And I should see "Turn editing on"
|
||||
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 site homepage
|
||||
And I follow "Course 1"
|
||||
And I should see "Turn editing on"
|
||||
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"
|
||||
@@ -264,8 +263,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
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)"
|
||||
And I set the field "groups" to "Group 1 (1)"
|
||||
@@ -302,7 +300,7 @@ Feature: Set up contextual data for tests
|
||||
| System cohort A | 1 |
|
||||
| System cohort B | 2 |
|
||||
And I should not see "Cohort in category"
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
And I follow "Cat 1"
|
||||
And I follow "Cohorts"
|
||||
And I should not see "System cohort"
|
||||
@@ -322,10 +320,9 @@ Feature: Set up contextual data for tests
|
||||
| fullname | course | gradecategory |
|
||||
| Grade sub category 2 | C1 | Grade category 1 |
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
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"
|
||||
|
||||
@@ -349,7 +346,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
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"
|
||||
And I expand all fieldsets
|
||||
@@ -378,7 +375,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I go to "Scales" in the course gradebook
|
||||
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"
|
||||
|
||||
@@ -429,7 +426,7 @@ Feature: Set up contextual data for tests
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
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"
|
||||
And the field "Outcome" matches value "Grade outcome 1"
|
||||
|
||||
@@ -32,8 +32,7 @@ Feature: Edit capabilities
|
||||
Scenario: Course capabilities overrides
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Permissions"
|
||||
And I navigate to "Users > Permissions" in current page administration
|
||||
And I override the system permissions of "Student" role with:
|
||||
| mod/forum:deleteanypost | Prohibit |
|
||||
| mod/forum:editanypost | Prevent |
|
||||
@@ -52,7 +51,7 @@ Feature: Edit capabilities
|
||||
| Forum name | I'm the name |
|
||||
| Description | I'm the introduction |
|
||||
And I follow "I'm the name"
|
||||
And I navigate to "Permissions" node in "Forum administration"
|
||||
And I navigate to "Permissions" in current page administration
|
||||
And I override the system permissions of "Student" role with:
|
||||
| mod/forum:deleteanypost | Prohibit |
|
||||
| mod/forum:editanypost | Prevent |
|
||||
|
||||
@@ -33,8 +33,6 @@ 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 expand "Site administration" node
|
||||
And I expand "Appearance" node
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Reset" node in "Course administration"
|
||||
@@ -60,9 +58,8 @@ Feature: Verify that all form fields values can be get and set
|
||||
| HTML format | Student page contents |
|
||||
And I press "Save"
|
||||
Then I should see "Student page contents" in the "region-main" "region"
|
||||
And I click on "Edit" "link" in the "Administration" "block"
|
||||
# Select (multi-select) - Checking "I set the field".
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
# Checkbox - Checking "I set the field".
|
||||
And I set the field "Display description on course page" to "1"
|
||||
@@ -75,7 +72,7 @@ Feature: Verify that all form fields values can be get and set
|
||||
And I press "Save and return to course"
|
||||
And I should see "Test this one"
|
||||
And I follow "Test this one"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
# Checkbox - Checking "the field matches value" and "the following fields match these values".
|
||||
And the following fields match these values:
|
||||
| Display description on course page | 1 |
|
||||
@@ -91,7 +88,7 @@ Feature: Verify that all form fields values can be get and set
|
||||
# Select (simple) - Checking "I set the field".
|
||||
And I set the field "Group mode" to "Separate groups"
|
||||
And I press "Save and display"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And the following fields match these values:
|
||||
| Default format | NWiki |
|
||||
| Group mode | Separate groups |
|
||||
@@ -134,8 +131,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 follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
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"
|
||||
And the "members" select box should contain "Student 2"
|
||||
@@ -158,7 +154,7 @@ Feature: Verify that all form fields values can be get and set
|
||||
And the "available[day]" "field" should be enabled
|
||||
And the field "deadline[enabled]" matches value "1"
|
||||
And I press "Save and display"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And the field "available[enabled]" matches value "1"
|
||||
And the "available[day]" "field" should be enabled
|
||||
And the field "deadline[enabled]" matches value "1"
|
||||
|
||||
@@ -7,12 +7,9 @@ Feature: Manage competency frameworks
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I expand "Site administration" node
|
||||
When I expand "Competencies" node
|
||||
Then I should see "Competency frameworks"
|
||||
|
||||
Scenario: Create a new framework
|
||||
Given I follow "Competency frameworks"
|
||||
Given I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "List of competency frameworks"
|
||||
And I click on "Add new competency framework" "button"
|
||||
And I should see "General"
|
||||
@@ -34,7 +31,7 @@ Feature: Manage competency frameworks
|
||||
Given the following lp "frameworks" exist:
|
||||
| shortname | idnumber |
|
||||
| Science Year-2 | sc-y-2 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-2"
|
||||
When I click on "Science Year-2" "link"
|
||||
Then I should see "Science Year-2"
|
||||
@@ -43,7 +40,7 @@ Feature: Manage competency frameworks
|
||||
Given the following lp "frameworks" exist:
|
||||
| shortname | idnumber |
|
||||
| Science Year-3 | sc-y-3 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-3"
|
||||
And I click on "Edit" of edit menu in the "Science Year-3" row
|
||||
And the field "Name" matches value "Science Year-3 "
|
||||
@@ -57,7 +54,7 @@ Feature: Manage competency frameworks
|
||||
Given the following lp "frameworks" exist:
|
||||
| shortname | idnumber |
|
||||
| Science Year-4 | sc-y-4 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-4"
|
||||
And I should see "sc-y-4"
|
||||
And I click on "Delete" of edit menu in the "Science Year-4" row
|
||||
@@ -90,7 +87,7 @@ Scenario: Edit a framework with competencies in user competency
|
||||
| user | competency |
|
||||
| admin | Comp1 |
|
||||
| admin | Comp2 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-5"
|
||||
And I click on "Edit" of edit menu in the "Science Year-5" row
|
||||
And the field "Name" matches value "Science Year-5 "
|
||||
@@ -120,7 +117,7 @@ Scenario: Edit a framework with competencies in user competency plan
|
||||
| user | competency | plan |
|
||||
| admin | Comp1 | Plan Science-6 |
|
||||
| admin | Comp2 | Plan Science-6 |
|
||||
And I follow "Competency frameworks"
|
||||
And I navigate to "Competencies > Competency frameworks" in site administration
|
||||
And I should see "Science Year-6"
|
||||
And I click on "Edit" of edit menu in the "Science Year-6" row
|
||||
And the field "Name" matches value "Science Year-6 "
|
||||
|
||||
@@ -26,9 +26,7 @@ Feature: Manage plearning plan
|
||||
| shortname | description |
|
||||
| Science template | science template description |
|
||||
And I follow "Home"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Competencies" node
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I click on ".template-userplans" "css_element" in the "Science template" "table_row"
|
||||
And I click on ".form-autocomplete-downarrow" "css_element"
|
||||
And I click on "Admin" item in the autocomplete list
|
||||
@@ -52,9 +50,7 @@ Feature: Manage plearning plan
|
||||
| student-plan1 | COHORTPLAN |
|
||||
| student-plan2 | COHORTPLAN |
|
||||
And I follow "Home"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Competencies" node
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I click on ".template-cohorts" "css_element" in the "Science template cohort" "table_row"
|
||||
And I click on ".form-autocomplete-downarrow" "css_element"
|
||||
And I click on "cohort plan" item in the autocomplete list
|
||||
|
||||
@@ -145,10 +145,7 @@ Feature: Manage plan workflow
|
||||
| Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 |
|
||||
| Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 |
|
||||
And I log in as "manager1"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Users" node
|
||||
And I expand "Accounts" node
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I follow "User 1"
|
||||
And I follow "Learning plans"
|
||||
And I should see "List of learning plans"
|
||||
@@ -167,10 +164,7 @@ Feature: Manage plan workflow
|
||||
| Test-Plan3 | user1 | Description of plan 3 for user 1 | active | manager1 |
|
||||
| Test-Plan4 | user1 | Description of plan 4 for user 1 | active | manager1 |
|
||||
And I log in as "manager1"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Users" node
|
||||
And I expand "Accounts" node
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I follow "User 1"
|
||||
And I follow "Learning plans"
|
||||
And I should see "List of learning plans"
|
||||
@@ -191,10 +185,7 @@ Scenario: Manager reopen a complete learning plan
|
||||
| Test-Plan3 | user1 | Description of plan 3 for user 1 | complete | manager1 |
|
||||
| Test-Plan4 | user1 | Description of plan 4 for user 1 | complete | manager1 |
|
||||
And I log in as "manager1"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Users" node
|
||||
And I expand "Accounts" node
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I follow "User 1"
|
||||
And I follow "Learning plans"
|
||||
And I should see "List of learning plans"
|
||||
|
||||
@@ -7,12 +7,9 @@ Feature: Manage plearning plan templates
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I expand "Site administration" node
|
||||
When I expand "Competencies" node
|
||||
Then I should see "Learning plan templates"
|
||||
|
||||
Scenario: Create a new learning plan template
|
||||
Given I follow "Learning plan templates"
|
||||
Given I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I should see "List of learning plan templates"
|
||||
And I click on "Add new learning plan template" "button"
|
||||
And I should see "Add new learning plan template"
|
||||
@@ -26,7 +23,7 @@ Feature: Manage plearning plan templates
|
||||
Given the following lp "templates" exist:
|
||||
| shortname | description |
|
||||
| Science template Year-2 | science template description |
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I should see "Science template Year-2"
|
||||
When I click on "Science template Year-2" "link"
|
||||
Then I should see "Science template Year-2"
|
||||
@@ -36,7 +33,7 @@ Feature: Manage plearning plan templates
|
||||
Given the following lp "templates" exist:
|
||||
| shortname | description |
|
||||
| Science template Year-3 | science template description |
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I should see "Science template Year-3"
|
||||
And I click on "Edit" of edit menu in the "Science template Year-3" row
|
||||
And the field "Name" matches value "Science template Year-3"
|
||||
@@ -49,7 +46,7 @@ Feature: Manage plearning plan templates
|
||||
Given the following lp "templates" exist:
|
||||
| shortname | description |
|
||||
| Science template Year-4 | science template description |
|
||||
And I follow "Learning plan templates"
|
||||
And I navigate to "Competencies > Learning plan templates" in site administration
|
||||
And I should see "Science template Year-4"
|
||||
And I click on "Delete" of edit menu in the "Science template Year-4" row
|
||||
And "Confirm" "dialogue" should be visible
|
||||
|
||||
@@ -65,6 +65,6 @@ Feature: Backup user data
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
When I go to "User report" in the course gradebook
|
||||
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"
|
||||
|
||||
@@ -42,6 +42,10 @@ Feature: Basic recycle bin functionality
|
||||
And I should see "Test assign" in the "Topic 1" "section"
|
||||
|
||||
Scenario: Restore a deleted course
|
||||
# TODO MDL-57250 remove extra category.
|
||||
Given the following "categories" exist:
|
||||
| name | idnumber |
|
||||
| There is a bug with navigation and we need an extra category | CAT1 |
|
||||
Given I log in as "admin"
|
||||
And I go to the courses management page
|
||||
And I click on "delete" action for "Course 2" in management course listing
|
||||
@@ -49,9 +53,10 @@ Feature: Basic recycle bin functionality
|
||||
And I should see "Deleting C2"
|
||||
And I should see "C2 has been completely deleted"
|
||||
And I press "Continue"
|
||||
And I go to the courses management page
|
||||
And I should not see "Course 2" in the "#course-listing" "css_element"
|
||||
When I navigate to "Recycle bin" node in "Category: Miscellaneous"
|
||||
And I am on course index
|
||||
And I follow "Miscellaneous"
|
||||
And I should not see "Course 2"
|
||||
When I navigate to "Recycle bin" in current page administration
|
||||
Then I should see "Course 2"
|
||||
And I should see "Contents will be permanently deleted after 14 days"
|
||||
And I click on "Restore" "link" in the "region-main" "region"
|
||||
|
||||
@@ -29,14 +29,13 @@ Feature: Upload users
|
||||
And I should see "Section 1"
|
||||
And I press "Upload users"
|
||||
And I press "Continue"
|
||||
And I follow "Browse list of users"
|
||||
And I navigate to "Users > Accounts > Browse list of users" in site administration
|
||||
And I should see "Tom Jones"
|
||||
And I should see "Trent Reznor"
|
||||
And I should see "reznor@example.com"
|
||||
And I am on site homepage
|
||||
And I follow "Maths"
|
||||
And I expand "Users" node
|
||||
And I follow "Groups"
|
||||
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"
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ Feature: Add a new user tour
|
||||
And I add steps to the "First tour" tour:
|
||||
| targettype | targetvalue_selector | Title | Content |
|
||||
| Selector | .usermenu | User menu | This is your personal user menu. You'll find your personal preferences and your user profile here. |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
Then I should see "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 press "Next"
|
||||
And I should see "This area shows you what's happening in some of your courses"
|
||||
@@ -38,7 +38,7 @@ Feature: Add a new user tour
|
||||
And I should see "This area shows you what's happening in some of your courses"
|
||||
And I press "End tour"
|
||||
And I should not see "This area shows you what's happening in some of your courses"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
And I am on homepage
|
||||
And I should not see "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 should not see "This area shows you what's happening in some of your courses"
|
||||
And I follow "Reset user tour on this page"
|
||||
@@ -58,7 +58,7 @@ Feature: Add a new user tour
|
||||
And I add steps to the "First tour" tour:
|
||||
| targettype | Title | Content |
|
||||
| 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 |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
Then I should not see "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"
|
||||
|
||||
@javascript
|
||||
@@ -77,5 +77,5 @@ 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 open the User tour settings page
|
||||
When I click on "Enable" "link" in the "My first tour" "table_row"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
And I am on homepage
|
||||
Then I should see "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"
|
||||
|
||||
@@ -16,7 +16,7 @@ Feature: Apply tour filters to a tour
|
||||
And I add steps to the "First tour" tour:
|
||||
| targettype | Title | Content |
|
||||
| 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 |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
Then I should not see "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"
|
||||
|
||||
@javascript
|
||||
|
||||
@@ -115,7 +115,7 @@ Feature: availability_grade
|
||||
|
||||
# Give the assignment 40%.
|
||||
And I follow "A1"
|
||||
And I click on "View all submissions" "link" in the "Administration" "block"
|
||||
And I navigate to "View all submissions" in current page administration
|
||||
# Pick the grade link in the row that has [email protected] in it.
|
||||
And I click on "Grade" "link" in the "s@example.com" "table_row"
|
||||
And I set the field "Grade out of 100" to "40"
|
||||
|
||||
@@ -101,7 +101,7 @@ Feature: availability_profile
|
||||
|
||||
# Edit it again and check the setting still works.
|
||||
When I follow "P1"
|
||||
And I navigate to "Edit settings" node in "Page module administration"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
Then the field "User profile field" matches value "Super field"
|
||||
And the field "Value to compare against" matches value "Bananaman"
|
||||
|
||||
@@ -216,7 +216,7 @@ Feature: edit_availability
|
||||
|
||||
# Check the button still works after saving and editing.
|
||||
And I press "Save and display"
|
||||
And I navigate to "Edit settings" node in "Forum administration"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And the "Add group/grouping access restriction" "button" should be disabled
|
||||
And I should see "Grouping" in the "Restrict access" "fieldset"
|
||||
|
||||
@@ -41,7 +41,7 @@ Feature: Restore Moodle 2 course backups
|
||||
Then I should see "Course 1 restored in a new course"
|
||||
And I should see "Community finder" in the "Community finder" "block"
|
||||
And I should see "Test forum name"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I expand all fieldsets
|
||||
And the field "id_format" matches value "Topics format"
|
||||
And the field "Number of sections" matches value "15"
|
||||
@@ -83,7 +83,7 @@ Feature: Restore Moodle 2 course backups
|
||||
When I restore "test_backup.mbz" backup into a new course using this options:
|
||||
Then I should see "Topic 1"
|
||||
And I should see "Test forum name"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I expand all fieldsets
|
||||
And the field "id_format" matches value "Topics format"
|
||||
And I set the following fields to these values:
|
||||
@@ -95,14 +95,14 @@ Feature: Restore Moodle 2 course backups
|
||||
And I press "Save and display"
|
||||
And I should see "1 January - 7 January"
|
||||
And I should see "Test forum name"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I expand all fieldsets
|
||||
And the field "id_format" matches value "Weekly format"
|
||||
And I set the following fields to these values:
|
||||
| id_format | Social format |
|
||||
And I press "Save and display"
|
||||
And I should see "An open forum for chatting about anything you want to"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I expand all fieldsets
|
||||
And the field "id_format" matches value "Social format"
|
||||
And I press "Cancel"
|
||||
@@ -119,7 +119,7 @@ Feature: Restore Moodle 2 course backups
|
||||
| Confirmation | Filename | test_backup.mbz |
|
||||
And I restore "test_backup.mbz" backup into "Course 2" course using this options:
|
||||
| Schema | Overwrite course configuration | Yes |
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I expand all fieldsets
|
||||
Then the field "id_format" matches value "Topics format"
|
||||
And the field "Number of sections" matches value "15"
|
||||
|
||||
@@ -14,12 +14,16 @@ Feature: Add badges to the system
|
||||
And I set the field "Default badge issuer name" to "Test Badge Site"
|
||||
And I set the field "Default badge issuer contact details" to "testuser@example.com"
|
||||
And I press "Save changes"
|
||||
And I follow "Badges"
|
||||
When I follow "Add a new badge"
|
||||
Then the field "issuercontact" matches value "testuser@example.com"
|
||||
And the field "issuername" matches value "Test Badge Site"
|
||||
|
||||
@javascript
|
||||
Scenario: Accessing the badges
|
||||
And I press "Customise this page"
|
||||
# TODO MDL-57120 site "Badges" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
Given I navigate to "Site badges" node in "Site pages"
|
||||
Then I should see "There are no badges available."
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ Feature: Block activity modules
|
||||
| workshop | Test workshop name | Test workshop description | C1 | workshop1 |
|
||||
|
||||
When I log in as "admin"
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add the "Activities" block
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
And I press "Save and return to course"
|
||||
And I follow "Course 1"
|
||||
And I should see "Test page name"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment 1"
|
||||
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment 1"
|
||||
|
||||
@@ -33,7 +33,7 @@ Feature: The activity results block displays student scores
|
||||
| id_config_nameformat | Display full names |
|
||||
And I press "Save changes"
|
||||
When I follow "Test assignment"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| id_grade_modgrade_type | None |
|
||||
And I press "Save and return to course"
|
||||
|
||||
@@ -32,7 +32,7 @@ Feature: The activity results block displays student scores
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -26,7 +26,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| student5 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "Scales" in the course gradebook
|
||||
And I navigate to "Scales" in the course gradebook
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
@@ -41,7 +41,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| id_grade_modgrade_type | Scale |
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -43,7 +43,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| student6 | G3 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "Scales" in the course gradebook
|
||||
And I navigate to "Scales" in the course gradebook
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
@@ -59,7 +59,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -32,7 +32,7 @@ Feature: The activity results block displays student scores
|
||||
| Description | Offline text |
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -26,7 +26,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| student5 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "Scales" in the course gradebook
|
||||
And I navigate to "Scales" in the course gradebook
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
@@ -41,7 +41,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| id_grade_modgrade_type | Scale |
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -43,7 +43,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| student6 | G3 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "Scales" in the course gradebook
|
||||
And I navigate to "Scales" in the course gradebook
|
||||
And I press "Add a new scale"
|
||||
And I set the following fields to these values:
|
||||
| Name | My Scale |
|
||||
@@ -59,7 +59,7 @@ Feature: The activity results block displays student scores as scales
|
||||
| id_grade_modgrade_scale | My Scale |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Separate groups |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -50,7 +50,7 @@ Feature: The activity results block displays student scores
|
||||
| assignsubmission_file_enabled | 0 |
|
||||
| Group mode | Visible groups |
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment"
|
||||
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment"
|
||||
|
||||
@@ -35,5 +35,4 @@ Feature: Enable Block Badges on the dashboard and view awarded badges
|
||||
And I press "Award badge"
|
||||
And I log out
|
||||
When I log in as "teacher1"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
Then I should see "Badge 1" in the "Latest badges" "block"
|
||||
|
||||
@@ -12,6 +12,8 @@ Feature: Feature: Students can use the recent blog entries block to view recent
|
||||
And I am on site homepage
|
||||
And I navigate to "Turn editing on" node in "Front page settings"
|
||||
And I add the "Recent blog entries" block
|
||||
# TODO MDL-57120 site "Blogs" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I log out
|
||||
|
||||
Scenario: Students use the recent blog entries block to view blogs
|
||||
|
||||
@@ -24,8 +24,11 @@ Feature: Adding blog tag block
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I add the "Blog tags" block
|
||||
# TODO MDL-57120 site "Blogs" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
|
||||
And I navigate to "Course blogs" node in "My courses > c1 > Participants"
|
||||
And I navigate to course participants
|
||||
And I click on "Course blogs" "link" in the "Navigation" "block"
|
||||
And I follow "Blog about this Course"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | Blog post from teacher |
|
||||
@@ -35,7 +38,8 @@ Feature: Adding blog tag block
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Course blogs" node in "My courses > c1 > Participants"
|
||||
And I navigate to course participants
|
||||
And I click on "Course blogs" "link" in the "Navigation" "block"
|
||||
And I follow "Blog about this Course"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | Blog post from student |
|
||||
|
||||
@@ -86,7 +86,7 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
And I create a calendar event with form data:
|
||||
| id_eventtype | User |
|
||||
| id_name | User Event |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
And I follow "Course 1"
|
||||
And I follow "Hide course events"
|
||||
And I hover over today in the calendar
|
||||
@@ -102,7 +102,7 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
And I create a calendar event with form data:
|
||||
| id_eventtype | User |
|
||||
| id_name | User Event |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
And I follow "Course 1"
|
||||
And I hover over today in the calendar
|
||||
Then I should see "User Event"
|
||||
@@ -120,7 +120,7 @@ Feature: Enable the calendar block in a course and test it's functionality
|
||||
And I create a calendar event with form data:
|
||||
| id_eventtype | User |
|
||||
| id_name | User Event |
|
||||
When I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I am on homepage
|
||||
And I follow "Course 1"
|
||||
And I follow "Hide user events"
|
||||
And I hover over today in the calendar
|
||||
|
||||
@@ -43,7 +43,7 @@ Feature: Enable Block Completion in a course
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I follow "Test page name"
|
||||
And I navigate to "Edit settings" node in "Page module administration"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@ Feature: Enable Block Completion in a course using activity completion
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I follow "Test page name"
|
||||
And I navigate to "Edit settings" node in "Page module administration"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
@@ -47,7 +47,7 @@ Feature: Enable Block Completion in a course using activity completion
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I follow "Test page name"
|
||||
And I navigate to "Edit settings" node in "Page module administration"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Completion tracking | Show activity as complete when conditions are met |
|
||||
| Require view | 1 |
|
||||
|
||||
@@ -153,7 +153,6 @@ Feature: View the course overview block on the dashboard and test it's functiona
|
||||
And I click on "Enable" "link" in the "Course meta link" "table_row"
|
||||
And I am on site homepage
|
||||
And I follow "Course 2"
|
||||
And I navigate to "Enrolment methods" node in "Course administration > Users"
|
||||
And I add "Course meta link" enrolment method with:
|
||||
| Link course | C1 |
|
||||
And I log out
|
||||
|
||||
@@ -10,7 +10,7 @@ Scenario: Admin can add random glossary block to the frontpage
|
||||
| glossary | Tips and Tricks | Frontpage glossary description | Acceptance test site | glossary0 |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I click on "Turn editing on" "link" in the "Administration" "block"
|
||||
And I turn editing mode on
|
||||
And I add the "Random glossary entry" block
|
||||
And I configure the "block_glossary_random" block
|
||||
And I set the following fields to these values:
|
||||
|
||||
@@ -8,7 +8,7 @@ Feature: Adding and configuring HTML blocks
|
||||
Scenario: Configuring the HTML block with Javascript on
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
When I click on "Turn editing on" "link" in the "Administration" "block"
|
||||
When I turn editing mode on
|
||||
And I add the "HTML" block
|
||||
And I configure the "(new HTML block)" block
|
||||
And I set the field "Content" to "Static text without a header"
|
||||
@@ -25,7 +25,7 @@ Feature: Adding and configuring HTML blocks
|
||||
Scenario: Configuring the HTML block with Javascript off
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
When I click on "Turn editing on" "link" in the "Administration" "block"
|
||||
When I turn editing mode on
|
||||
And I add the "HTML" block
|
||||
And I configure the "(new HTML block)" block
|
||||
And I set the field "Content" to "Static text without a header"
|
||||
|
||||
@@ -7,7 +7,7 @@ Feature: Adding and configuring HTML blocks
|
||||
Background:
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
When I click on "Turn editing on" "link" in the "Administration" "block"
|
||||
When I turn editing mode on
|
||||
And I add the "HTML" block
|
||||
|
||||
Scenario: Other users can not see HTML block that has not been configured
|
||||
|
||||
@@ -38,6 +38,13 @@ Feature: Expand the courses nodes within the navigation block
|
||||
| navshowallcourses | 1 |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
And I press "Save changes"
|
||||
And I turn editing mode off
|
||||
And I follow "Course 2"
|
||||
And I navigate to "Enrolment methods" node in "Course administration > Users"
|
||||
And I click on "Edit" "link" in the "Guest access" "table_row"
|
||||
|
||||
@@ -15,13 +15,22 @@ Feature: Displaying the link to the Participants page
|
||||
And the following "course enrolments" exist:
|
||||
| user | course | role |
|
||||
| student1 | C1 | student |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
|
||||
@javascript
|
||||
Scenario: Course participants link is displayed to enrolled students after expanding the course node
|
||||
When I log in as "student1"
|
||||
And I expand "C1" node
|
||||
Then "Participants" "link" should exist in the "Navigation" "block"
|
||||
And I navigate to "Participants" node in "My courses > C1"
|
||||
And I click on "Participants" "link" in the "Navigation" "block"
|
||||
And I should see "Participants"
|
||||
And "Student One" "link" should exist
|
||||
And "Student Two" "link" should not exist
|
||||
@@ -29,7 +38,7 @@ Feature: Displaying the link to the Participants page
|
||||
Scenario: Site participants link is displayed to admins
|
||||
When I log in as "admin"
|
||||
Then "Participants" "link" should exist in the "Navigation" "block"
|
||||
And I navigate to "Participants" node in "Site pages"
|
||||
And I click on "Participants" "link" in the "Navigation" "block"
|
||||
And I should see "Participants"
|
||||
And "Student One" "link" should exist
|
||||
And "Student Two" "link" should exist
|
||||
|
||||
@@ -29,6 +29,15 @@ Feature: View my courses in navigation block
|
||||
| student1 | c1 | student |
|
||||
| student1 | c31 | student |
|
||||
| student1 | c331 | student |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
|
||||
@javascript
|
||||
Scenario: The plain list of enrolled courses is shown
|
||||
|
||||
@@ -34,14 +34,14 @@ Feature: Latest announcements block displays the course latest news
|
||||
Then I should see "Discussion One" in the "Latest announcements" "block"
|
||||
And I should see "Discussion Two" in the "Latest announcements" "block"
|
||||
And I should see "Discussion Three" in the "Latest announcements" "block"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| News items to show | 2 |
|
||||
And I press "Save and display"
|
||||
And I should not see "Discussion One" in the "Latest announcements" "block"
|
||||
And I should see "Discussion Two" in the "Latest announcements" "block"
|
||||
And I should see "Discussion Three" in the "Latest announcements" "block"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| News items to show | 0 |
|
||||
And I press "Save and display"
|
||||
|
||||
@@ -165,7 +165,7 @@ Feature: View structural changes in recent activity block
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I follow "ForumNew"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| name | ForumUpdated |
|
||||
And I press "Save and return to course"
|
||||
|
||||
@@ -43,7 +43,7 @@ Feature: The search forums block allows users to search for forum posts
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I follow "Announcements"
|
||||
And I navigate to "Edit settings" node in "Forum administration"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I set the field "id_visible" to "0"
|
||||
And I press "Save and return to course"
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
|
||||
// NOTE: no MOODLE_INTERNAL test here, this file may be required by behat before including /config.php.
|
||||
|
||||
use Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException;
|
||||
|
||||
require_once(__DIR__ . '/../../../lib/behat/behat_base.php');
|
||||
|
||||
/**
|
||||
@@ -56,6 +58,20 @@ class behat_blocks extends behat_base {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the selected block if it is not already present. Editing mode must be previously enabled.
|
||||
*
|
||||
* @Given /^I add the "(?P<block_name_string>(?:[^"]|\\")*)" block if not present$/
|
||||
* @param string $blockname
|
||||
*/
|
||||
public function i_add_the_block_if_not_present($blockname) {
|
||||
try {
|
||||
$this->get_text_selector_node('block', $blockname);
|
||||
} catch (ElementNotFoundException $e) {
|
||||
$this->execute('behat_blocks::i_add_the_block', [$blockname]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Docks a block. Editing mode should be previously enabled.
|
||||
*
|
||||
|
||||
@@ -50,9 +50,8 @@ Feature: Add and configure blocks throughout the site
|
||||
|
||||
Scenario: Blocks on the dashboard page can have roles assigned to them
|
||||
Given I log in as "manager1"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
When I press "Customise this page"
|
||||
Then I should see "Assign roles in Navigation block"
|
||||
Then I should see "Assign roles in Private files block"
|
||||
|
||||
Scenario: Blocks on courses can have roles assigned to them
|
||||
Given I log in as "teacher1"
|
||||
@@ -64,7 +63,7 @@ Feature: Add and configure blocks throughout the site
|
||||
@javascript
|
||||
Scenario: Blocks can safely be customised
|
||||
Given I log in as "admin"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
And I am on homepage
|
||||
And I press "Customise this page"
|
||||
And I add the "HTML" block
|
||||
And I configure the "(new HTML block)" block
|
||||
|
||||
@@ -30,8 +30,7 @@ Feature: Allowed blocks controls
|
||||
| block/activity_modules:addinstance | Prohibit |
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Permissions"
|
||||
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
|
||||
|
||||
@@ -14,7 +14,7 @@ Feature: The context of a block can always be returned to it's original state.
|
||||
And I follow "Turn editing on"
|
||||
And I add the "Tags" block
|
||||
Then I should see "Tags" in the "Tags" "block"
|
||||
And I click on "Participants" "link" in the "//li[p/a[contains(normalize-space(string(.)), 'Courses')]]" "xpath_element"
|
||||
And I navigate to course participants
|
||||
And I configure the "Tags" block
|
||||
And I set the following fields to these values:
|
||||
| Display on page types | Any page |
|
||||
@@ -31,7 +31,7 @@ Feature: The context of a block can always be returned to it's original state.
|
||||
And I should see "Tags" in the "Tags" "block"
|
||||
And I follow "Course 1"
|
||||
And "Tags" "block" should not exist
|
||||
And I navigate to "Participants" node in "Courses > C1"
|
||||
And I navigate to course participants
|
||||
And "Tags" "block" should not exist
|
||||
And I follow "Course 1"
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
@@ -45,5 +45,5 @@ Feature: The context of a block can always be returned to it's original state.
|
||||
And I press "Save changes"
|
||||
And I follow "Course 1"
|
||||
And I should see "Tags" in the "Tags" "block"
|
||||
And I navigate to "Participants" node in "Courses > C1"
|
||||
And I navigate to course participants
|
||||
And I should see "Tags" in the "Tags" "block"
|
||||
|
||||
@@ -27,7 +27,7 @@ Feature: Blogs can be set to be only visible by the author.
|
||||
Scenario: A student can not see another student's blog entries.
|
||||
Given I log in as "testuser"
|
||||
And I follow "Course 1"
|
||||
And I follow "Participants"
|
||||
And I navigate to course participants
|
||||
And I follow "Test2 User2"
|
||||
And I should see "Miscellaneous"
|
||||
Then I should not see "Blog entries"
|
||||
|
||||
@@ -9,9 +9,18 @@ Feature: Comment on a blog entry
|
||||
| username | firstname | lastname | email |
|
||||
| testuser | Test | User | moodle@example.com |
|
||||
| testuser2 | Test2 | User2 | moodle2@example.com |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
# TODO MDL-57120 "Site blogs" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
And I log in as "testuser"
|
||||
And I expand "Site pages" node
|
||||
And I follow "Site blogs"
|
||||
And I navigate to "Site blogs" node in "Site pages"
|
||||
And I follow "Add a new entry"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | Blog post from user 1 |
|
||||
@@ -23,8 +32,7 @@ Feature: Comment on a blog entry
|
||||
Scenario: Commenting on my own blog entry
|
||||
Given I am on site homepage
|
||||
And I log in as "testuser"
|
||||
And I expand "Site pages" node
|
||||
And I follow "Site blogs"
|
||||
And I navigate to "Site blogs" node in "Site pages"
|
||||
And I follow "Blog post from user 1"
|
||||
And I should see "User 1 blog post content"
|
||||
And I follow "Comments (0)"
|
||||
@@ -39,8 +47,7 @@ Feature: Comment on a blog entry
|
||||
Scenario: Deleting my own comment
|
||||
Given I am on site homepage
|
||||
And I log in as "testuser"
|
||||
And I expand "Site pages" node
|
||||
And I follow "Site blogs"
|
||||
And I navigate to "Site blogs" node in "Site pages"
|
||||
And I follow "Blog post from user 1"
|
||||
And I should see "User 1 blog post content"
|
||||
And I follow "Comments (0)"
|
||||
@@ -60,8 +67,7 @@ Feature: Comment on a blog entry
|
||||
Given I am on site homepage
|
||||
And I log in as "testuser2"
|
||||
And I am on site homepage
|
||||
And I expand "Site pages" node
|
||||
And I follow "Site blogs"
|
||||
And I navigate to "Site blogs" node in "Site pages"
|
||||
And I follow "Blog post from user 1"
|
||||
When I follow "Comments (0)"
|
||||
And I set the field "content" to "$My own >nasty< \"string\"!"
|
||||
|
||||
@@ -8,9 +8,18 @@ Feature: Delete a blog entry
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| testuser | Test | User | moodle@example.com |
|
||||
And I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
# TODO MDL-57120 "Site blogs" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
And I log in as "testuser"
|
||||
And I expand "Site pages" node
|
||||
And I follow "Site blogs"
|
||||
And I navigate to "Site blogs" node in "Site pages"
|
||||
And I follow "Add a new entry"
|
||||
And I set the following fields to these values:
|
||||
| Entry title | Blog post one |
|
||||
@@ -22,8 +31,7 @@ Feature: Delete a blog entry
|
||||
| Blog entry body | User 1 blog post content |
|
||||
And I press "Save changes"
|
||||
And I am on site homepage
|
||||
And I expand "Site pages" node
|
||||
And I follow "Site blogs"
|
||||
And I navigate to "Site blogs" node in "Site pages"
|
||||
|
||||
Scenario: Delete blog post results in post deleted
|
||||
Given I follow "Blog post one"
|
||||
|
||||
@@ -58,8 +58,10 @@ Feature: Access visible and hidden cohorts
|
||||
And the "Cohort" select box should contain "System empty cohort"
|
||||
And I set the field "Cohort" to "System cohort"
|
||||
And I press "Add method"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Enrolled users" node in "Course administration > Users"
|
||||
And I should see "student@example.com"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Groups" node in "Course administration > Users"
|
||||
And I press "Auto-create groups"
|
||||
And the "Select members from cohort" select box should contain "Cohort in category 1"
|
||||
|
||||
@@ -38,7 +38,8 @@ Feature: Add cohorts of users
|
||||
And the "Current users" select box should not contain "Forth User (forth@example.com)"
|
||||
|
||||
Scenario: Add users to a cohort using a bulk user action
|
||||
When I follow "Bulk user actions"
|
||||
When I follow "Accounts"
|
||||
And I follow "Bulk user actions"
|
||||
And I set the field "Available" to "Third User"
|
||||
And I press "Add to selection"
|
||||
And I set the field "Available" to "Forth User"
|
||||
@@ -47,6 +48,7 @@ Feature: Add cohorts of users
|
||||
And I press "Go"
|
||||
And I set the field "Cohort" to "Test cohort name [333]"
|
||||
And I press "Add to cohort"
|
||||
And I follow "Accounts"
|
||||
And I follow "Cohorts"
|
||||
Then I should see "2" in the "#cohorts" "css_element"
|
||||
And I click on "Assign" "link" in the "Test cohort name" "table_row"
|
||||
|
||||
@@ -28,7 +28,7 @@ Feature: Upload users to a cohort
|
||||
And I press "Upload users"
|
||||
And I press "Upload users"
|
||||
And I press "Continue"
|
||||
And I follow "Cohorts"
|
||||
And I navigate to "Users > Accounts > Cohorts" in site administration
|
||||
And I click on "Assign" "link" in the "Cohort 1" "table_row"
|
||||
Then the "Current users" select box should contain "Tom Jones (tomjones@example.com)"
|
||||
And the "Current users" select box should contain "Bob Jones (bobjones@example.com)"
|
||||
@@ -38,15 +38,13 @@ Feature: Upload users to a cohort
|
||||
And the "Current users" select box should contain "Alice Smith (alicesmith@example.com)"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Enrolled users"
|
||||
And I navigate to "Users > Enrolled users" in current page administration
|
||||
And I should see "Tom Jones"
|
||||
And I should see "Bob Jones"
|
||||
And I should not see "Mary Smith"
|
||||
And I am on site homepage
|
||||
And I follow "Course 2"
|
||||
And I expand "Users" node
|
||||
And I follow "Enrolled users"
|
||||
And I navigate to "Users > Enrolled users" in current page administration
|
||||
And I should see "Mary Smith"
|
||||
And I should see "Alice Smith"
|
||||
And I should not see "Tom Jones"
|
||||
|
||||
@@ -90,9 +90,9 @@ Feature: A privileged user can create cohorts using a CSV file
|
||||
| user | role | contextlevel | reference |
|
||||
| user1 | manager | Category | CAT1 |
|
||||
When I log in as "user1"
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
And I follow "Cat 1"
|
||||
And I navigate to "Cohorts" node in "Category: Cat 1"
|
||||
And I navigate to "Cohorts" in current page administration
|
||||
And I follow "Upload cohorts"
|
||||
And I upload "cohort/tests/fixtures/uploadcohorts1.csv" file to "File" filemanager
|
||||
And I click on "Preview" "button"
|
||||
|
||||
@@ -53,7 +53,7 @@ Feature: View cohort list
|
||||
|
||||
Scenario: Manager in category can see cohorts in the category
|
||||
When I log in as "user2"
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
And I follow "Cat 1"
|
||||
And I follow "Cohorts"
|
||||
And I should not see "All cohorts"
|
||||
|
||||
@@ -21,7 +21,7 @@ Feature: Allow students to manually mark an activity as complete
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
And I press "Save and display"
|
||||
@@ -38,6 +38,5 @@ Feature: Allow students to manually mark an activity as complete
|
||||
And I log in as "teacher1"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Reports" node
|
||||
And I follow "Activity completion"
|
||||
And I navigate to "Reports > Activity completion" in current page administration
|
||||
And "Student First" user has completed "Test forum name" activity
|
||||
|
||||
@@ -56,7 +56,7 @@ Feature: Restrict activity availability through grade conditions
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I follow "Grade assignment"
|
||||
And I click on "View all submissions" "link" in the "Administration" "block"
|
||||
And I navigate to "View all submissions" in current page administration
|
||||
And I click on "Grade" "link" in the "Student First" "table_row"
|
||||
And I set the following fields to these values:
|
||||
| Grade | 21 |
|
||||
|
||||
@@ -23,7 +23,7 @@ Feature: Restrict sections availability through completion or grade conditions
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I turn editing mode on
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Enable completion tracking | Yes |
|
||||
And I press "Save and display"
|
||||
@@ -93,7 +93,7 @@ Feature: Restrict sections availability through completion or grade conditions
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I follow "Grade assignment"
|
||||
And I click on "View all submissions" "link" in the "Administration" "block"
|
||||
And I navigate to "View all submissions" in current page administration
|
||||
And I click on "Grade" "link" in the "Student First" "table_row"
|
||||
And I set the following fields to these values:
|
||||
| Grade | 21 |
|
||||
|
||||
@@ -97,7 +97,7 @@ Background:
|
||||
And I follow "Course 1"
|
||||
|
||||
Scenario: When number of discussions is decreased fewer discussions appear
|
||||
Given I click on "Edit settings" "link" in the "Administration" "block"
|
||||
Given I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| numdiscussions | 5 |
|
||||
When I press "Save and display"
|
||||
@@ -106,7 +106,7 @@ Scenario: When number of discussions is decreased fewer discussions appear
|
||||
And I should not see "This is forum post six"
|
||||
|
||||
Scenario: When number of discussions is decreased to less than 1 only 1 discussion should appear
|
||||
Given I click on "Edit settings" "link" in the "Administration" "block"
|
||||
Given I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| numdiscussions | -1 |
|
||||
When I press "Save and display"
|
||||
@@ -115,7 +115,7 @@ Scenario: When number of discussions is decreased to less than 1 only 1 discussi
|
||||
And I should not see "This is forum post ten"
|
||||
|
||||
Scenario: When number of discussions is increased more discussions appear
|
||||
Given I click on "Edit settings" "link" in the "Administration" "block"
|
||||
Given I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| numdiscussions | 9 |
|
||||
When I press "Save and display"
|
||||
|
||||
@@ -35,24 +35,24 @@ Feature: Edit completion settings of an activity
|
||||
@javascript
|
||||
Scenario: Pressing the unlock button allows the user to edit completion settings
|
||||
Given I follow "TestPage"
|
||||
When I click on "Edit settings" "link" in the "Administration" "block"
|
||||
When I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
And I press "Unlock completion options"
|
||||
Then I should see "Completion options unlocked"
|
||||
And I set the field "Completion tracking" to "Students can manually mark the activity as completed"
|
||||
And I press "Save and display"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
Then the field "Completion tracking" matches value "Students can manually mark the activity as completed"
|
||||
|
||||
@javascript
|
||||
Scenario: Even when completion is locked, the user can still set the date
|
||||
Given I follow "TestPage"
|
||||
When I click on "Edit settings" "link" in the "Administration" "block"
|
||||
When I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
When I click on "id_completionexpected_enabled" "checkbox"
|
||||
And I set the field "id_completionexpected_year" to "2013"
|
||||
And I press "Save and display"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I expand all fieldsets
|
||||
Then the field "id_completionexpected_year" matches value "2013"
|
||||
|
||||
@@ -21,7 +21,7 @@ Feature: Toggle activities groups mode from the course page
|
||||
And I add a "Forum" to section "1" and I fill the form with:
|
||||
| Forum name | Test forum name |
|
||||
| Description | Test forum description |
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Group mode | No groups |
|
||||
| Force group mode | No |
|
||||
|
||||
@@ -30,8 +30,9 @@ Feature: Add activities to courses
|
||||
| Allow comments on entries | Yes |
|
||||
And I turn editing mode off
|
||||
Then I should not see "Adding a new"
|
||||
And I follow "Test name"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I turn editing mode on
|
||||
And I open "Test name" actions menu
|
||||
And I click on "Edit settings" "link" in the "Test name" activity
|
||||
And I expand all fieldsets
|
||||
And the field "Name" matches value "Test name"
|
||||
And the field "Entries required for completion" matches value "9"
|
||||
|
||||
@@ -51,7 +51,7 @@ class behat_course extends behat_base {
|
||||
try {
|
||||
$this->execute("behat_forms::press_button", get_string('turneditingon'));
|
||||
} catch (Exception $e) {
|
||||
$this->execute("behat_general::i_click_on_in_the", [get_string('turneditingon'), 'link', 'Administration', 'block']);
|
||||
$this->execute("behat_navigation::i_navigate_to_in_current_page_administration", [get_string('turneditingon')]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ class behat_course extends behat_base {
|
||||
try {
|
||||
$this->execute("behat_forms::press_button", get_string('turneditingoff'));
|
||||
} catch (Exception $e) {
|
||||
$this->execute("behat_general::i_click_on_in_the", [get_string('turneditingoff'), 'link', 'Administration', 'block']);
|
||||
$this->execute("behat_navigation::i_navigate_to_in_current_page_administration", [get_string('turneditingoff')]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1728,4 +1728,16 @@ class behat_course extends behat_base {
|
||||
$node = $this->get_management_category_listing_node_by_name($name);
|
||||
$node->find('css', 'a.categoryname')->click();
|
||||
}
|
||||
|
||||
/**
|
||||
* Go to the course participants
|
||||
*
|
||||
* @Given /^I navigate to course participants$/
|
||||
*/
|
||||
public function i_navigate_to_course_participants() {
|
||||
$coursestr = behat_context_helper::escape(get_string('courses'));
|
||||
$mycoursestr = behat_context_helper::escape(get_string('mycourses'));
|
||||
$xpath = "//div[contains(@class,'block')]//li[p/*[string(.)=$coursestr or string(.)=$mycoursestr]]";
|
||||
$this->execute('behat_general::i_click_on_in_the', [get_string('participants'), 'link', $xpath, 'xpath_element']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,9 +340,7 @@ Feature: Test category management actions
|
||||
| name | category | idnumber |
|
||||
| Cat 1 | 0 | CAT1 |
|
||||
And I log in as "admin"
|
||||
And I expand "Site administration" node
|
||||
And I expand "Courses" node
|
||||
And I follow "Add a category"
|
||||
And I navigate to "Courses > Add a category" in site administration
|
||||
And I set the following fields to these values:
|
||||
| Category name | Test duplicate |
|
||||
| Category ID number | CAT1 |
|
||||
|
||||
@@ -16,16 +16,15 @@ Feature: Role assignments can be made at the category level
|
||||
| manager | manager | Category | CAT1 |
|
||||
And I log in as "admin"
|
||||
|
||||
|
||||
@javascript
|
||||
Scenario: A user with a category role can assign roles
|
||||
Given I define the allowed role assignments for the "Manager" role as:
|
||||
| Teacher | Assignable |
|
||||
And I log out
|
||||
And I log in as "manager"
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
When I follow "Cat 1"
|
||||
Then I should see "Assign roles"
|
||||
Then "Assign roles" "link" should exist in current page administration
|
||||
|
||||
@javascript
|
||||
Scenario: A user with a category role cannot assign roles if there are no roles to assign
|
||||
@@ -37,6 +36,6 @@ Feature: Role assignments can be made at the category level
|
||||
| Student | Not assignable |
|
||||
And I log out
|
||||
And I log in as "manager"
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
When I follow "Cat 1"
|
||||
Then I should not see "Assign roles"
|
||||
Then "Assign roles" "link" should not exist in current page administration
|
||||
|
||||
@@ -5,7 +5,7 @@ Feature: Managers can create courses
|
||||
I need to create courses and set default values on them
|
||||
|
||||
@javascript
|
||||
Scenario: Courses are created with the default forum and blocks
|
||||
Scenario: Courses are created with the default announcements forum
|
||||
Given the following "users" exist:
|
||||
| username | firstname | lastname | email |
|
||||
| teacher1 | Teacher | 1 | teacher1@example.com |
|
||||
@@ -24,13 +24,14 @@ Feature: Managers can create courses
|
||||
Then "Latest announcements" "block" should exist
|
||||
And I follow "Announcements"
|
||||
And "Add a new topic" "button" should exist
|
||||
And "Forced subscription" "link" should not exist
|
||||
And "Subscription mode > Forced subscription" "link" should not exist in current page administration
|
||||
And "Subscription mode > Forced subscription" "text" should exist in current page administration
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Announcements"
|
||||
And "Add a new topic" "button" should not exist
|
||||
And I should see "Forced subscription" in the "Administration" "block"
|
||||
And "Subscription mode > Forced subscription" "text" should exist in current page administration
|
||||
|
||||
Scenario: Create a course from the management interface and return to it
|
||||
Given the following "courses" exist:
|
||||
|
||||
@@ -25,7 +25,7 @@ Feature: Tagging courses
|
||||
| teacher2 | c2 | teacher |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Tags | Mathematics |
|
||||
And I press "Save and display"
|
||||
@@ -34,21 +34,23 @@ Feature: Tagging courses
|
||||
Scenario: Set course tags using the course edit form
|
||||
When I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And "Course tags" "link" should not exist in the "Administration" "block"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I expand all fieldsets
|
||||
Then I should see "Mathematics" in the ".form-autocomplete-selection" "css_element"
|
||||
And I set the following fields to these values:
|
||||
| Tags | Algebra |
|
||||
And I press "Save and display"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
And I am on homepage
|
||||
And I follow "Course 2"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" node in "Course administration"
|
||||
And I set the following fields to these values:
|
||||
| Tags | Mathematics, Geometry |
|
||||
And I press "Save and display"
|
||||
And I log out
|
||||
And I log in as "user1"
|
||||
And I press "Customise this page"
|
||||
# TODO MDL-57120 "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I navigate to "Tags" node in "Site pages"
|
||||
And I follow "Mathematics"
|
||||
Then I should see "Course 1"
|
||||
@@ -70,20 +72,22 @@ Feature: Tagging courses
|
||||
And I log out
|
||||
When I log in as "teacher2"
|
||||
And I follow "Course 1"
|
||||
And "Edit settings" "link" should not exist in the "Administration" "block"
|
||||
And I click on "Course tags" "link" in the "Administration" "block"
|
||||
And I navigate to "Course tags" in current page administration
|
||||
Then I should see "Mathematics" in the ".form-autocomplete-selection" "css_element"
|
||||
And I set the following fields to these values:
|
||||
| Tags | Algebra |
|
||||
And I press "Save changes"
|
||||
And I click on "Dashboard" "link" in the "Navigation" "block"
|
||||
And I am on homepage
|
||||
And I follow "Course 2"
|
||||
And I click on "Course tags" "link" in the "Administration" "block"
|
||||
And I navigate to "Course tags" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Tags | Mathematics, Geometry |
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
And I log in as "user1"
|
||||
And I press "Customise this page"
|
||||
# TODO MDL-57120 "Tags" link not accessible without navigation block.
|
||||
And I add the "Navigation" block if not present
|
||||
And I navigate to "Tags" node in "Site pages"
|
||||
And I follow "Mathematics"
|
||||
Then I should see "Course 1"
|
||||
|
||||
@@ -17,7 +17,7 @@ Feature: Edit course settings
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
When I click on "Edit settings" "link" in the "Administration" "block"
|
||||
When I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Course full name | Edited course fullname |
|
||||
| Course short name | Edited course shortname |
|
||||
@@ -28,7 +28,7 @@ Feature: Edit course settings
|
||||
And I should not see "C1"
|
||||
And I should see "Edited course fullname"
|
||||
And I should see "Edited course shortname"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And the field "Course full name" matches value "Edited course fullname"
|
||||
And the field "Course short name" matches value "Edited course shortname"
|
||||
And the field "Course summary" matches value "Edited course summary"
|
||||
|
||||
@@ -20,7 +20,7 @@ Feature: Force group mode in a course
|
||||
And I add a "Chat" to section "1" and I fill the form with:
|
||||
| Name of this chat room | Chat room |
|
||||
| Description | Chat description |
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
|
||||
@javascript
|
||||
Scenario: Forced group mode using separate groups
|
||||
|
||||
@@ -20,10 +20,6 @@ Feature: Activities can be moved between sections
|
||||
And I add the "Recent activity" block
|
||||
And I follow "Delete Recent activity block"
|
||||
And I press "Yes"
|
||||
And I follow "Configure Navigation block"
|
||||
And I set the following fields to these values:
|
||||
| Visible | Yes |
|
||||
And I press "Save changes"
|
||||
And I add a "Forum" to section "1" and I fill the form with:
|
||||
| Forum name | Test forum name |
|
||||
| Description | Test forum description |
|
||||
@@ -34,7 +30,7 @@ Feature: Activities can be moved between sections
|
||||
And I should not see "Test forum name" in the "Topic 1" "section"
|
||||
|
||||
Scenario: Move activities in the course home with Javascript disabled using paged mode
|
||||
Given I click on "Edit settings" "link" in the "Administration" "block"
|
||||
Given I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Course layout | Show one section per page |
|
||||
And I press "Save and display"
|
||||
@@ -43,7 +39,7 @@ Feature: Activities can be moved between sections
|
||||
And I should not see "Test forum name" in the "Topic 1" "section"
|
||||
|
||||
Scenario: Move activities in a course section with Javascript disabled using paged mode
|
||||
Given I click on "Edit settings" "link" in the "Administration" "block"
|
||||
Given I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Course layout | Show one section per page |
|
||||
And I press "Save and display"
|
||||
|
||||
@@ -28,7 +28,7 @@ Feature: Sections can be moved
|
||||
And I should see "Test forum name" in the "Topic 1" "section"
|
||||
|
||||
Scenario: Move up and down a section with Javascript disabled in the course home of a course using paged mode
|
||||
Given I click on "Edit settings" "link" in the "Administration" "block"
|
||||
Given I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Course layout | Show one section per page |
|
||||
And I press "Save and display"
|
||||
@@ -41,7 +41,7 @@ Feature: Sections can be moved
|
||||
And I should see "Test forum name" in the "Topic 1" "section"
|
||||
|
||||
Scenario: Sections can not be moved with Javascript disabled in a section page of a course using paged mode
|
||||
Given I click on "Edit settings" "link" in the "Administration" "block"
|
||||
Given I navigate to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Course layout | Show one section per page |
|
||||
And I press "Save and display"
|
||||
|
||||
@@ -19,7 +19,7 @@ Feature: Browse course list and return back from enrolment page
|
||||
|
||||
Scenario: A user can return to the category page from enrolment page
|
||||
When I log in as "user2"
|
||||
And I click on "Courses" "link" in the "Navigation" "block"
|
||||
And I am on course index
|
||||
And I follow "Miscellaneous"
|
||||
And I follow "Sample course"
|
||||
And I press "Continue"
|
||||
@@ -32,6 +32,15 @@ Feature: Browse course list and return back from enrolment page
|
||||
|
||||
@javascript
|
||||
Scenario: A user can return to the previous page from enrolment page by clicking navigation links
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I turn editing mode on
|
||||
And I add the "Navigation" block if not present
|
||||
And I configure the "Navigation" block
|
||||
And I set the following fields to these values:
|
||||
| Page contexts | Display throughout the entire site |
|
||||
And I press "Save changes"
|
||||
And I log out
|
||||
When I log in as "user2"
|
||||
And I follow "Preferences" in the user menu
|
||||
And I click on "Edit profile" "link" in the "region-main" "region"
|
||||
@@ -57,7 +66,7 @@ Feature: Browse course list and return back from enrolment page
|
||||
| moodle/course:view | Allow |
|
||||
And I log out
|
||||
When I log in as "user1"
|
||||
And I click on "Courses" "link" in the "Navigation" "block"
|
||||
And I am on course index
|
||||
And I follow "Miscellaneous"
|
||||
And I follow "Sample course"
|
||||
And I follow "Test choice"
|
||||
|
||||
@@ -21,7 +21,7 @@ Feature: Rename roles within a course
|
||||
| student1 | C1 | student |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
When I click on "Edit settings" "link" in the "Administration" "block"
|
||||
When I go to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Your word for 'Non-editing teacher' | Tutor |
|
||||
| Your word for 'Student' | Learner |
|
||||
@@ -29,11 +29,12 @@ Feature: Rename roles within a course
|
||||
And I follow "Switch role to..." in the user menu
|
||||
Then "Tutor" "button" should exist
|
||||
And "Learner" "button" should exist
|
||||
And I follow "Participants"
|
||||
And I navigate to course participants
|
||||
And the "roleid" select box should contain "Tutor"
|
||||
And the "roleid" select box should contain "Learner"
|
||||
And the "roleid" select box should not contain "Student"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I follow "Course 1"
|
||||
And I go to "Edit settings" in current page administration
|
||||
And I set the following fields to these values:
|
||||
| Your word for 'Non-editing teacher' | |
|
||||
| Your word for 'Student' | |
|
||||
@@ -42,6 +43,6 @@ Feature: Rename roles within a course
|
||||
And I should see "Teacher"
|
||||
And "Student" "button" should exist
|
||||
And "Learner" "button" should not exist
|
||||
And I follow "Participants"
|
||||
And I navigate to course participants
|
||||
And the "roleid" select box should contain "Non-editing teacher"
|
||||
And the "roleid" select box should contain "Student"
|
||||
|
||||
@@ -35,8 +35,7 @@ Feature: Restrict activities availability
|
||||
| mod/chat:addinstance | Prohibit |
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I expand "Users" node
|
||||
And I follow "Permissions"
|
||||
And I navigate to "Users > Permissions" in current page administration
|
||||
And I override the system permissions of "Teacher" role with:
|
||||
| mod/glossary:addinstance | Prohibit |
|
||||
And I log out
|
||||
|
||||
@@ -20,7 +20,7 @@ Feature: Rename roles in a course
|
||||
Scenario: Teacher can rename roles
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I should see "Role renaming"
|
||||
When I set the following fields to these values:
|
||||
| Your word for 'Teacher' | Lecturer |
|
||||
@@ -38,6 +38,6 @@ Feature: Rename roles in a course
|
||||
And I follow "Log out"
|
||||
When I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I click on "Edit settings" "link" in the "Administration" "block"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
Then I should not see "Role renaming"
|
||||
And I should not see "Your word for 'Teacher'"
|
||||
|
||||
@@ -53,7 +53,7 @@ Feature: View subfolders in a course in-line
|
||||
And I click on "button.fp-dlg-butcreate" "css_element" in the "div.fp-mkdir-dlg" "css_element"
|
||||
And I press "Save changes"
|
||||
And I should see "Test sub subfolder"
|
||||
And I navigate to "Edit settings" node in "Folder administration"
|
||||
And I navigate to "Edit settings" in current page administration
|
||||
And I set the field "Display folder contents" to "Inline on a course page"
|
||||
And I set the field "Show subfolders expanded" to ""
|
||||
And I press "Save and return to course"
|
||||
|
||||
@@ -31,8 +31,7 @@ Feature: Enrolments are synchronised with meta courses
|
||||
And I log in as "admin"
|
||||
And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments"
|
||||
And I click on "Enable" "link" in the "Course meta link" "table_row"
|
||||
And I am on homepage
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
|
||||
Scenario: Add meta enrolment instance without groups
|
||||
When I follow "Course 3"
|
||||
@@ -94,8 +93,7 @@ Feature: Enrolments are synchronised with meta courses
|
||||
And I press "Next"
|
||||
And I press "Perform restore"
|
||||
And I trigger cron
|
||||
And I am on homepage
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
And I follow "Course 4"
|
||||
And I navigate to "Enrolment methods" node in "Course administration > Users"
|
||||
Then I should see "Course meta link (Course 1)"
|
||||
|
||||
@@ -74,7 +74,8 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
|
||||
| Custom instance name | Test student enrolment |
|
||||
| Enrolment key | moodle_rules |
|
||||
| Use group enrolment keys | Yes |
|
||||
And I follow "Groups"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Users > Groups" in current page administration
|
||||
And I press "Create group"
|
||||
And I set the following fields to these values:
|
||||
| Group name | Group 1 |
|
||||
|
||||
@@ -12,7 +12,7 @@ Feature: User can be enrolled into a course
|
||||
| fullname | shortname |
|
||||
| Course 001 | C001 |
|
||||
And I log in as "admin"
|
||||
And I follow "Courses"
|
||||
And I am on course index
|
||||
And I follow "Course 001"
|
||||
|
||||
Scenario: User can be enrolled without javascript
|
||||
|
||||
@@ -20,7 +20,7 @@ Feature: Manage enrollments from participants page
|
||||
| teacher1 | C1 | editingteacher |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "Participants" node in "My courses > C1"
|
||||
And I navigate to course participants
|
||||
|
||||
Scenario: Check the participants link when "All partipants" selected
|
||||
Given I select "All participants" from the "roleid" singleselect
|
||||
|
||||
@@ -15,7 +15,7 @@ Feature: Course files
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
Then I should see "Legacy course files"
|
||||
Then "Legacy course files" "link" should exist in current page administration
|
||||
And I navigate to "Legacy course files" node in "Course administration"
|
||||
And I press "Edit legacy course files"
|
||||
And "Add..." "link" should be visible
|
||||
@@ -32,7 +32,7 @@ Feature: Course files
|
||||
When I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
Then I should see "Legacy course files"
|
||||
Then "Legacy course files" "link" should exist in current page administration
|
||||
And I navigate to "Legacy course files" node in "Course administration"
|
||||
And I press "Edit legacy course files"
|
||||
And "Add..." "link" should not be visible
|
||||
|
||||
@@ -22,14 +22,14 @@ Feature: I need to export grades as text
|
||||
| assign | C1 | a2 | Test assignment name 2 | Submit your online text | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name"
|
||||
And I press "Save changes"
|
||||
|
||||
@javascript
|
||||
Scenario: Export grades as text
|
||||
When I go to "Export > Plain text file" in the course gradebook
|
||||
When I navigate to "Export > Plain text file" in the course gradebook
|
||||
And I expand all fieldsets
|
||||
And I click on "Course total" "checkbox"
|
||||
And I set the field "Grade export decimal points" to "1"
|
||||
@@ -41,7 +41,7 @@ Feature: I need to export grades as text
|
||||
|
||||
@javascript
|
||||
Scenario: Export grades as text using real
|
||||
When I go to "Export > Plain text file" in the course gradebook
|
||||
When I navigate to "Export > Plain text file" in the course gradebook
|
||||
And I expand all fieldsets
|
||||
And I set the following fields to these values:
|
||||
| Real | 1 |
|
||||
@@ -52,7 +52,7 @@ Feature: I need to export grades as text
|
||||
|
||||
@javascript
|
||||
Scenario: Export grades as text using percentages and letters
|
||||
When I go to "Export > Plain text file" in the course gradebook
|
||||
When I navigate to "Export > Plain text file" in the course gradebook
|
||||
And I set the following fields to these values:
|
||||
| Percentage | 1 |
|
||||
| Letter | 1 |
|
||||
@@ -65,7 +65,7 @@ Feature: I need to export grades as text
|
||||
|
||||
@javascript
|
||||
Scenario: Export grades as text using real, percentages and letters
|
||||
When I go to "Export > Plain text file" in the course gradebook
|
||||
When I navigate to "Export > Plain text file" in the course gradebook
|
||||
And I set the following fields to these values:
|
||||
| Real | 1 |
|
||||
| Percentage | 1 |
|
||||
|
||||
@@ -21,14 +21,14 @@ Feature: I need to export grades as xml
|
||||
| assign | C1 | a1 | Test assignment name | Submit something! |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name"
|
||||
And I press "Save changes"
|
||||
|
||||
@javascript
|
||||
Scenario: Export grades as text
|
||||
When I go to "Export > XML file" in the course gradebook
|
||||
When I navigate to "Export > XML file" in the course gradebook
|
||||
And I expand all fieldsets
|
||||
And I set the field "Grade export decimal points" to "1"
|
||||
And I press "Download"
|
||||
|
||||
@@ -87,7 +87,7 @@ Feature: Marking guides can be created and edited
|
||||
And I press "Ok"
|
||||
And I follow "Edit settings"
|
||||
And I follow "Test assignment 1 name"
|
||||
And I click on "View all submissions" "link" in the "Administration" "block"
|
||||
And I navigate to "View all submissions" in current page administration
|
||||
# Checking that the user grade is correct.
|
||||
Then I should see "80" in the "Student 1" "table_row"
|
||||
And I log out
|
||||
|
||||
@@ -40,6 +40,7 @@ Feature: Reuse my rubrics in other activities
|
||||
And I should see "Criterion 1"
|
||||
And I should see "Criterion 2"
|
||||
And I should see "Criterion 3"
|
||||
And I follow "Course 1"
|
||||
And I go to "Test assignment 1 name" advanced grading definition page
|
||||
And I should see "Criterion 1"
|
||||
And I should see "Criterion 2"
|
||||
|
||||
@@ -49,13 +49,8 @@ class behat_grading extends behat_base {
|
||||
|
||||
$this->execute('behat_general::click_link', $this->escape($activityname));
|
||||
|
||||
$this->execute('behat_general::i_click_on_in_the',
|
||||
array(
|
||||
get_string('gradingmanagement', 'grading'),
|
||||
'link',
|
||||
'Administration',
|
||||
'block'
|
||||
));
|
||||
$this->execute('behat_navigation::i_navigate_to_in_current_page_administration',
|
||||
get_string('gradingmanagement', 'grading'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -92,13 +87,8 @@ class behat_grading extends behat_base {
|
||||
|
||||
$this->execute('behat_general::click_link', $this->escape($activityname));
|
||||
|
||||
$this->execute('behat_general::i_click_on_in_the',
|
||||
array(
|
||||
get_string('viewgrading', 'mod_assign'),
|
||||
'link',
|
||||
'Administration',
|
||||
'block'
|
||||
));
|
||||
$this->execute('behat_navigation::i_navigate_to_in_current_page_administration',
|
||||
get_string('viewgrading', 'mod_assign'));
|
||||
|
||||
$this->execute('behat_general::i_click_on_in_the',
|
||||
array(
|
||||
@@ -169,13 +159,8 @@ class behat_grading extends behat_base {
|
||||
$this->execute('behat_forms::press_button', 'Ok');
|
||||
$this->execute('behat_general::i_click_on', array($this->escape(get_string('editsettings')), 'link'));
|
||||
$this->execute('behat_forms::press_button', get_string('cancel'));
|
||||
$this->execute('behat_general::i_click_on_in_the',
|
||||
array(
|
||||
get_string('viewgrading', 'mod_assign'),
|
||||
'link',
|
||||
'Administration',
|
||||
'block'
|
||||
));
|
||||
$this->execute('behat_navigation::i_navigate_to_in_current_page_administration',
|
||||
get_string('viewgrading', 'mod_assign'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -55,7 +55,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
|
||||
| grade_report_showquickfeedback | 0 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I click on student "Student 2" for grade item "Item VU"
|
||||
Then I should see a grade field for "Student 2" and grade item "Item VU"
|
||||
And I should not see a feedback field for "Student 2" and grade item "Item VU"
|
||||
@@ -93,7 +93,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- | -16- |
|
||||
| Student 1 | 90.00 |
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- | -6- | -7- | -13- | -16- |
|
||||
| Student 1 | - | - | - | 90.00 |
|
||||
@@ -107,7 +107,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
|
||||
| grade_report_showquickfeedback | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I click on student "Student 2" for grade item "Item VU"
|
||||
Then I should see a grade field for "Student 2" and grade item "Item VU"
|
||||
And I should see a feedback field for "Student 2" and grade item "Item VU"
|
||||
@@ -127,8 +127,8 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
|
||||
And I set the field "ajaxfeedback" to "Student 2 SU feedback"
|
||||
And I press key "13" in the field "ajaxfeedback"
|
||||
# Reload grader report:
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > User report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And the following should exist in the "user-grades" table:
|
||||
| -1- | -7- | -13- | -16- |
|
||||
| Student 2 | 33.00 | Very good | 36.00 |
|
||||
@@ -144,7 +144,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
|
||||
| grade_report_showquickfeedback | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I click on student "Student 2" for grade item "Item VU"
|
||||
Then I should see a grade field for "Student 2" and grade item "Item VU"
|
||||
And I should see a feedback field for "Student 2" and grade item "Item VU"
|
||||
@@ -164,7 +164,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
|
||||
| grade_report_showquickfeedback | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
Then I should not see a grade field for "Student 2" and grade item "Item VL"
|
||||
And I should not see a feedback field for "Student 2" and grade item "Item VL"
|
||||
@@ -195,7 +195,7 @@ Feature: Using the AJAX grading feature of Grader report to update grades and fe
|
||||
| grade_report_showquickfeedback | 1 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I change window size to "large"
|
||||
And I set "=[[i1]] + [[i3]] + [[gsc]]" calculation for grade item "Calc Item" with idnumbers:
|
||||
|
||||
@@ -46,7 +46,7 @@ Feature: We can change what we are viewing on the grader report
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name 1"
|
||||
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment name 2"
|
||||
@@ -60,7 +60,7 @@ Feature: We can change what we are viewing on the grader report
|
||||
And I open "Test assignment name 2" actions menu
|
||||
And I click on "Hide" "link" in the "Test assignment name 2" activity
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I should see "Test assignment name 1"
|
||||
And I should see "Test assignment name 2"
|
||||
And I should see "Course total"
|
||||
@@ -96,7 +96,7 @@ Feature: We can change what we are viewing on the grader report
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I should see "Test assignment name 1"
|
||||
And I should see "Test assignment name 2"
|
||||
And I should see "Course total"
|
||||
|
||||
@@ -30,7 +30,7 @@ Feature: A teacher checks the grade history report in a course
|
||||
And I add a "Assignment" to section "1" and I fill the form with:
|
||||
| Assignment name | Rewarding assignment |
|
||||
| Description | After writing your behat test go grab a beer! |
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "50.00" to the user "Student 1" for the grade item "The greatest assignment ever"
|
||||
And I give the grade "60.00" to the user "Student 1" for the grade item "Rewarding assignment"
|
||||
@@ -40,7 +40,7 @@ Feature: A teacher checks the grade history report in a course
|
||||
And I log out
|
||||
And I log in as "teacher2"
|
||||
And I follow "Course 1"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I give the grade "70.00" to the user "Student 1" for the grade item "The greatest assignment ever"
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Rewarding assignment"
|
||||
|
||||
@@ -33,14 +33,14 @@ Feature: We can bulk insert grades for students in a course
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Test assignment one"
|
||||
And I click on "View all submissions" "link" in the "Administration" "block"
|
||||
And I go to "View all submissions" in current page administration
|
||||
And I click on "Grade" "link" in the "Student 1" "table_row"
|
||||
And I set the following fields to these values:
|
||||
| Grade out of 100 | 50 |
|
||||
And I press "Save changes"
|
||||
And I press "Ok"
|
||||
And I follow "Edit settings"
|
||||
And I follow "View gradebook"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I follow "Single view for Test assignment one"
|
||||
Then the field "Grade for james (Student) 1" matches value "50.00"
|
||||
And the field "Override for james (Student) 1" matches value "0"
|
||||
@@ -74,14 +74,14 @@ Feature: We can bulk insert grades for students in a course
|
||||
Given I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I follow "Test assignment two"
|
||||
And I click on "View all submissions" "link" in the "Administration" "block"
|
||||
And I go to "View all submissions" in current page administration
|
||||
And I click on "Grade" "link" in the "Student 1" "table_row"
|
||||
And I set the following fields to these values:
|
||||
| Grade out of 100 | 50 |
|
||||
And I press "Save changes"
|
||||
And I press "Ok"
|
||||
And I follow "Edit settings"
|
||||
And I follow "View gradebook"
|
||||
And I follow "Course 1"
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
# And I click on "input[title='Dock Navigation block']" "css_element"
|
||||
# And I click on "input[title='Dock Administration block']" "css_element"
|
||||
And I follow "Single view for Test assignment two"
|
||||
|
||||
@@ -52,11 +52,11 @@ Feature: We can use Single view
|
||||
| gradereport/singleview:view | Allow | teacher | Course | C1 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
Given I go to "View > Grader report" in the course gradebook
|
||||
Given I navigate to "View > Grader report" in the course gradebook
|
||||
|
||||
@javascript
|
||||
Scenario: I can update grades, add feedback and exclude grades.
|
||||
Given I go to "View > Single view" in the course gradebook
|
||||
Given I navigate to "View > Single view" in the course gradebook
|
||||
And I select "Student 4" from the "Select user..." singleselect
|
||||
And I set the field "Override for Test assignment one" to "1"
|
||||
When I set the following fields to these values:
|
||||
@@ -97,7 +97,7 @@ Feature: We can use Single view
|
||||
And I log out
|
||||
And I log in as "teacher2"
|
||||
And I follow "Course 1"
|
||||
Given I go to "View > Single view" in the course gradebook
|
||||
Given I navigate to "View > Single view" in the course gradebook
|
||||
And I click on "Student 4" "option"
|
||||
And the "Exclude for Test assignment one" "checkbox" should be disabled
|
||||
And the "Override for Test assignment one" "checkbox" should be enabled
|
||||
@@ -105,7 +105,7 @@ Feature: We can use Single view
|
||||
Scenario: Single view links work on grade report.
|
||||
Given I follow "Single view for Test assignment one"
|
||||
Then I should see "Test assignment one"
|
||||
Then I go to "View > Grader report" in the course gradebook
|
||||
Then I navigate to "View > Grader report" in the course gradebook
|
||||
And I follow "Single view for Student 1"
|
||||
Then I should see "Student 1"
|
||||
|
||||
|
||||
@@ -32,10 +32,10 @@ Feature: View the user report as the student will see it
|
||||
| assign | C1 | a6 | Test assignment six | Submit something! | 100 |
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "Setup > Gradebook setup" in the course gradebook
|
||||
And I navigate to "Setup > Gradebook setup" in the course gradebook
|
||||
And I hide the grade item "Test assignment six"
|
||||
And I hide the grade item "Sub category 2"
|
||||
And I go to "View > Grader report" in the course gradebook
|
||||
And I navigate to "View > Grader report" in the course gradebook
|
||||
And I turn editing mode on
|
||||
And I change window size to "large"
|
||||
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
|
||||
@@ -48,7 +48,7 @@ Feature: View the user report as the student will see it
|
||||
And I change window size to "medium"
|
||||
|
||||
Scenario: View the report as the teacher themselves
|
||||
When I go to "View > User report" in the course gradebook
|
||||
When I navigate to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And I select "Myself" from the "View report as" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
@@ -64,7 +64,7 @@ Feature: View the user report as the student will see it
|
||||
| Course total | - | 383.00 | 0–600 | 63.83 % | - |
|
||||
|
||||
Scenario: View the report as the student from both the teachers and students perspective
|
||||
When I go to "View > User report" in the course gradebook
|
||||
When I navigate to "View > User report" in the course gradebook
|
||||
And I select "Student 1" from the "Select all or one user" singleselect
|
||||
And I select "User" from the "View report as" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
@@ -83,7 +83,7 @@ Feature: View the user report as the student will see it
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I go to "User report" in the course gradebook
|
||||
And I navigate to "User report" in the course gradebook
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| Test assignment one | - | 80.00 | 0–100 | 80.00 % | - |
|
||||
@@ -99,10 +99,10 @@ Feature: View the user report as the student will see it
|
||||
| Test assignment six |
|
||||
|
||||
Scenario: View the report as the student from both the teachers and students perspective with totals excluding hidden
|
||||
Given I go to "Setup > Course grade settings" in the course gradebook
|
||||
Given I navigate to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field with xpath "//select[@name='report_user_showtotalsifcontainhidden']" to "Show totals excluding hidden items"
|
||||
And I press "Save changes"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I navigate to "View > User report" in the course gradebook
|
||||
When I select "Student 1" from the "Select all or one user" singleselect
|
||||
And I select "User" from the "View report as" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
@@ -121,7 +121,7 @@ Feature: View the user report as the student will see it
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I go to "User report" in the course gradebook
|
||||
And I navigate to "User report" in the course gradebook
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 26.67 % |
|
||||
@@ -137,10 +137,10 @@ Feature: View the user report as the student will see it
|
||||
| Test assignment six |
|
||||
|
||||
Scenario: View the report as the student from both the teachers and students perspective with totals including hidden
|
||||
Given I go to "Setup > Course grade settings" in the course gradebook
|
||||
Given I navigate to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field with xpath "//select[@name='report_user_showtotalsifcontainhidden']" to "Show totals including hidden items"
|
||||
And I press "Save changes"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I navigate to "View > User report" in the course gradebook
|
||||
When I select "Student 1" from the "Select all or one user" singleselect
|
||||
And I select "User" from the "View report as" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
@@ -159,7 +159,7 @@ Feature: View the user report as the student will see it
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I go to "User report" in the course gradebook
|
||||
And I navigate to "User report" in the course gradebook
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 13.33 % |
|
||||
@@ -183,10 +183,10 @@ Feature: View the user report as the student will see it
|
||||
And I log out
|
||||
And I log in as "teacher1"
|
||||
And I follow "Course 1"
|
||||
And I go to "Setup > Course grade settings" in the course gradebook
|
||||
And I navigate to "Setup > Course grade settings" in the course gradebook
|
||||
And I set the field with xpath "//select[@name='report_user_showtotalsifcontainhidden']" to "Show totals excluding hidden items"
|
||||
And I press "Save changes"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I navigate to "View > User report" in the course gradebook
|
||||
When I select "Student 1" from the "Select all or one user" singleselect
|
||||
And I select "User" from the "View report as" singleselect
|
||||
Then the following should exist in the "user-grade" table:
|
||||
@@ -203,7 +203,7 @@ Feature: View the user report as the student will see it
|
||||
And I log out
|
||||
And I log in as "student1"
|
||||
And I follow "Course 1"
|
||||
And I go to "User report" in the course gradebook
|
||||
And I navigate to "User report" in the course gradebook
|
||||
Then the following should exist in the "user-grade" table:
|
||||
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
|
||||
| Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 13.33 % |
|
||||
|
||||
@@ -12,6 +12,6 @@ Feature: We can use the user report
|
||||
Given I log in as "admin"
|
||||
And I am on site homepage
|
||||
And I follow "Course 1"
|
||||
And I go to "View > User report" in the course gradebook
|
||||
And I navigate to "View > User report" in the course gradebook
|
||||
And I select "All users (0)" from the "Select all or one user" singleselect
|
||||
Then I should see "No students enrolled in this course yet"
|
||||
|
||||
@@ -247,30 +247,17 @@ class behat_grade extends behat_base {
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigates to the course gradebook and selects a specified item from the grade navigation tabs.
|
||||
* Select the tab in the gradebook. We must be on one of the gradebook pages already.
|
||||
*
|
||||
* Examples:
|
||||
* - I go to "Setup > Gradebook setup" in the course gradebook
|
||||
* - I go to "Scales" in the course gradebook
|
||||
* - I go to "Letters > View" in the course gradebook
|
||||
* - I go to "View > User report" in the course gradebook // for teachers
|
||||
* - I go to "User report" in the course gradebook // for students
|
||||
*
|
||||
* @Given /^I go to "(?P<gradepath_string>(?:[^"]|\\")*)" in the course gradebook$/
|
||||
* @param string $gradepath
|
||||
* @param string $gradepath examples: "View > User report", "Letters > View", "Scales"
|
||||
*/
|
||||
public function i_go_to_in_the_course_gradebook($gradepath) {
|
||||
protected function select_in_gradebook_tabs($gradepath) {
|
||||
$gradepath = preg_split('/\s*>\s*/', trim($gradepath));
|
||||
if (count($gradepath) > 2) {
|
||||
throw new DriverException('Grade path is too long (must have no more than two items separated with ">")');
|
||||
throw new coding_exception('Grade path is too long (must have no more than two items separated with ">")');
|
||||
}
|
||||
|
||||
// If we are not on one of the gradebook pages already, follow "Grades" link in the navigation block.
|
||||
$xpath = '//div[contains(@class,\'grade-navigation\')]';
|
||||
if (!$this->getSession()->getPage()->findAll('xpath', $xpath)) {
|
||||
$this->execute("behat_general::i_click_on_in_the", array(get_string('grades'), 'link',
|
||||
get_string('pluginname', 'block_navigation'), 'block'));
|
||||
}
|
||||
|
||||
// If the first row of the grade-navigation tabs does not have $gradepath[0] as active tab, click on it.
|
||||
$link = '\'' . $this->escape($gradepath[0]) . '\'';
|
||||
@@ -290,4 +277,40 @@ class behat_grade extends behat_base {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigates to the course gradebook and selects a specified item from the grade navigation tabs.
|
||||
*
|
||||
* Examples:
|
||||
* - I navigate to "Setup > Gradebook setup" in the course gradebook
|
||||
* - I navigate to "Scales" in the course gradebook
|
||||
* - I navigate to "Letters > View" in the course gradebook
|
||||
* - I navigate to "View > User report" in the course gradebook // for teachers
|
||||
* - I navigate to "User report" in the course gradebook // for students
|
||||
*
|
||||
* @Given /^I navigate to "(?P<gradepath_string>(?:[^"]|\\")*)" in the course gradebook$/
|
||||
* @param string $gradepath
|
||||
*/
|
||||
public function i_navigate_to_in_the_course_gradebook($gradepath) {
|
||||
// If we are not on one of the gradebook pages already, follow "Grades" link in the navigation block.
|
||||
$xpath = '//div[contains(@class,\'grade-navigation\')]';
|
||||
if (!$this->getSession()->getPage()->findAll('xpath', $xpath)) {
|
||||
$this->execute("behat_general::i_click_on_in_the", array(get_string('grades'), 'link',
|
||||
get_string('pluginname', 'block_navigation'), 'block'));
|
||||
}
|
||||
|
||||
$this->select_in_gradebook_tabs($gradepath);
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigates to the course gradebook and selects a specified item from the grade navigation tabs.
|
||||
*
|
||||
* @todo MDL-57282 deprecate in Moodle 3.3
|
||||
*
|
||||
* @Given /^I go to "(?P<gradepath_string>(?:[^"]|\\")*)" in the course gradebook$/
|
||||
* @param string $gradepath
|
||||
*/
|
||||
public function i_go_to_in_the_course_gradebook($gradepath) {
|
||||
$this->execute('behat_grade::i_navigate_to_in_the_course_gradebook', $gradepath);
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user