Skip to content

Commit

Permalink
MDL-43835 behat: Use proper step for navigation expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
Rajesh Taneja committed Jun 25, 2014
1 parent 6c396b6 commit 004d7e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
11 changes: 3 additions & 8 deletions badges/tests/behat/add_badge.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ Feature: Add badges to the system

@javascript
Scenario: Setting badges settings
Given I expand "Site administration" node
And I expand "Badges" node
And I follow "Badges settings"
Given I navigate to "Badges settings" node in "Site administration > Badges"
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@test-badge-site.com"
And I press "Save changes"
Expand All @@ -22,15 +20,12 @@ Feature: Add badges to the system

@javascript
Scenario: Accessing the badges
Given I expand "Site pages" node
And I follow "Site badges"
Given I navigate to "Site badges" node in "Site pages"
Then I should see "There are no badges available."

@javascript
Scenario: Add a badge
Given I expand "Site administration" node
And I expand "Badges" node
And I follow "Add a new badge"
Given I navigate to "Add a new badge" node in "Site administration > Badges"
And I set the following fields to these values:
| Name | Test Badge |
| Description | Test badge description |
Expand Down
6 changes: 3 additions & 3 deletions badges/tests/behat/award_badge.feature
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Feature: Award badges
| student2 | C1 | student |
And I log in as "teacher1"
And I follow "Course 1"
And I click on "//span[text()='Badges']" "xpath_element" in the "Administration" "block"
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
And I set the following fields to these values:
| Name | Course Badge |
Expand Down Expand Up @@ -142,7 +142,7 @@ Feature: Award badges
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "//span[text()='Badges']" "xpath_element" in the "Administration" "block"
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
And I set the following fields to these values:
| Name | Course Badge |
Expand Down Expand Up @@ -203,7 +203,7 @@ Feature: Award badges
And I log out
And I log in as "teacher1"
And I follow "Course 1"
And I click on "//span[text()='Badges']" "xpath_element" in the "Administration" "block"
And I navigate to "Add a new badge" node in "Course administration > Badges"
And I follow "Add a new badge"
And I set the following fields to these values:
| Name | Course Badge |
Expand Down

0 comments on commit 004d7e3

Please sign in to comment.