forked from silverstripe/silverstripe-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH Run Behat test with less than ADMIN permissions
- Loading branch information
1 parent
75b5def
commit 7eb1f3f
Showing
7 changed files
with
79 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,15 @@ Feature: Log in | |
I want to access to the CMS to be secure | ||
So that only my team can make content changes | ||
|
||
Background: | ||
Given the "group" "EDITOR" has permissions "Access to 'Pages' section" | ||
|
||
Scenario: Bad login | ||
Given I log in with "[email protected]" and "badpassword" | ||
Then I should see "The provided details don't seem to be correct" | ||
|
||
Scenario: Valid login | ||
Given I am logged in with "ADMIN" permissions | ||
Given I am logged in as a member of "EDITOR" group | ||
When I go to "/admin/" | ||
Then I should see the CMS | ||
|
||
|
@@ -19,15 +22,15 @@ Feature: Log in | |
And I should see a log-in form | ||
|
||
Scenario: Logout without token | ||
Given I am logged in with "ADMIN" permissions | ||
Given I am logged in as a member of "EDITOR" group | ||
When I go to "/Security/logout" | ||
Then I should see a log-out form | ||
When I press the "Log out" button | ||
And I go to "/admin/" | ||
Then I should see a log-in form | ||
|
||
Scenario: Log in as someone else | ||
Given I am logged in with "ADMIN" permissions | ||
Given I am logged in as a member of "EDITOR" group | ||
When I go to "/Security/login" | ||
Then the response should contain "Log in as someone else" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters