MDL-40566 behat: Update features using the new options

This commit is contained in:
David Monllao
2013-09-03 11:15:12 +08:00
parent 9e14d32b12
commit fe0f9adbe3
4 changed files with 27 additions and 26 deletions
@@ -35,7 +35,7 @@ Feature: Page contents assertions
| Course 1 | C1 | 0 |
And I log in as "admin"
And I follow "Course 1"
When I click on "Move this to the dock" "button" in the ".block_settings" "css_element"
When I click on "Move this to the dock" "button" in the "Administration" "block"
Then I should not see "Question bank"
And I click on "//div[@id='dock']/descendant::h2[normalize-space(.)='Administration']" "xpath_element"
@@ -45,5 +45,5 @@ Feature: Page contents assertions
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
When I click on "Move this to the dock" "button" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' block_settings ')]" "xpath_element"
When I click on "Move this to the dock" "button" in the "Administration" "block"
Then I should not see "Turn editing on"
@@ -13,8 +13,9 @@ Feature: Backup Moodle courses
@javascript
Scenario: Backup a course providing options
When I backup "Course 1" course using this options:
| Filename | test_backup.mbz |
Then I should see "Restore"
And I click on "Restore" "link" in the ".backup-files-table" "css_element"
And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
And I should see "URL of backup"
And I should see "Anonymize user information"
@@ -27,11 +28,11 @@ Feature: Backup Moodle courses
| setting_section_section_5_userinfo | 0 |
| setting_section_section_5_included | 0 |
Then I should see "Restore"
And I click on "Restore" "link" in the ".backup-files-table" "css_element"
And I click on "Restore" "link" in the "test_backup.mbz" "table_row"
And I should not see "Section 3"
And I press "Continue"
And I click on "Continue" "button" in the ".bcs-current-course" "css_element"
And "//div[contains(concat(' ', normalize-space(@class), ' '), ' fitem ')][contains(., 'Include calendar events')]/descendant::img" "xpath_element" should exists
And I check "Include course logs"
And I press "Cancel"
And I click on "Cancel" "button" in the ".confirmation-dialogue" "css_element"
And I click on "Cancel" "button" in the "Cancel backup" "dialogue"
@@ -38,14 +38,14 @@ Feature: View my courses in navigation block
And I log out
And I log in as "student1"
When I follow "My home"
Then I should not see "cat1" in the "div.block_navigation .type_system" "css_element"
And I should not see "cat2" in the "div.block_navigation .type_system" "css_element"
And I should see "c1" in the "div.block_navigation .type_system" "css_element"
And I should see "c31" in the "div.block_navigation .type_system" "css_element"
And I should see "c331" in the "div.block_navigation .type_system" "css_element"
And I should not see "c2" in the "div.block_navigation .type_system" "css_element"
And I should not see "c32" in the "div.block_navigation .type_system" "css_element"
And I should not see "c332" in the "div.block_navigation .type_system" "css_element"
Then I should not see "cat1" in the "Navigation" "block"
And I should not see "cat2" in the "Navigation" "block"
And I should see "c1" in the "Navigation" "block"
And I should see "c31" in the "Navigation" "block"
And I should see "c331" in the "Navigation" "block"
And I should not see "c2" in the "Navigation" "block"
And I should not see "c32" in the "Navigation" "block"
And I should not see "c332" in the "Navigation" "block"
@javascript
Scenario: The nested list of enrolled courses is shown
@@ -54,18 +54,18 @@ Feature: View my courses in navigation block
And I log out
And I log in as "student1"
When I follow "My home"
Then I should see "cat1" in the "div.block_navigation .type_system" "css_element"
And I should see "cat3" in the "div.block_navigation .type_system" "css_element"
And I should not see "cat2" in the "div.block_navigation .type_system" "css_element"
Then I should see "cat1" in the "Navigation" "block"
And I should see "cat3" in the "Navigation" "block"
And I should not see "cat2" in the "Navigation" "block"
And I expand "cat3" node
And I wait "2" seconds
And I should see "cat31" in the "div.block_navigation .type_system" "css_element"
And I should see "cat33" in the "div.block_navigation .type_system" "css_element"
And I should not see "cat32" in the "div.block_navigation .type_system" "css_element"
And I should see "cat31" in the "Navigation" "block"
And I should see "cat33" in the "Navigation" "block"
And I should not see "cat32" in the "Navigation" "block"
And I expand "cat31" node
And I wait "2" seconds
And I should see "c31" in the "div.block_navigation .type_system" "css_element"
And I should see "c31" in the "Navigation" "block"
And I expand "cat33" node
And I wait "2" seconds
And I should see "c331" in the "div.block_navigation .type_system" "css_element"
And I should not see "c332" in the "div.block_navigation .type_system" "css_element"
And I should see "c331" in the "Navigation" "block"
And I should not see "c332" in the "Navigation" "block"
+4 -4
View File
@@ -74,8 +74,8 @@ Feature: Course activity controls works as expected
And section "1" should be visible
And I add the "Section links" block
And "#section-2" "css_element" <should_see_other_sections> exists
And I should see "1 2 3 4 5" in the ".block_section_links" "css_element"
And I click on "2" "link" in the ".block_section_links" "css_element"
And I should see "1 2 3 4 5" in the "Section links" "block"
And I click on "2" "link" in the "Section links" "block"
And I <should_see_other_sections_following_block_sections_links> see "Test forum name 2"
Examples:
@@ -148,8 +148,8 @@ Feature: Course activity controls works as expected
And section "1" should be visible
And I add the "Section links" block
And "#section-2" "css_element" <should_see_other_sections> exists
And I should see "1 2 3 4 5" in the ".block_section_links" "css_element"
And I click on "2" "link" in the ".block_section_links" "css_element"
And I should see "1 2 3 4 5" in the "Section links" "block"
And I click on "2" "link" in the "Section links" "block"
And I <should_see_other_sections_following_block_sections_links> see "Test forum name 2"
Examples: