From d86cf8f2cf233cfe90092933a8fc8b0e37596c76 Mon Sep 17 00:00:00 2001 From: Cade Faulkner <147704481+CadeFaulkner@users.noreply.github.com> Date: Thu, 17 Oct 2024 15:44:16 +0100 Subject: [PATCH] Po 827 tests (#595) * updated tests for PO-831 removing un-needed annotation * Tests for PO-827 --------- Co-authored-by: rajanigandra <167096333+rajanigandra@users.noreply.github.com> --- ...-827_postDraftAccountAuthorisation.feature | 38 +++++++++++++++++++ ...831_patchDraftAccountAuthorisation.feature | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 src/functionalTest/resources/features/opalMode/manualAccountCreation/draftAccounts/PO-827_postDraftAccountAuthorisation.feature diff --git a/src/functionalTest/resources/features/opalMode/manualAccountCreation/draftAccounts/PO-827_postDraftAccountAuthorisation.feature b/src/functionalTest/resources/features/opalMode/manualAccountCreation/draftAccounts/PO-827_postDraftAccountAuthorisation.feature new file mode 100644 index 00000000..ec0c744b --- /dev/null +++ b/src/functionalTest/resources/features/opalMode/manualAccountCreation/draftAccounts/PO-827_postDraftAccountAuthorisation.feature @@ -0,0 +1,38 @@ +@Opal +Feature: PO-827 - Authorisation for Post Draft Account + + @PO-827 @cleanUpData + Scenario: Post Draft Account - Invalid Auth + Given I set an invalid token + When I create a draft account with the following details + | business_unit_id | 73 | + | account | draftAccounts/accountJson/adultAccount.json | + | account_type | Fine | + | account_status | | + | submitted_by | BUUID | + | timeline_data | | + Then The draft account response returns 401 + + @PO-827 @cleanUpData + Scenario: Post Draft Account - No Permission + Given I am testing as the "opal-test-2@hmcts.net" user + When I create a draft account with the following details + | business_unit_id | 73 | + | account | draftAccounts/accountJson/adultAccount.json | + | account_type | Fine | + | account_status | | + | submitted_by | BUUID | + | timeline_data | | + Then The draft account response returns 403 + + @PO-827 @cleanUpData + Scenario: Post Draft Account - Permission in different BU + Given I am testing as the "opal-test@hmcts.net" user + When I create a draft account with the following details + | business_unit_id | 26 | + | account | draftAccounts/accountJson/adultAccount.json | + | account_type | Fine | + | account_status | | + | submitted_by | BUUID | + | timeline_data | | + Then The draft account response returns 403 diff --git a/src/functionalTest/resources/features/opalMode/manualAccountCreation/draftAccounts/PO-831_patchDraftAccountAuthorisation.feature b/src/functionalTest/resources/features/opalMode/manualAccountCreation/draftAccounts/PO-831_patchDraftAccountAuthorisation.feature index 698c8af0..d84be45d 100644 --- a/src/functionalTest/resources/features/opalMode/manualAccountCreation/draftAccounts/PO-831_patchDraftAccountAuthorisation.feature +++ b/src/functionalTest/resources/features/opalMode/manualAccountCreation/draftAccounts/PO-831_patchDraftAccountAuthorisation.feature @@ -1,4 +1,4 @@ -@Opal @CF +@Opal Feature: PO-831 - Authorisation for patch draft account @PO-831 @cleanUpData