Skip to content

Commit

Permalink
MDL-38352 behat: Updating tests
Browse files Browse the repository at this point in the history
According to non-escaped double quotes
in TableNodes. Also refactoring previous
test affected by the issue.
  • Loading branch information
David Monllao committed Mar 11, 2013
1 parent e88d47b commit 37652a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion admin/tool/behat/tests/behat/nasty_strings.feature
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Feature: Transform steps arguments
And I follow "Edit profile"
Then I should not see "NASTYSTRING"
And the "First name" field should match "va\"lue1" value
And the "Description" field should match "va\"lue2" value
And the "Description" field should match "va\\"lue2" value
And the "City/town" field should match "va\"lue3" value

@javascript
Expand Down
19 changes: 6 additions & 13 deletions blocks/tests/behat/restrict_available_blocks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Feature: Allowed blocks controls
As an admin
I need to restrict some blocks to be used in courses

@javascript
Scenario: Blocks can be added with the default permissions
Background:
Given the following "users" exists:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
Expand All @@ -15,7 +14,10 @@ Feature: Allowed blocks controls
And the following "course enrolments" exists:
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1"

@javascript
Scenario: Blocks can be added with the default permissions
Given I log in as "teacher1"
And I follow "Course $NASTYSTRING1"
And I turn editing mode on
When I add the "Course completion status" block
Expand All @@ -25,16 +27,7 @@ Feature: Allowed blocks controls

@javascript
Scenario: Blocks can not be added when the admin restricts the permissions
Given the following "users" exists:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@asd.com |
And the following "courses" exists:
| fullname | shortname | category |
| Course $NASTYSTRING1 | C1 | 0 |
And the following "course enrolments" exists:
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin"
Given I log in as "admin"
And I set the following system permissions of "Teacher" role:
| block/activity_modules:addinstance | Prohibit |
And I am on homepage
Expand Down

0 comments on commit 37652a9

Please sign in to comment.