Skip to content

Commit

Permalink
Merge pull request #487 from creative-commoners/pulls/2/review-behat-…
Browse files Browse the repository at this point in the history
…tests

ENH Replace ADMIN permissions with less permissions in Behat test
  • Loading branch information
GuySartorelli authored Sep 12, 2022
2 parents 837ab70 + 5eb7e8a commit 1e311e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 2 additions & 3 deletions tests/behat/features/operate-subsites.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ Feature: Create and select a subsite
Background:
# There's a bug where you need CMS_ACCESS_CMSMain rather than CMS_ACCESS_LeftAndMain permissions to
# use subsites as expected
# Given the "group" "EDITOR group" has permissions "CMS_ACCESS_LeftAndMain" and "FILE_EDIT_ALL"
Given the "group" "EDITOR group" has permissions "CMS_ACCESS_CMSMain" and "CMS_ACCESS_AssetAdmin" and "FILE_EDIT_ALL"
Given the "group" "EDITOR" has permissions "CMS_ACCESS_CMSMain" and "CMS_ACCESS_AssetAdmin" and "FILE_EDIT_ALL"
And a "page" "My page" with "URLSegment"="my-page", "Content"="My page content"
And an "image" "file1.jpg"
And an "image" "file2.jpg"
Expand Down Expand Up @@ -39,7 +38,7 @@ Feature: Create and select a subsite
# Change to Editor user
When I go to "/Security/login"
And I press the "Log in as someone else" button
When I am logged in with "EDITOR" permissions
When I am logged in as a member of "EDITOR" group
And I go to "admin/pages"

# Can see main site page on main site
Expand Down
3 changes: 2 additions & 1 deletion tests/behat/features/preview-navigation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ Feature: Preview navigation
Given a "subsite" "MySubsite"
And a "page" "My page" with "URLSegment"="my-page", "Content"="My page content <a name='aname'>aname</a> <a href='[sitetree_link,id=5]'>ahref</a>" and "SubsiteID"="1"
And a "page" "Other page" with "URLSegment"="other-page", "Content"="Other page content <a href='[sitetree_link,id=4]'>Goto my page</a>" and "SubsiteID"="1"
And the "group" "EDITOR" has permissions "Access to 'Pages' section" and "Access to 'Subsites' section"
And I am logged in as a member of "EDITOR" group

@javascript
Scenario: I can navigate the subsite preview
Given I am logged in with "ADMIN" permissions
When I go to "/admin/pages"
And I select "MySubsite" from "SubsitesSelect"
And I click on "My page" in the tree
Expand Down
3 changes: 2 additions & 1 deletion tests/behat/features/publish-a-page.feature
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Feature: Publish a page
Background:
Given a "subsite" "Subsite B"
And a "page" "My page" with "URLSegment"="my-page", "Content"="My page content"
And I am logged in with "ADMIN" permissions
And the "group" "EDITOR" has permissions "Access to 'Pages' section" and "Access to 'Subsites' section"
And I am logged in as a member of "EDITOR" group
Then I go to "admin/pages"

@javascript
Expand Down

0 comments on commit 1e311e8

Please sign in to comment.