MDL-42625 behat: Editing .feature files

This commit is contained in:
David Monllao
2013-12-06 12:13:39 +08:00
parent a42791cb90
commit 333db2e9b9
11 changed files with 12 additions and 35 deletions
-1
View File
@@ -42,5 +42,4 @@ Feature: Upload users
And I expand "Users" node
And I follow "Groups"
And I select "Section 1 (1)" from "groups"
And I wait "4" seconds
And the "members" select box should contain "Tom Jones"
@@ -230,8 +230,6 @@ Feature: Set up contextual data for tests
Then the "groups" select box should contain "Group 1 (1)"
And the "groups" select box should contain "Group 2 (1)"
And I select "Group 1 (1)" from "groups"
And I wait "5" seconds
And the "members" select box should contain "Student 1"
And I select "Group 2 (1)" from "groups"
And I wait "5" seconds
And the "members" select box should contain "Student 2"
@@ -38,7 +38,7 @@ Feature: Backup Moodle courses
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 "Include course logs" "checkbox" should exists
And I press "Next"
@javascript
@@ -58,14 +58,11 @@ Feature: View my courses in 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 "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 "Navigation" "block"
And I expand "cat33" node
And I wait "2" seconds
And I should see "c331" in the "Navigation" "block"
And I should not see "c332" in the "Navigation" "block"
+2 -5
View File
@@ -33,11 +33,9 @@ Feature: Comment on a blog entry
And I follow "Comments (0)"
When I fill in "content" with "$My own >nasty< \"string\"!"
And I follow "Save comment"
And I wait "4" seconds
Then I should see "$My own >nasty< \"string\"!"
And I fill in "content" with "Another $Nasty <string?>"
And I follow "Save comment"
And I wait "4" seconds
And I should see "Comments (2)" in the ".comment-link" "css_element"
@javascript
@@ -53,9 +51,9 @@ Feature: Comment on a blog entry
And I follow "Comments (0)"
And I fill in "content" with "$My own >nasty< \"string\"!"
And I follow "Save comment"
And I wait "4" seconds
When I click on ".comment-delete a" "css_element"
And I wait "4" seconds
# Waiting for the animation to finish.
And I wait "2" seconds
Then I should not see "$My own >nasty< \"string\"!"
And I follow "Blog post from user 1"
And I click on ".comment-link" "css_element"
@@ -73,5 +71,4 @@ Feature: Comment on a blog entry
When I follow "Comments (0)"
And I fill in "content" with "$My own >nasty< \"string\"!"
And I follow "Save comment"
And I wait "4" seconds
Then I should see "$My own >nasty< \"string\"!"
@@ -37,7 +37,6 @@ Feature: Allow students to manually mark an activity as complete
And I log in as "student1"
And I follow "Course 1"
And I press "Mark as complete: Test forum name"
And I wait "3" seconds
And I log out
And I log in as "teacher1"
And I follow "Course 1"
@@ -29,14 +29,12 @@ Feature: Toggle activities groups mode from the course page
Then "No groups (Click to change)" "link" should exists
And "//a/child::img[contains(@src, 'groupn')]" "xpath_element" should exists
And I click on "No groups (Click to change)" "link" in the "Test forum name" activity
And I wait "3" seconds
And "Separate groups (Click to change)" "link" should exists
And "//a/child::img[contains(@src, 'groups')]" "xpath_element" should exists
And I reload the page
And "Separate groups (Click to change)" "link" should exists
And "//a/child::img[contains(@src, 'groups')]" "xpath_element" should exists
And I click on "Separate groups (Click to change)" "link" in the "Test forum name" activity
And I wait "3" seconds
And "Visible groups (Click to change)" "link" should exists
And "//a/child::img[contains(@src, 'groupv')]" "xpath_element" should exists
And I reload the page
-2
View File
@@ -40,12 +40,10 @@ Feature: Organize students into groups
And I add "student2" user to "Group 2" group
And I add "student3" user to "Group 2" group
Then I select "Group 1 (2)" from "groups"
And I wait "5" seconds
And the "members" select box should contain "Student 0"
And the "members" select box should contain "Student 1"
And the "members" select box should not contain "Student 2"
And I select "Group 2 (2)" from "groups"
And I wait "5" seconds
And the "members" select box should contain "Student 2"
And the "members" select box should contain "Student 3"
And the "members" select box should not contain "Student 0"
-1
View File
@@ -25,5 +25,4 @@ Feature: Add forum activities and discussions
When I add a new discussion to "Test forum name" forum with:
| Subject | Forum post 1 |
| Message | This is the body |
And I wait "6" seconds
Then I should see "Test forum name"
@@ -41,7 +41,6 @@ Feature: Teachers can edit or delete any forum post
And I follow "Teacher post subject"
And I click on "Delete" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Student post subject')]" "xpath_element"
And I press "Continue"
And I wait "4" seconds
Then I should not see "Student post subject"
And I should not see "Student post message"
@@ -56,7 +55,7 @@ Feature: Teachers can edit or delete any forum post
And I fill the moodle form with:
| Subject | Edited student subject |
And I press "Save changes"
And I wait "4" seconds
And I wait to be redirected
Then I should see "Edited student subject"
And I should see "Edited by Teacher 1 - original submission"
+8 -15
View File
@@ -30,7 +30,6 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject |
| Message | Test post message |
And I wait "6" seconds
And I log out
When I log in as "student1"
And I follow "Course 1"
@@ -48,19 +47,18 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject |
| Message | Test post message |
And I wait "6" seconds
And I log out
When I log in as "student1"
And I follow "Course 1"
Then I should see "1 unread post"
And I follow "Test forum name"
And I follow "Don't track unread posts"
And I wait "4" seconds
And I wait to be redirected
And I follow "Course 1"
And I should not see "1 unread post"
And I follow "Test forum name"
And I follow "Track unread posts"
And I wait "4" seconds
And I wait to be redirected
And I follow "1"
And I follow "Course 1"
And I should not see "1 unread post"
@@ -75,7 +73,6 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject |
| Message | Test post message |
And I wait "6" seconds
And I log out
When I log in as "student2"
And I follow "Course 1"
@@ -85,7 +82,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
@javascript
Scenario: Tracking forum posts forced with user tracking on
And I set the following administration settings values:
Given I set the following administration settings values:
| Allow forced read tracking | 1 |
And I follow "Home"
And I follow "Course 1"
@@ -97,7 +94,6 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject |
| Message | Test post message |
And I wait "6" seconds
And I log out
When I log in as "student1"
And I follow "Course 1"
@@ -110,7 +106,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
@javascript
Scenario: Tracking forum posts forced with user tracking off
And I set the following administration settings values:
Given I set the following administration settings values:
| Allow forced read tracking | 1 |
And I follow "Home"
And I follow "Course 1"
@@ -122,7 +118,6 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject |
| Message | Test post message |
And I wait "6" seconds
And I log out
When I log in as "student2"
And I follow "Course 1"
@@ -135,7 +130,7 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
@javascript
Scenario: Tracking forum posts forced (with force disabled) with user tracking on
And I set the following administration settings values:
Given I set the following administration settings values:
| Allow forced read tracking | 1 |
And I follow "Home"
And I follow "Course 1"
@@ -147,7 +142,6 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject |
| Message | Test post message |
And I wait "6" seconds
And I set the following administration settings values:
| Allow forced read tracking | 0 |
And I log out
@@ -156,19 +150,19 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
Then I should see "1 unread post"
And I follow "Test forum name"
And I follow "Don't track unread posts"
And I wait "4" seconds
And I wait to be redirected
And I follow "Course 1"
And I should not see "1 unread post"
And I follow "Test forum name"
And I follow "Track unread posts"
And I wait "4" seconds
And I wait to be redirected
And I follow "1"
And I follow "Course 1"
And I should not see "1 unread post"
@javascript
Scenario: Tracking forum posts forced (with force disabled) with user tracking off
And I set the following administration settings values:
Given I set the following administration settings values:
| Allow forced read tracking | 1 |
And I follow "Home"
And I follow "Course 1"
@@ -180,7 +174,6 @@ Feature: A teacher can set one of 3 possible options for tracking read forum pos
And I add a new discussion to "Test forum name" forum with:
| Subject | Test post subject |
| Message | Test post message |
And I wait "6" seconds
And I set the following administration settings values:
| Allow forced read tracking | 0 |
And I log out