From 082d95a6728f5b5318ddc4096e9b45cf7ecfd798 Mon Sep 17 00:00:00 2001 From: Sean Steberis <103416906+seansteberisal@users.noreply.github.com> Date: Thu, 26 Sep 2024 09:45:25 +0100 Subject: [PATCH] Fix: [AEA-0000] - fix for running in sandbox (#163) ## Summary **Remove items from this list if they are not relevant. Remove this line once this has been done** - Routine Change ### Details Add any summary information of what is in the change. **Remove this line if you have nothing to add.** ## Pull Request Naming Pull requests should be named using the following format: ```text Tag: [AEA-NNNN] - Short description ``` Tag can be one of: - `Fix` - for a bug fix. (Patch release) - `Update` - either for a backwards-compatible enhancement or for a rule change that adds reported problems. (Patch release) - `New` - implemented a new feature. (Minor release) - `Breaking` - for a backwards-incompatible enhancement or feature. (Major release) - `Docs` - changes to documentation only. (Patch release) - `Build` - changes to build process only. (No release) - `Upgrade` - for a dependency upgrade. (Patch release) - `Chore` - for refactoring, adding tests, etc. (anything that isn't user-facing). (Patch release) If the current release is x.y.z then - a patch release increases z by 1 - a minor release increases y by 1 - a major release increases x by 1 Correct tagging is necessary for our automated versioning and release process ([Release](./RELEASE.md)). The description of your pull request will be used as the commit message for the merge, and also be included in the changelog. Please ensure that your title is sufficiently descriptive. ### Rerunning Checks If you need to rename your pull request, you can restart the checks by either: - Closing and reopening the pull request - pushing an empty commit ```bash git commit --allow-empty -m 'trigger build' git push ``` - Amend your last commit and force push to the branch ```bash git commit --amend --no-edit git push --force ``` Rerunning the checks from within the pull request will not use the updated title. --- features/steps/eps_api_steps.py | 2 ++ features/steps/pfp_api_steps.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/features/steps/eps_api_steps.py b/features/steps/eps_api_steps.py index 0b06b670..b081599a 100644 --- a/features/steps/eps_api_steps.py +++ b/features/steps/eps_api_steps.py @@ -19,6 +19,8 @@ @given("I successfully prepare and sign a prescription") def i_prepare_and_sign_a_prescription(context): + if "sandbox" in context.config.userdata["env"].lower() and context.config.userdata["product"].upper() != "EPS-FHIR": + return i_prepare_a_new_prescription(context, "nominated") i_sign_a_new_prescription(context=context) diff --git a/features/steps/pfp_api_steps.py b/features/steps/pfp_api_steps.py index eabf71c9..822a9602 100644 --- a/features/steps/pfp_api_steps.py +++ b/features/steps/pfp_api_steps.py @@ -17,6 +17,11 @@ def i_am_authenticated(context): @when("I request my prescriptions") def i_request_my_prescriptions(context): + if ( + "sandbox" in context.config.userdata["env"].lower() + and "PFP" in context.config.userdata["product"].upper() + ): + context.nhs_number = "9449304130" get_prescriptions(context)