mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
ENH Replace ADMIN permissions with less permissions in Behat test
This commit is contained in:
parent
6f5edab1ad
commit
495e7460db
@ -6,14 +6,17 @@ Feature: Set up reviews
|
|||||||
Background:
|
Background:
|
||||||
# Note: the review date is deliberately in the past
|
# Note: the review date is deliberately in the past
|
||||||
Given a "page" "My page" with "Content"="<p>Welcome</p>", "NextReviewDate"="01/01/2017", "ReviewPeriodDays"="1"
|
Given a "page" "My page" with "Content"="<p>Welcome</p>", "NextReviewDate"="01/01/2017", "ReviewPeriodDays"="1"
|
||||||
And the "group" "EDITOR group" has permissions "CMS_ACCESS_LeftAndMain" and "FILE_EDIT_ALL"
|
And the "group" "ADMIN group" has permissions "Full administrative rights"
|
||||||
And the "group" "FILEONLY group" has permissions "FILE_EDIT_ALL"
|
And the "group" "EDITOR" has permissions "CMS_ACCESS_CMSMain" and "EDIT_CONTENT_REVIEW_FIELDS"
|
||||||
And a "member" "Ed" belonging to "EDITOR group" with "Email"="ed@example.com"
|
And the "group" "AUTHOR" has permissions and "CMS_ACCESS_LeftAndMain"
|
||||||
And a "member" "Phil" belonging to "FILEONLY group" with "Email"="phil@example.com"
|
And the "group" "FILEONLY" has permissions "FILE_EDIT_ALL"
|
||||||
# Login in as EDITOR once https://github.com/silverstripe/silverstripe-contentreview/pull/155 is merged
|
And the "group" "CMS_MAIN" has permissions "CMS_ACCESS_CMSMain"
|
||||||
# And I am logged in with "EDITOR" permissions
|
And a "member" "Ed" belonging to "AUTHOR" with "Email"="ed@example.com"
|
||||||
And I am logged in with "ADMIN" permissions
|
And a "member" "Phil" belonging to "FILEONLY" with "Email"="phil@example.com"
|
||||||
|
And a "member" "Anna" belonging to "CMS_MAIN" with "Email"="anna@example.com"
|
||||||
|
And I am logged in as a member of "EDITOR" group
|
||||||
And I go to "admin/pages"
|
And I go to "admin/pages"
|
||||||
|
And I wait for 1 second
|
||||||
And I click on "My page" in the tree
|
And I click on "My page" in the tree
|
||||||
And I click the "Settings" CMS tab
|
And I click the "Settings" CMS tab
|
||||||
And I click the "Content review" CMS tab
|
And I click the "Content review" CMS tab
|
||||||
@ -24,10 +27,11 @@ Feature: Set up reviews
|
|||||||
|
|
||||||
# Test adding individual member based on them having access to the Pages section fo the CMS
|
# Test adding individual member based on them having access to the Pages section fo the CMS
|
||||||
Then the "#Form_EditForm_OwnerUsers" select element should have an option with an "Ed" label
|
Then the "#Form_EditForm_OwnerUsers" select element should have an option with an "Ed" label
|
||||||
|
And the "#Form_EditForm_OwnerUsers" select element should have an option with an "Anna" label
|
||||||
And the "#Form_EditForm_OwnerUsers" select element should not have an option with a "Phil" label
|
And the "#Form_EditForm_OwnerUsers" select element should not have an option with a "Phil" label
|
||||||
|
|
||||||
# Test adding groups
|
# Test adding groups
|
||||||
Then the "#Form_EditForm_OwnerGroups" select element should have an option with an "EDITOR group" label
|
Then the "#Form_EditForm_OwnerGroups" select element should have an option with an "EDITOR" label
|
||||||
|
|
||||||
# Required to avoid "unsaved changed" browser dialog
|
# Required to avoid "unsaved changed" browser dialog
|
||||||
Then I press the "Save" button
|
Then I press the "Save" button
|
||||||
@ -37,7 +41,7 @@ Feature: Set up reviews
|
|||||||
And I wait for 1 second
|
And I wait for 1 second
|
||||||
Then I should not see the ".content-review__button" element
|
Then I should not see the ".content-review__button" element
|
||||||
When I press the "Save" button
|
When I press the "Save" button
|
||||||
And I select "ADMIN group" from "Groups"
|
And I select "EDITOR" from "Groups"
|
||||||
And I press the "Save" button
|
And I press the "Save" button
|
||||||
Then I should see the ".content-review__button" element
|
Then I should see the ".content-review__button" element
|
||||||
When I click on the ".content-review__button" element
|
When I click on the ".content-review__button" element
|
||||||
|
@ -6,7 +6,8 @@ Feature: Set up reviews
|
|||||||
Background:
|
Background:
|
||||||
# Note: the review date is deliberately in the past
|
# Note: the review date is deliberately in the past
|
||||||
Given a "page" "Home" with "Content"="<p>Welcome</p>", "NextReviewDate"="01/01/2017", "ReviewPeriodDays"="1"
|
Given a "page" "Home" with "Content"="<p>Welcome</p>", "NextReviewDate"="01/01/2017", "ReviewPeriodDays"="1"
|
||||||
And I am logged in with "ADMIN" permissions
|
And the "group" "EDITOR" has permissions "CMS_ACCESS_CMSMain" and "EDIT_CONTENT_REVIEW_FIELDS"
|
||||||
|
And I am logged in as a member of "EDITOR" group
|
||||||
And I go to "admin/pages"
|
And I go to "admin/pages"
|
||||||
|
|
||||||
@javascript
|
@javascript
|
||||||
@ -18,7 +19,7 @@ Feature: Set up reviews
|
|||||||
When I click the "Content review" CMS tab
|
When I click the "Content review" CMS tab
|
||||||
And I select "Custom settings" from "Options" input group
|
And I select "Custom settings" from "Options" input group
|
||||||
And I wait for 1 second
|
And I wait for 1 second
|
||||||
And I select "ADMIN group" from "Groups"
|
And I select "EDITOR" from "Groups"
|
||||||
And I press "Save"
|
And I press "Save"
|
||||||
Then I should see a "Content due for review" button
|
Then I should see a "Content due for review" button
|
||||||
|
|
||||||
@ -29,7 +30,7 @@ Feature: Set up reviews
|
|||||||
And I click the "Content review" CMS tab
|
And I click the "Content review" CMS tab
|
||||||
And I select "Custom settings" from "Options" input group
|
And I select "Custom settings" from "Options" input group
|
||||||
And I wait for 1 seconds
|
And I wait for 1 seconds
|
||||||
And I select "ADMIN group" from "Groups"
|
And I select "EDITOR" from "Groups"
|
||||||
And I press "Save"
|
And I press "Save"
|
||||||
And I follow "Content due for review"
|
And I follow "Content due for review"
|
||||||
And I wait for 3 seconds
|
And I wait for 3 seconds
|
||||||
|
Loading…
Reference in New Issue
Block a user