Skip to content

Commit

Permalink
Merge pull request #252 from creative-commoners/pulls/1/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 committed Sep 8, 2022
2 parents 2a8cc69 + 7727156 commit 43e1333
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion tests/Behat/features/compare-mode.feature
Expand Up @@ -8,7 +8,8 @@ Feature: Compare mode
Given I have a config file "enable-historyviewer.yml"
And a "page" "Home" with "Content"="<p>Hello world</p>"

Given I am logged in with "ADMIN" permissions
Given the "group" "EDITOR" has permissions "Access to 'Pages' section"
And I am logged in as a member of "EDITOR" group
And I go to "/admin/pages"
And I wait 3 seconds
And I click on "Home" in the tree
Expand Down
7 changes: 4 additions & 3 deletions tests/Behat/features/list-view.feature
Expand Up @@ -9,7 +9,8 @@ Feature: View a list of versions
And I have a config file "enable-historyviewer.yml"
And a "page" "Home" with "Content"="Background"

Given I am logged in with "ADMIN" permissions
Given the "group" "EDITOR" has permissions "Access to 'Pages' section"
And I am logged in as a member of "EDITOR" group
And I go to "/admin/pages"
And I wait 3 seconds
And I click on "Home" in the tree
Expand All @@ -29,7 +30,7 @@ Feature: View a list of versions
And I go to "/admin/pages/history/show/1"
And I wait for 3 seconds
Then I should see a list of versions
And I should see "ADMIN User" in the author column in version 1
And I should see "EDITOR User" in the author column in version 1
And I should see "Published" in the record column in version 1
And I should see "01/01/2100" in the record column in version 1
And I should see the "Live" badge
Expand All @@ -44,7 +45,7 @@ Feature: View a list of versions
And I go to "/admin/pages/history/show/1"
And I wait for 3 seconds
Then I should see a list of versions
And I should see "ADMIN User" in the author column in version 1
And I should see "EDITOR User" in the author column in version 1
And I should see "Saved" in the record column in version 1
And I should see "01/01/2100" in the record column in version 1
And I should not see the "Live" badge
Expand Down
3 changes: 2 additions & 1 deletion tests/Behat/features/revert-to-a-version.feature
Expand Up @@ -8,7 +8,8 @@ Feature: Revert to a version
Given a "page" "Home" with "Content"="Initial version"
And I have a config file "enable-historyviewer.yml"

Given I am logged in with "ADMIN" permissions
Given the "group" "EDITOR" has permissions "Access to 'Pages' section"
And I am logged in as a member of "EDITOR" group
And I go to "/admin/pages"
And I wait 3 seconds
And I click on "Home" in the tree
Expand Down
3 changes: 2 additions & 1 deletion tests/Behat/features/view-a-version.feature
Expand Up @@ -7,7 +7,8 @@ Feature: View a version
Given a "page" "Home" with "Content"="Welcome to my website"
And I have a config file "enable-historyviewer.yml"

Given I am logged in with "ADMIN" permissions
Given the "group" "EDITOR" has permissions "Access to 'Pages' section"
And I am logged in as a member of "EDITOR" group
And I go to "/admin/pages"
And I wait 3 seconds
And I click on "Home" in the tree
Expand Down

0 comments on commit 43e1333

Please sign in to comment.