Commit e5287f9b authored by Marina Glancy's avatar Marina Glancy
Browse files

MDL-56614 behat: navigate without navigation and admin blocks

parent 50bd633d
......@@ -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:
......
......@@ -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,8 +320,7 @@ 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
Then I should see "Grade category 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
......
......@@ -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 s@example.com 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"
......
......@@ -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
......
......@@ -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"
......
......@@ -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"
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment