Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: [AEA-000] - skip some steps for sandbox #165

Merged
merged 10 commits into from
Oct 2, 2024
Merged
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
14 changes: 12 additions & 2 deletions features/steps/eps_api_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def a_prescription_has_been_created_and_released(context):

@given("a new prescription has been dispensed")
def a_new_prescription_has_been_dispensed(context):
if "sandbox" in context.config.userdata["env"].lower():
return
a_prescription_has_been_created_and_released(context)
i_dispense_the_prescription(context)
indicate_successful_response(context)
Expand Down Expand Up @@ -79,6 +81,8 @@ def i_release_the_prescription(context):

@when("I return the prescription")
def i_return_the_prescription(context):
if "sandbox" in context.config.userdata["env"].lower():
return
return_prescription(context)


Expand All @@ -89,21 +93,29 @@ def i_cancel_all_line_items(context):

@when("I dispense the prescription")
def i_dispense_the_prescription(context):
if "sandbox" in context.config.userdata["env"].lower():
return
dispense_prescription(context)


@when("I amend the dispense notification")
def i_amend_a_dispense_notification(context):
if "sandbox" in context.config.userdata["env"].lower():
return
amend_dispense_notification(context)


@when("I withdraw the dispense notification")
def i_withdraw_the_dispense_notification(context):
if "sandbox" in context.config.userdata["env"].lower():
return
withdraw_dispense_notification(context)


@then("the response body indicates a successful {action_type} action")
def body_indicates_successful_action(context, action_type):
if "sandbox" in context.config.userdata["env"].lower():
return
def _withdraw_dispense_notification_assertion():
i_can_see_an_informational_operation_outcome_in_the_response(context)

Expand All @@ -127,8 +139,6 @@ def _amend_dispense_assertion():
i_can_see_an_informational_operation_outcome_in_the_response(context)

def _release_assertion():
if "sandbox" in context.config.userdata["env"].lower():
return
assert_that(json_response["parameter"][0]["resource"]["total"]).is_equal_to(1)

def _return_assertion():
Expand Down