Skip to content

Commit cb538a7

Browse files
authored
Merge pull request #996 from NHSDigital/fix-test-consent-responses
Fix test consent responses
2 parents 0c8b6a5 + dcd85e1 commit cb538a7

File tree

12 files changed

+276
-103
lines changed

12 files changed

+276
-103
lines changed

.github/actions/run-end-to-end-tests/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ inputs:
1212
default: 'false'
1313
imms_api_tests:
1414
default: 'false'
15+
pds_api_tests:
16+
default: 'false'
1517
device:
1618
required: true
1719
base_url:
@@ -71,6 +73,13 @@ runs:
7173
exclude="not imms_api"
7274
fi
7375
fi
76+
if [ "${{ inputs.pds_api_tests }}" = "false" ]; then
77+
if [ -n "$exclude" ]; then
78+
exclude="$exclude and not pds_api"
79+
else
80+
exclude="not pds_api"
81+
fi
82+
fi
7483
if [ -z "$exclude" ]; then
7584
exclude="True"
7685
fi

.github/workflows/end-to-end-tests-all-devices.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
device: ${{ matrix.device }}
4747
base_url: ${{ vars.BASE_URL }}
4848
imms_api_tests: 'true'
49+
pds_api_tests: 'true'
4950
reporting_tests: 'true'
5051
playwright_cache_hit: ${{ steps.playwright-cache.outputs.cache-hit }}
5152
screenshot_all_steps: 'false'

.github/workflows/end-to-end-tests-release.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
default: ''
1010
type: string
1111
cross_service_tests:
12-
description: 'Include imms api and reporting tests'
12+
description: 'Include imms api, pds api and reporting tests'
1313
required: false
1414
default: false
1515
type: boolean
@@ -93,7 +93,7 @@ on:
9393
required: false
9494
default: ''
9595
cross_service_tests:
96-
description: 'Include imms api and reporting tests'
96+
description: 'Include imms api, pds api and reporting tests'
9797
required: false
9898
default: 'true'
9999
type: choice
@@ -257,6 +257,7 @@ jobs:
257257
with:
258258
tests: ${{ steps.set-variables.outputs.tests }}
259259
imms_api_tests: ${{ steps.set-variables.outputs.cross_service_tests }}
260+
pds_api_tests: ${{ steps.set-variables.outputs.cross_service_tests }}
260261
reporting_tests: ${{ steps.set-variables.outputs.cross_service_tests }}
261262
github_ref: ${{ inputs.github_ref || github.head_ref }}
262263
device: ${{ steps.set-variables.outputs.device }}

.github/workflows/end-to-end-tests.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
default: ''
1010
type: string
1111
cross_service_tests:
12-
description: 'Include imms api and reporting tests'
12+
description: 'Include imms api, pds api and reporting tests'
1313
required: false
1414
default: false
1515
type: boolean
@@ -85,7 +85,7 @@ on:
8585
required: false
8686
default: ''
8787
cross_service_tests:
88-
description: 'Include imms api and reporting tests'
88+
description: 'Include imms api, pds api and reporting tests'
8989
required: false
9090
default: 'true'
9191
type: choice
@@ -241,6 +241,7 @@ jobs:
241241
with:
242242
tests: ${{ steps.set-variables.outputs.tests }}
243243
imms_api_tests: ${{ steps.set-variables.outputs.cross_service_tests }}
244+
pds_api_tests: ${{ steps.set-variables.outputs.cross_service_tests }}
244245
reporting_tests: ${{ steps.set-variables.outputs.cross_service_tests }}
245246
github_ref: ${{ inputs.github_ref || github.head_ref }}
246247
device: ${{ steps.set-variables.outputs.device }}

mavis/test/constants.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,3 +533,18 @@ def to_url(self) -> str:
533533
os.getenv("IMMS_BASE_URL", "PROVIDEURL"),
534534
self.value,
535535
)
536+
537+
538+
class PdsEndpoints(StrEnum):
539+
GET_PATIENT_DETAILS = "personal-demographics/FHIR/R4/Patient/"
540+
SEARCH_FOR_PATIENT = "personal-demographics/FHIR/R4/Patient?"
541+
542+
@property
543+
def to_url(self) -> str:
544+
return urllib.parse.urljoin(
545+
os.getenv("IMMS_BASE_URL", "PROVIDEURL"),
546+
self.value,
547+
)
548+
549+
def to_url_with_suffix(self, suffix: str = "") -> str:
550+
return f"{self.to_url}{suffix}"

mavis/test/data/pds.py

Lines changed: 0 additions & 95 deletions
This file was deleted.

mavis/test/fixtures/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
point_of_care_team,
2121
schools,
2222
)
23+
from .fhir_api import authenticate_api
2324
from .helpers import (
2425
add_vaccine_batch,
2526
log_in_as_medical_secretary,
@@ -32,7 +33,6 @@
3233
setup_session_and_batches_with_fixed_child,
3334
upload_offline_vaccination,
3435
)
35-
from .imms_api import authenticate_api
3636
from .onboarding import (
3737
national_reporting_onboarding,
3838
point_of_care_onboarding,

0 commit comments

Comments
 (0)