Skip to content

Commit

Permalink
MDL-37750 behat: Adding tests for the rest of the steps definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Feb 8, 2013
1 parent 1f9ffbd commit bf4fa29
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
29 changes: 29 additions & 0 deletions admin/tool/behat/tests/behat/basic_actions.feature
@@ -0,0 +1,29 @@
@tool_behat
Feature: Page contents assertions
In order to write good tests
As a tests writer
I need to check the page contents

@javascript
Scenario: Basic contents assertions
Given I log in as "admin"
And I am on homepage
And I expand "Users" node
And I follow "Groups"
And I press "Create group"
And I fill the moodle form with:
| Group name | I'm the name |
| Group description | I'm the description |
And I press "Save changes"
When I follow "Overview"
And I wait until the page is ready
And I wait "2" seconds
And I hover ".region-content .generaltable td span"
Then I should see "I'm the description"
And I should see "Filter groups by"
And I should not see "Filter groupssss by"
And I should see "Group members" in the ".region-content table th.c1" element
And I should not see "Group membersssss" in the ".region-content table th.c1" element
And I follow "Groups"
And the element "#groupeditform #showcreateorphangroupform" should be enabled
And the element "#groupeditform #showeditgroupsettingsform" should be disabled
20 changes: 20 additions & 0 deletions admin/tool/behat/tests/behat/manipulate_forms.feature
@@ -0,0 +1,20 @@
@tool_behat @core_form
Feature: Forms manipulation
In order to interact with Moodle
As a user
I need to set forms values

@javascript
Scenario: Basic forms manipulation
Given I log in as "admin"
And I follow "Admin User"
And I follow "Edit profile"
When I fill in "First name" with "Field value"
And I select "Use standard web forms" from "When editing text"
And I check "Unmask"
Then the "First name" field should match "Field value" value
And the "When editing text" select box should contain "Use standard web forms"
And the "Unmask" checkbox should be checked
And I uncheck "Unmask"
And the "Unmask" checkbox should not be checked
And I press "Update profile"
1 change: 1 addition & 0 deletions course/tests/behat/add_activities.feature
Expand Up @@ -26,6 +26,7 @@ Feature: Add activities to courses
| Required entries | 9 |
| Comments | Yes |
| ID number | ASD123 |
And I turn editing mode off
Then I should not see "Adding a new"
And I follow "Test name"
And I follow "Edit settings"
Expand Down

0 comments on commit bf4fa29

Please sign in to comment.