From e907f28faa0616b1417446496758a5f5d3d3ed29 Mon Sep 17 00:00:00 2001 From: Michael Kinnunen Date: Wed, 7 Feb 2024 12:26:45 -0500 Subject: [PATCH] VACMS-16641: Move the tests into VBA Facility and use that content type instead of Police Page --- .../vamc/restricted_archive_workflow.feature | 23 -------------- .../facilities/vba/vba_facility.feature | 31 +++++++++++++++++++ 2 files changed, 31 insertions(+), 23 deletions(-) delete mode 100644 tests/cypress/integration/features/content_type/facilities/vamc/restricted_archive_workflow.feature diff --git a/tests/cypress/integration/features/content_type/facilities/vamc/restricted_archive_workflow.feature b/tests/cypress/integration/features/content_type/facilities/vamc/restricted_archive_workflow.feature deleted file mode 100644 index 0be6765e2fe..00000000000 --- a/tests/cypress/integration/features/content_type/facilities/vamc/restricted_archive_workflow.feature +++ /dev/null @@ -1,23 +0,0 @@ -Feature: VAMC System Level pages follow a Restricted Archive Workflow. - - Scenario: Content Editors cannot archive VA Police pages - Given I am logged in as a user with the "content_editor" role - And my workbench access sections are set to "318" - # VAMC System Police page VA police for VA Orlando health care - When I am at "/node/63901/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 not be visible - And I scroll to position "bottom" - And I click the "Unlock" link - And I click the "Confirm break lock" button - - Scenario: Content Admins are able to archive VA Police pages - Given I am logged in as a user with the "content_admin" role - When I am at "/node/63901/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." diff --git a/tests/cypress/integration/features/content_type/facilities/vba/vba_facility.feature b/tests/cypress/integration/features/content_type/facilities/vba/vba_facility.feature index 375e546b2f5..9def9146f27 100644 --- a/tests/cypress/integration/features/content_type/facilities/vba/vba_facility.feature +++ b/tests/cypress/integration/features/content_type/facilities/vba/vba_facility.feature @@ -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: Log in and try to archive 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" + 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 + + Scenario: Log in and archive a VBA Facility as an 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"