generated from hmcts/spring-boot-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b7a1dc
commit 81f5337
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/functionalTest/resources/features/opalMode/PO-235-Notes_RolesAndBusinessUnits.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
@PO-235 @Opal | ||
Feature: tests for notes roles/permissions for accounts dependant on business units | ||
|
||
Scenario: A user can add a note to a business unit it is part of | ||
Given I am testing as the "[email protected]" user | ||
When I make a request to the defendant account add notes api with | ||
| associatedRecordId | 500000010 | | ||
| businessUnitId | 17 | | ||
| noteText | test roles and perms Opal user1 | | ||
And the add notes response contains | ||
| associatedRecordId | 500000010 | | ||
| noteText | test roles and perms Opal user1 | | ||
| postedBy | L017KG | | ||
| postedByUserId | 500000000 | | ||
| businessUnitId | 17 | | ||
|
||
|
||
When I make a request to the defendant account add notes api with | ||
| associatedRecordId | 500000010 | | ||
| businessUnitId | 69 | | ||
| noteText | test roles and perms Opal user1 | | ||
And the add notes response contains | ||
| associatedRecordId | 500000010 | | ||
| noteText | test roles and perms Opal user1 | | ||
| postedBy | L069KG | | ||
| postedByUserId | 500000000 | | ||
| businessUnitId | 69 | | ||
|
||
Scenario: A user cannot add a note to a business unit it is not part of | ||
Given I am testing as the "[email protected]" user | ||
When I make a request to the defendant account add notes api with | ||
| associatedRecordId | 500000010 | | ||
| businessUnitId | 24 | | ||
| noteText | test roles and perms Opal user1 | | ||
Then the add notes request is forbidden | ||
|
||
Scenario: The business unit must be defined in the request | ||
Given I am testing as the "[email protected]" user | ||
When I make a request to the defendant account add notes api with | ||
| associatedRecordId | 500000010 | | ||
| noteText | test roles and perms Opal user1 | | ||
#When error logging is looked at would be good to check the error message | ||
Then the add notes request returns an Internal Server Error |