Merge pull request #1169 from creative-commoners/pulls/5/review-behat-tests

ENH Replace ADMIN permissions with less permissions in Behat test
This commit is contained in:
Guy Sartorelli 2022-09-15 11:13:25 +12:00 committed by GitHub
commit 198466a979
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -3,13 +3,13 @@ Feature: Userforms
I want to user userforms I want to user userforms
Background: Background:
Given the "group" "EDITOR group" has permissions "CMS_ACCESS_LeftAndMain" Given the "group" "EDITOR" has permissions "Access to 'Pages' section" and "Access to 'Files' section" and "FILE_EDIT_ALL"
# Explicitly create an admin group with the default administrators code for UserDefinedFormAdmin # Explicitly create an admin group with the default administrators code for UserDefinedFormAdmin
And the "group" "ADMIN group" has permissions "Full administrative rights" And the "group" "ADMIN group" has permissions "Full administrative rights"
And a "group" "ADMIN group" has the "Code" "administrators" And a "group" "ADMIN group" has the "Code" "administrators"
Scenario: Operate userforms Scenario: Operate userforms
Given I am logged in with "ADMIN" permissions Given I am logged in as a member of "EDITOR" group
When I go to "/admin/pages" When I go to "/admin/pages"
And I press the "Add new" button And I press the "Add new" button
And I select the "User Defined Form" radio button And I select the "User Defined Form" radio button
@ -88,8 +88,7 @@ Feature: Userforms
Then the rendered HTML should contain "<p>Custom body</p>" Then the rendered HTML should contain "<p>Custom body</p>"
# Logout # Logout
Given I go to "/Security/login" Given I am not logged in
And I press the "Log in as someone else" button
# View frontend as anonymous user # View frontend as anonymous user
When I go to "/my-userform" When I go to "/my-userform"