ENH Replace ADMIN permissions with less permissions in Behat test

This commit is contained in:
Sabina Talipova 2022-09-05 14:01:12 +12:00
parent 837ab70a8d
commit 5eb7e8a7a3
3 changed files with 6 additions and 5 deletions

View File

@ -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"
@ -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

View File

@ -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

View File

@ -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