Skip to content
Open
Show file tree
Hide file tree
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
98 changes: 53 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ To build the project execute the following command:
```bash
./gradlew bootWithCCD
```

Above command starts PCS API + CCD & all dependencies

This will start several containers:

| Container | Port |
|-----------------------------------|------|
| --------------------------------- | ---- |
| PCS-API | 3206 |
| XUI Manage case (UI Access point) | 3000 |
| Elastic search | 9200 |
Expand Down Expand Up @@ -54,7 +55,7 @@ Then set the following environment variables based on the value below or named s
from the PCS AAT key vault:

| Environment Variable | Value or Secret Name |
|------------------------------|------------------------------------------------------------------------------|
| ---------------------------- | ---------------------------------------------------------------------------- |
| LOCATION_REF_URL | http://rd-location-ref-api-aat.service.core-compute-aat.internal |
| DATA_STORE_URL_BASE | https://ccd-data-store-api-pcs-api-pr-{CHANGE_ID}.preview.platform.hmcts.net |
| PCS_API_S2S_SECRET | secret: pcs-api-s2s-secret |
Expand All @@ -66,7 +67,6 @@ from the PCS AAT key vault:
| IDAM_PCS_USER_PASSWORD | secret: idam-pcs-user-password |
| PCS_SOLICITOR_AUTOMATION_UID | secret: pcs-solicitor-automation-uid |


Finally, run the service with the `bootWithCCD` task as above.

In order to test if the API is healthy, you can call its health endpoint:
Expand All @@ -93,6 +93,7 @@ To access the swagger documentation for the API, go to http://localhost:3206/swa
The Functional tests use [Rest Assured](https://rest-assured.io) and [Serenity](https://serenity-bdd.github.io) for reporting, and are located in the `/src/functionalTest` directory.

The following environment variables are needed to run the tests:

- PCS_API_S2S_SECRET
- TEST_URL
- IDAM_S2S_AUTH_URL
Expand All @@ -104,14 +105,16 @@ The following environment variables are needed to run the tests:
- S2S_EXPIRED_TOKEN

To run the tests, use:

```bash
./gradlew functional
````
```

To run tests based on tags, use the following command (replace `tagName` with the desired tag):

```bash
./gradlew functional -Dtags="tagName"
````
```

Additionally, you can configure the tags to run in the pipeline by editing the functional task in the `build.gradle`, line:

Expand All @@ -127,13 +130,14 @@ This is done with:

```bash
cd src/e2eTest
````
```

Before running any tests, please install all required packages:

```bash
yarn install
````
```

Running the tests:

The e2e tests use playwright, and are located in the /src/e2eTest directory.
Expand All @@ -149,9 +153,11 @@ The following environment variables are needed to run the tests:
The e2e suite can be run with the following command:

To run the critical tests/PR tagged tests, use:

```bash
yarn test:pr
````
```

There are also several custom test scripts available:

- `yarn test:regression` - runs regression tagged tests
Expand All @@ -163,6 +169,7 @@ To open generated Allure report
```bash
yarn test:openAllureReport
```

Permanent IDAM Users:
All permanent users needs to be added to ./data/permanent-users.data
Temporary IDAM Users:
Expand All @@ -184,47 +191,48 @@ response for the possession claim fee:
**Headers**: Content-Type:application/json

**Body**:

```json
{
"request": {
"method": "GET",
"urlPath": "/fees-register/fees/lookup",
"queryParameters": {
"service": {
"equalTo": "possession claim"
},
"jurisdiction1": {
"equalTo": "civil"
},
"jurisdiction2": {
"equalTo": "county court"
},
"channel": {
"equalTo": "default"
},
"event": {
"equalTo": "issue"
},
"amount_or_volume": {
"equalTo": "1"
},
"keyword": {
"equalTo": "PossessionCC"
}
}
"request": {
"method": "GET",
"urlPath": "/fees-register/fees/lookup",
"queryParameters": {
"service": {
"equalTo": "possession claim"
},
"jurisdiction1": {
"equalTo": "civil"
},
"jurisdiction2": {
"equalTo": "county court"
},
"channel": {
"equalTo": "default"
},
"event": {
"equalTo": "issue"
},
"amount_or_volume": {
"equalTo": "1"
},
"keyword": {
"equalTo": "PossessionCC"
}
}
},
"response": {
"status": 200,
"jsonBody": {
"code": "FEE0412",
"description": "Recovery of Land - County Court (Test)",
"version": 1,
"fee_amount": 1234.56
},
"response": {
"status": 200,
"jsonBody": {
"code": "FEE0412",
"description": "Recovery of Land - County Court (Test)",
"version": 1,
"fee_amount": 1234.56
},
"headers": {
"Content-Type": "application/json"
}
"headers": {
"Content-Type": "application/json"
}
}
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,16 @@ public class HouseholdCircumstances {
@CCD
private YesOrNo dependantChildren;

@CCD
private YesOrNo shareAdditionalCircumstances;

@CCD(max = 500)
private String additionalCircumstancesDetails;

@CCD
private YesOrNo exceptionalHardship;

@CCD(max = 500)
private String exceptionalHardshipDetails;

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ public HouseholdCircumstancesEntity createHouseholdCircumstancesEntity(Household

HouseholdCircumstancesEntity householdCircumstancesEntity = HouseholdCircumstancesEntity.builder()
.dependantChildren(circumstances.getDependantChildren())
.shareAdditionalCircumstances(circumstances.getShareAdditionalCircumstances())
.additionalCircumstancesDetails(circumstances.getAdditionalCircumstancesDetails())
.exceptionalHardship(circumstances.getExceptionalHardship())
.exceptionalHardshipDetails(circumstances.getExceptionalHardshipDetails())
.build();

return householdCircumstancesEntity;
Expand Down
Loading