Merge pull request #2013 from open-sausages/pulls/4.0/better-tests

BUG Ensure we publish pages to update permissions during testing
This commit is contained in:
Chris Joe 2017-11-03 11:55:58 +13:00 committed by GitHub
commit 0c02b8872f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,7 +23,7 @@ Feature: Manage page permissions
Scenario: I can limit page view permissions to logged-in users Scenario: I can limit page view permissions to logged-in users
Given I select "Logged-in users" from "Who can view this page?" input group Given I select "Logged-in users" from "Who can view this page?" input group
And I press the "Save" button And I press the "Save & publish" button
When I am not logged in When I am not logged in
And I go to the homepage And I go to the homepage
Then I should see a log-in form Then I should see a log-in form
@ -34,7 +34,7 @@ Feature: Manage page permissions
Scenario: I can limit page view permissions to certain groups Scenario: I can limit page view permissions to certain groups
Given I select "Only these groups (choose from list)" from "Who can view this page?" input group Given I select "Only these groups (choose from list)" from "Who can view this page?" input group
And I select "AUTHOR group" in the "#Form_EditForm_ViewerGroups_Holder" tree dropdown And I select "AUTHOR group" in the "#Form_EditForm_ViewerGroups_Holder" tree dropdown
And I press the "Save" button And I press the "Save & publish" button
When I am not logged in When I am not logged in
And I go to the homepage And I go to the homepage
Then I should see a log-in form Then I should see a log-in form
@ -48,14 +48,14 @@ Feature: Manage page permissions
Scenario: I can limit page edit permissions to logged-in users Scenario: I can limit page edit permissions to logged-in users
Given I select "Logged-in users" from "Who can edit this page?" input group Given I select "Logged-in users" from "Who can edit this page?" input group
And I press the "Save" button And I press the "Save & publish" button
Then pages should be editable by "AUTHOR" Then pages should be editable by "AUTHOR"
And pages should be editable by "ADMIN" And pages should be editable by "ADMIN"
Scenario: I can limit page edit permissions to certain groups Scenario: I can limit page edit permissions to certain groups
Given I select "Only these groups (choose from list)" from "Who can edit this page?" input group Given I select "Only these groups (choose from list)" from "Who can edit this page?" input group
And I select "ADMIN group" in the "#Form_EditForm_EditorGroups_Holder" tree dropdown And I select "ADMIN group" in the "#Form_EditForm_EditorGroups_Holder" tree dropdown
And I press the "Save" button And I press the "Save & publish" button
Then pages should not be editable by "AUTHOR" Then pages should not be editable by "AUTHOR"
But pages should be editable by "ADMIN" But pages should be editable by "ADMIN"