Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VACMS-16641: Test restricted archive workflow #17160

Merged
merged 3 commits into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,37 @@ Feature: CMS User may effectively interact with the VBA Facility form
Then the primary tab "View" should exist
Then the primary tab "Edit" should not exist

Scenario: Test restricted_archive workflow prevents archiving a VBA Facility as a VBA editor.
When I am logged in as a user with the roles "content_creator_vba, content_publisher"
And my workbench access sections are set to "1065"
When I am at "/node/4063/edit"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider: Risky referencing a specific node. If someone actually archives that facility (if it closed) the test will break. It is not a huge issue but does create bumps in the road. I am not sure if it worth having this test create a new VBA facility as an admin, then test it, but that would reduce the risk.

edit: Given that the next test also references the node directly, I think it makes sense not sink more time into trying to have both of them create a node. It just slows things down.

And I scroll to element "select#edit-moderation-state-0-state"
Then an option with the text "Archived" from dropdown with selector "select#edit-moderation-state-0-state" should not be visible
And I scroll to position "bottom"
And I click the "Unlock" link
And I click the "Confirm break lock" button
Comment on lines +23 to +24
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bonus points for having the test clean up its messes.


Scenario: Test restricted_archive workflow allows archiving a VBA Facility as a content_admin.
Given I am logged in as a user with the "content_admin" role
# Columbia VA Regional Benefit Office
When I am at "/node/4063/edit"
And I scroll to element "select#edit-moderation-state-0-state"
Then an option with the text "Archived" from dropdown with selector "select#edit-moderation-state-0-state" should be visible

When I select option "Archived" from dropdown with selector "select#edit-moderation-state-0-state"
And I fill in field with selector "#edit-revision-log-0-value" with value "[Test Data] Revision log message."
And I save the node
Then I should see "has been updated."

When I click the edit tab
And I scroll to element "select#edit-moderation-state-0-state"
Then an option with the text "Published" from dropdown with selector "select#edit-moderation-state-0-state" should be visible

When I select option "Published" from dropdown with selector "select#edit-moderation-state-0-state"
And I fill in field with selector "#edit-revision-log-0-value" with value "[Test Data] Revision log message."
And I save the node
Then I should see "has been updated."

Scenario: Enable banner segment and ensure expected fields are present
Given I am logged in as a user with the "content_admin" role
And my workbench access sections are set to "1065"
Expand Down
Loading