Skip to content

Commit

Permalink
Merge branch 'MDL-53115-master' of git://github.com/andrewnicols/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Apr 6, 2016
2 parents 9e6c63a + 82bb931 commit e44b55f
Show file tree
Hide file tree
Showing 29 changed files with 45 additions and 116 deletions.
5 changes: 0 additions & 5 deletions backup/util/ui/tests/behat/backup_courses.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Feature: Backup Moodle courses
| data | C2 | data1 | Test data | Database description | 2 |
And I log in as "admin"

@javascript
Scenario: Backup a course providing options
When I backup "Course 1" course using this options:
| Confirmation | Filename | test_backup.mbz |
Expand All @@ -24,7 +23,6 @@ Feature: Backup Moodle courses
And I should see "URL of backup"
And I should see "Anonymize user information"

@javascript
Scenario: Backup a course with default options
When I backup "Course 1" course using this options:
| Initial | Include calendar events | 0 |
Expand All @@ -40,13 +38,11 @@ Feature: Backup Moodle courses
And "Include course logs" "checkbox" should exist
And I press "Next"

@javascript
Scenario: Backup a course without blocks
When I backup "Course 1" course using this options:
| 1 | setting_root_blocks | 0 |
Then I should see "Course backup area"

@javascript
Scenario: Backup selecting just one section
When I backup "Course 2" course using this options:
| Schema | Test data | 0 |
Expand All @@ -61,7 +57,6 @@ Feature: Backup Moodle courses
And I should see "Test assign"
And I should not see "Test data"

@javascript
Scenario: Backup a course using the one click backup button
When I perform a quick backup of course "Course 2"
Then I should see "Restore course"
Expand Down
3 changes: 0 additions & 3 deletions backup/util/ui/tests/behat/duplicate_activities.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Feature: Duplicate activities
As a teacher
I need to duplicate activities inside the same course

@javascript
Scenario: Duplicate an activity
Given the following "courses" exist:
| fullname | shortname | category |
Expand All @@ -23,12 +22,10 @@ Feature: Duplicate activities
| Description | Test database description |
And I duplicate "Test database name" activity
And I wait until section "1" is available
And I open "Test database name" actions menu
And I click on "Edit settings" "link" in the "Test database name" activity
And I set the following fields to these values:
| Name | Original database name |
And I press "Save and return to course"
And I open "Test database name" actions menu
And I click on "Edit settings" "link" in the "Test database name" activity
And I set the following fields to these values:
| Name | Duplicated database name |
Expand Down
12 changes: 5 additions & 7 deletions backup/util/ui/tests/behat/import_groups.feature
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,21 @@ Feature: Option to include groups and groupings when importing a course to anoth
And I turn editing mode on

Scenario: Include groups and groupings when importing a course to another course
When I import "Course 1" course into "Course 2" course using this options:
Given I import "Course 1" course into "Course 2" course using this options:
| Initial | Include groups and groupings | 1 |
And I expand "Users" node
And I follow "Groups"
When I navigate to "Groups" node in "Course administration > Users"
Then I should see "Group 1"
And I should see "Group 2"
And I follow "Groupings"
And I should see "Grouping 1"
And I should see "Grouping 2"

Scenario: Do not include groups and groupings when importing a course to another course
When I import "Course 1" course into "Course 2" course using this options:
Given I import "Course 1" course into "Course 2" course using this options:
| Initial | Include groups and groupings | 0 |
And I expand "Users" node
And I follow "Groups"
When I navigate to "Groups" node in "Course administration > Users"
Then I should not see "Group 1"
And I should not see "Group 2"
And I follow "Groupings"
And I should not see "Grouping 1"
And I should not see "Grouping 2"
And I should not see "Grouping 2"
1 change: 0 additions & 1 deletion mod/choice/tests/behat/add_choice.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Feature: Add choice activity
As a teacher
I need to add choice activities to courses

@javascript
Scenario: Add a choice activity and complete the activity as a student
Given the following "users" exist:
| username | firstname | lastname | email |
Expand Down
1 change: 0 additions & 1 deletion mod/choice/tests/behat/allow_preview.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Feature: Allow choice preview
And I follow "Course 1"
And I turn editing mode on

@javascript
Scenario: Enable the choice preview option and view the activity as a student before the opening time
Given I add a "Choice" to section "1" and I fill the form with:
| Choice name | Choice name |
Expand Down
3 changes: 0 additions & 3 deletions mod/choice/tests/behat/block_editing.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Feature: Add choice activity
I need to add remove block from the choice page

# This tests that the hacky block editing is not borked by legacy forms in choice activity.
@javascript
Scenario: Add a choice activity as admin and check blog menu block should contain link.
Given the following "courses" exist:
| fullname | shortname | category |
Expand All @@ -31,7 +30,6 @@ Feature: Add choice activity
And I should not see "View all entries about this Choice"
And I should see "Choice Description 1"

@javascript
Scenario: Add a choice activity as teacher and check blog menu block contain choice link.
Given the following "users" exist:
| username | firstname | lastname | email |
Expand Down Expand Up @@ -64,7 +62,6 @@ Feature: Add choice activity
And I should not see "View all entries about this Choice"
And I should see "Choice Description 1"

@javascript
Scenario: Add a choice activity as teacher (with dual role) and check blog menu block contain choice link.
Given the following "users" exist:
| username | firstname | lastname | email |
Expand Down
1 change: 0 additions & 1 deletion mod/choice/tests/behat/change_response.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Feature: Teacher can choose whether to allow students to change their choice res
As a teacher
I need to enable the option to change the choice

@javascript
Scenario: Add a choice activity and complete the activity as a student
Given the following "users" exist:
| username | firstname | lastname | email |
Expand Down
2 changes: 0 additions & 2 deletions mod/choice/tests/behat/include_inactive.feature
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Feature: Include responses from inactive users
And I follow "Course 1"
And I turn editing mode on

@javascript
Scenario: Enable the choice include inactive option and check that responses from inactive students are visible
Given I add a "Choice" to section "1" and I fill the form with:
| Choice name | Choice name |
Expand Down Expand Up @@ -83,7 +82,6 @@ Feature: Include responses from inactive users
And I should see "Student 3"
And I log out

@javascript
Scenario: Disable the choice include inactive option and check that responses from inactive students are not visible
Given I add a "Choice" to section "1" and I fill the form with:
| Choice name | Choice name |
Expand Down
1 change: 0 additions & 1 deletion mod/choice/tests/behat/limit_responses.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Feature: Limit choice responses
As a teacher
I need to limit the choice responses

@javascript
Scenario: Limit the number of responses allowed for a choice activity and verify the result as students
Given the following "users" exist:
| username | firstname | lastname | email |
Expand Down
2 changes: 0 additions & 2 deletions mod/choice/tests/behat/multiple_options.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Feature: Multiple option choice response
As a teacher
I need to add choice activities to courses with multiple options enabled

@javascript
Scenario: Complete a choice with multiple options enabled
Given the following "users" exist:
| username | firstname | lastname | email |
Expand Down Expand Up @@ -33,7 +32,6 @@ Feature: Multiple option choice response
Then I should see "Your selection: Option 1; Option 2"
And I should see "Your choice has been saved"

@javascript
Scenario: Complete a choice with multiple options enabled and limited responses set
Given the following "users" exist:
| username | firstname | lastname | email |
Expand Down
8 changes: 2 additions & 6 deletions mod/choice/tests/behat/my_home.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@mod @mod_choice @javascript
@mod @mod_choice
Feature: Test the display of the choice module on my home
In order to know my status in a choice activity
As a user
Expand All @@ -21,10 +21,10 @@ Feature: Test the display of the choice module on my home
And I turn editing mode on
And I add a "Choice" to section "1"
And I expand all fieldsets
And I click on "id_timerestrict" "checkbox"
And I set the following fields to these values:
| Choice name | Test choice name |
| Description | Test choice description |
| id_timerestrict| 1 |
| timeclose[day] | 1 |
| timeclose[month] | January |
| timeclose[year] | 2030 |
Expand All @@ -36,12 +36,10 @@ Feature: Test the display of the choice module on my home
And I press "Save and return to course"
And I log out

@javascript
Scenario: View my home as a student before answering the choice
Given I log in as "student1"
When I click on "Dashboard" "link" in the "Navigation" "block"
Then I should see "You have Choices that need attention"
And I click on ".collapsibleregioncaption" "css_element"
And I should see "Not answered yet"
And I log out

Expand All @@ -56,7 +54,6 @@ Feature: Test the display of the choice module on my home
Then I should not see "You have Choices that need attention"
And I log out

@javascript
Scenario: View my home as a teacher
Given I log in as "student1"
And I follow "Course 1"
Expand All @@ -68,6 +65,5 @@ Feature: Test the display of the choice module on my home
When I log in as "teacher1"
And I click on "Dashboard" "link" in the "Navigation" "block"
Then I should see "You have Choices that need attention"
And I click on ".collapsibleregioncaption" "css_element"
And I should see "View 1 responses"
And I log out
4 changes: 0 additions & 4 deletions mod/choice/tests/behat/publish_results.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ Feature: A teacher can choose one of 4 options for publishing choice results
And I follow "Course 1"
And I turn editing mode on

@javascript
Scenario: Do not publish results to students
Given I add a "Choice" to section "1" and I fill the form with:
| Choice name | Choice 1 |
Expand All @@ -36,7 +35,6 @@ Feature: A teacher can choose one of 4 options for publishing choice results
And I should not see "Responses"
And I should not see "Graph display"

@javascript
Scenario: Show results to students after they answer
Given I add a "Choice" to section "1" and I fill the form with:
| Choice name | Choice 1 |
Expand All @@ -56,7 +54,6 @@ Feature: A teacher can choose one of 4 options for publishing choice results
And I should see "Responses"
And I should see "Graph display"

@javascript
Scenario: Show results to students only after the choice is closed
Given I add a "Choice" to section "1" and I fill the form with:
| Choice name | Choice 1 |
Expand Down Expand Up @@ -88,7 +85,6 @@ Feature: A teacher can choose one of 4 options for publishing choice results
And I should see "Responses"
And I should see "Graph display"

@javascript
Scenario: Always show results to students
Given I add a "Choice" to section "1" and I fill the form with:
| Choice name | Choice 1 |
Expand Down
18 changes: 7 additions & 11 deletions mod/lesson/tests/behat/lesson_complete_report.feature
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I press "Save and return to course"
And I follow "Test lesson name"

@javascript
Scenario: View student progress for lesson that was never attempted
Given I follow "Add a content page"
And I set the following fields to these values:
Expand All @@ -35,7 +34,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page"
And I set the field "qtype" to "Question"
And I select "Question" from the "qtype" singleselect
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
And I set the following fields to these values:
Expand All @@ -54,7 +53,6 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I follow "Complete report"
Then I should see "No attempts have been made on this lesson"

@javascript
Scenario: View student progress for an incomplete lesson containing both content and question pages
Given I follow "Add a content page"
And I set the following fields to these values:
Expand All @@ -63,7 +61,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page"
And I set the field "qtype" to "Question"
And I select "Question" from the "qtype" singleselect
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
And I set the following fields to these values:
Expand All @@ -76,7 +74,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I set the field "qtype" to "Add a content page"
And I select "Add a content page" from the "qtype" singleselect
And I set the following fields to these values:
| Page title | Second page name |
| Page contents | Second page contents |
Expand All @@ -101,7 +99,6 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I should see "1" in the ".cell.c1" "css_element"
And I should see "0" in the ".cell.c2" "css_element"

@javascript
Scenario: View student progress for a lesson containing both content and question pages
Given I follow "Add a content page"
And I set the following fields to these values:
Expand All @@ -110,7 +107,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page"
And I set the field "qtype" to "Question"
And I select "Question" from the "qtype" singleselect
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
And I set the following fields to these values:
Expand All @@ -123,7 +120,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I set the field "qtype" to "Question"
And I select "Question" from the "qtype" singleselect
And I set the field "Select a question type" to "True/false"
And I press "Add a question page"
And I set the following fields to these values:
Expand All @@ -136,7 +133,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page"
And I set the field "qtype" to "Add a content page"
And I select "Add a content page" from the "qtype" singleselect
And I set the following fields to these values:
| Page title | Second page name |
| Page contents | Second page contents |
Expand Down Expand Up @@ -175,7 +172,6 @@ Feature: Teachers can review student progress on all lessons in a course by view
And I should see "2" in the ".cell.c2" "css_element"
And I should see "1" in the ".cell.c3" "css_element"

@javascript
Scenario: View student attempts in a lesson containing only content pages
Given I follow "Add a content page"
And I set the following fields to these values:
Expand All @@ -184,7 +180,7 @@ Feature: Teachers can review student progress on all lessons in a course by view
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page"
And I set the field "qtype" to "Add a content page"
And I select "Add a content page" from the "qtype" singleselect
And I set the following fields to these values:
| Page title | Second page name |
| Page contents | Second page contents |
Expand Down
6 changes: 2 additions & 4 deletions mod/lesson/tests/behat/lesson_delete_answers.feature
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ branch table contents
| id_answer_editor_1 | Previous page |
| id_jumpto_1 | Previous page |
And I press "Save page"
And I set the field "qtype" to "Question"
And I select "Question" from the "qtype" singleselect
And I set the field "Select a question type" to "Numerical"
And I press "Add a question page"
And I set the following fields to these values:
Expand All @@ -50,7 +50,6 @@ branch table contents
And I press "Save page"
And I follow "Expanded"

@javascript
Scenario: Edit lesson content page
Given I click on "//th[normalize-space(.)='First page name']/descendant::a[2]" "xpath_element"
When I set the following fields to these values:
Expand All @@ -74,7 +73,6 @@ branch table contents
And I should see "Congratulations - end of lesson reached"
And I should see "Your score is 1 (out of 1)."

@javascript
Scenario: Edit lesson question page
Given I click on "//th[normalize-space(.)='Hardest question ever']/descendant::a[2]" "xpath_element"
When I set the following fields to these values:
Expand All @@ -93,4 +91,4 @@ branch table contents
And I press "Submit"
And I should not see "Incorrect answer"
And I should see "Congratulations - end of lesson reached"
And I should see "Your score is 0 (out of 1)."
And I should see "Your score is 0 (out of 1)."
1 change: 0 additions & 1 deletion mod/lesson/tests/behat/lesson_edit_cluster.feature
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ Feature: In a lesson activity, teacher can edit a cluster page
| id_jumpto_0 | Next page |
And I press "Save page"

@javascript
Scenario: Edit lesson cluster page
Given I click on "//th[normalize-space(.)='Cluster']/descendant::a[2]" "xpath_element"
When I set the following fields to these values:
Expand Down
Loading

0 comments on commit e44b55f

Please sign in to comment.