From 81a250e17d71a4b2e79de73edfcce1f1a0d06e63 Mon Sep 17 00:00:00 2001 From: "rachel.kennedy13" Date: Thu, 20 Nov 2025 10:17:47 +0000 Subject: [PATCH 1/2] CCM-13184: Remove e2e tests --- Makefile | 10 --- README.md | 15 ---- ...ghtly-internal-dev-end-to-end-pipeline.yml | 58 --------------- azure/nightly-uat-end-to-end-pipeline.yml | 58 --------------- example.env | 12 ---- pytest.ini | 1 - tests/end_to_end/__init__.py | 0 tests/end_to_end/test_email.py | 60 ---------------- tests/end_to_end/test_letter.py | 69 ------------------ tests/end_to_end/test_nhsapp.py | 72 ------------------- tests/end_to_end/test_sms.py | 61 ---------------- tests/lib/assertions/assertions.py | 31 -------- tests/lib/constants/constants.py | 5 -- tests/lib/generators.py | 39 ---------- tests/lib/helper.py | 65 ----------------- 15 files changed, 556 deletions(-) delete mode 100644 azure/nightly-internal-dev-end-to-end-pipeline.yml delete mode 100644 azure/nightly-uat-end-to-end-pipeline.yml delete mode 100644 tests/end_to_end/__init__.py delete mode 100644 tests/end_to_end/test_email.py delete mode 100644 tests/end_to_end/test_letter.py delete mode 100644 tests/end_to_end/test_nhsapp.py delete mode 100644 tests/end_to_end/test_sms.py diff --git a/Makefile b/Makefile index fb62eeae1..8a6a7c2d1 100644 --- a/Makefile +++ b/Makefile @@ -203,16 +203,6 @@ mtls-test-prod: tests/mtls \ -m "mtlstest and inttest or prodtest" -e2e-test-internal-dev: - $(TEST_CMD) \ - tests/end_to_end \ - -m "e2e and devtest" - -e2e-test-uat: - $(TEST_CMD) \ - tests/end_to_end \ - -m "e2e and uattest" - .environment: @if [ -n "$(API_ENVIRONMENT)" ]; then \ printf "\n\nTests are running on $(API_ENVIRONMENT)\n\n\n"; \ diff --git a/README.md b/README.md index 417f4761d..aa77b1f8e 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,6 @@ The tests written in this repository target the NHS Notify API. The types of tes * Unit tests * Integration tests -* End to End tests * Zap security scan tests * Postman collection tests @@ -230,18 +229,6 @@ Available values for `PROXY_NAME` include: * `communications-manager-pr-{num}` * `communications-manager-pr-{num}-sandbox` -### Set Up End to End Tests - -If you are running the end to end tests you will need to set the following environment variables: - -* `GUKN_API_KEY` - Gov UK Notify API Key for the internal dev environment, this value can be found in AWS parameter store under /comms/govuknotify/internal-dev/api_key in the 'NHS Digital Comms Mgr Dev' account -* `UAT_GUKN_API_KEY` - Gov UK Notify API Key for the UAT environment, this value can be found in AWS parameter store under /comms/govuknotify/uat/api_key in the 'NHS Digital Comms Mgr Test' account -* `UAT_NHS_APP_USERNAME` - NHS App username, this value can be found on the [NHS App Test User and Environments](https://nhsd-confluence.digital.nhs.uk/display/RIS/NHS+Notify+%7C+NHS+App+Test+User+and+Environments) Confluence page -* `UAT_NHS_APP_PASSWORD` - NHS App password, this value can be found on the [NHS App Test User and Environments](https://nhsd-confluence.digital.nhs.uk/display/RIS/NHS+Notify+%7C+NHS+App+Test+User+and+Environments) Confluence page -* `UAT_NHS_APP_OTP` - NHS App one time passcode, this value can be found on the [NHS App Test User and Environments](https://nhsd-confluence.digital.nhs.uk/display/RIS/NHS+Notify+%7C+NHS+App+Test+User+and+Environments) Confluence page - -**When exporting values on your local machine, be sure to escape special characters i.e: `\! \# \$`** - ### Running Tests #### Unit Tests @@ -284,9 +271,7 @@ The table below lists common make commands used for testing: |-----------|-------|-----------| |internal-dev-sandbox|`make internal-sandbox-test`|Runs sandbox unit tests, sandbox postman tests and sandbox integration tests against internal-dev-sandbox| |internal-dev|`make internal-dev-test`|Runs integration tests against internal-dev| -|internal-dev|`make e2e-test-internal-dev`|Runs end to end tests against internal-dev| |internal-qa|`make internal-qa-test`|Runs integration tests against internal-qa| -|internal-qa|`make e2e-test-uat`|Runs end to end tests against internal-qa| |int|`make integration-test`|Runs integration tests against int| |prod|`make production-test`|Runs integration tests against prod| diff --git a/azure/nightly-internal-dev-end-to-end-pipeline.yml b/azure/nightly-internal-dev-end-to-end-pipeline.yml deleted file mode 100644 index 028a40664..000000000 --- a/azure/nightly-internal-dev-end-to-end-pipeline.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: "$(SourceBranchName)+$(BuildID)" - -trigger: none -pr: none - -parameters: - - name: DISABLE_VERSION_OVERRIDE - displayName: Disable version override - type: boolean - default: false - -resources: - repositories: - - repository: common - type: github - name: NHSDigital/api-management-utils - ref: refs/heads/edge - endpoint: NHSDigital - -schedules: - - cron: 0 2 * * * - displayName: 2am daily - branches: - include: ['release'] - always: true - -pool: - name: 'AWS-ECS' - -variables: - - template: project.yml - - name: SERVICE_ARTIFACT_NAME - value: '' - -steps: -# If display version override is not checked, checkout the latest version of release - - ${{ if eq(parameters.DISABLE_VERSION_OVERRIDE, false) }}: - - template: ./templates/checkout-latest-release.yml - parameters: - environment: 'internal-dev' - -# Set up the teams alert webhook - - template: ./templates/teams-alert-setup.yml - parameters: - webhook_uri: 'ALERTS_DEV_API_WEBHOOK_URI' - -# Executes the tests - - template: ./templates/run-tests.yml - parameters: - nightly: true - environment: 'internal-dev' - test_command: 'make e2e-test-internal-dev' - -# If the test run did not succeed posts an alert to teams - - template: ./templates/teams-alert.yml - parameters: - title: 'Internal Dev End to End' - webhook_uri: 'ALERTS_DEV_API_WEBHOOK_URI' \ No newline at end of file diff --git a/azure/nightly-uat-end-to-end-pipeline.yml b/azure/nightly-uat-end-to-end-pipeline.yml deleted file mode 100644 index 8f7e77b35..000000000 --- a/azure/nightly-uat-end-to-end-pipeline.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: "$(SourceBranchName)+$(BuildID)" - -trigger: none -pr: none - -parameters: - - name: DISABLE_VERSION_OVERRIDE - displayName: Disable version override - type: boolean - default: false - -resources: - repositories: - - repository: common - type: github - name: NHSDigital/api-management-utils - ref: refs/heads/edge - endpoint: NHSDigital - -schedules: - - cron: 0 2 * * * - displayName: 2am daily - branches: - include: ['release'] - always: true - -pool: - name: 'AWS-ECS' - -variables: - - template: project.yml - - name: SERVICE_ARTIFACT_NAME - value: '' - -steps: -# If display version override is not checked, checkout the latest version of release - - ${{ if eq(parameters.DISABLE_VERSION_OVERRIDE, false) }}: - - template: ./templates/checkout-latest-release.yml - parameters: - environment: 'internal-qa' - -# Set up the teams alert webhook - - template: ./templates/teams-alert-setup.yml - parameters: - webhook_uri: 'ALERTS_DEV_API_WEBHOOK_URI' - -# Executes the tests - - template: ./templates/run-tests.yml - parameters: - nightly: true - environment: 'internal-qa' - test_command: 'make e2e-test-uat' - -# If the test run did not succeed posts an alert to teams - - template: ./templates/teams-alert.yml - parameters: - title: 'UAT End to End' - webhook_uri: 'ALERTS_DEV_API_WEBHOOK_URI' \ No newline at end of file diff --git a/example.env b/example.env index 51ccd6b60..44d95ba39 100644 --- a/example.env +++ b/example.env @@ -37,18 +37,6 @@ export INTEGRATION_PRIVATE_KEY=xxx # private key used to generate authentication for tests ran against the prod environment export PRODUCTION_PRIVATE_KEY=xxx -# E2E Test Secrets -# ================ -# Gov UK Notify API Key used for polling GUKN communications in end to end tests -# Value can be found in SSM under/comms/uat/clients/apim_integration_test_client_id/client-metadata/govuknotify/api_key -export UAT_GUKN_API_KEY=xxx -# NHS App user details used to log in and verify messages in end to end tests -# Test user details can be found under https://nhsd-confluence.digital.nhs.uk/display/RIS/NHS+Notify+%7C+NHS+App+Test+User+and+Environments -# Note: Symbols must be escaped to be used, i.e Test£123 must be Test\£123 -export UAT_NHS_APP_USERNAME=nhsapp.aostest+yvette.bray@gmail.com -export UAT_NHS_APP_PASSWORD=xxx -export UAT_NHS_APP_OTP=xxx - # Postman Secrets # =============== # These are used to pull down changes made in the postman collection https://www.postman.com/nhs-communications-manager/communications-manager/ diff --git a/pytest.ini b/pytest.ini index c3055e2b0..9256683b8 100644 --- a/pytest.ini +++ b/pytest.ini @@ -3,7 +3,6 @@ python_files = *_tests.py test_*.py norecursedirs = .venv .eggs build dist utils addopts = --strict-markers markers = - e2e: end to end tests smoketest: suitable to run against all environments even production mtlstest: suitable to run against periodically against environments sandboxtest: suitable to run against sandbox environment diff --git a/tests/end_to_end/__init__.py b/tests/end_to_end/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/end_to_end/test_email.py b/tests/end_to_end/test_email.py deleted file mode 100644 index bd2f52c56..000000000 --- a/tests/end_to_end/test_email.py +++ /dev/null @@ -1,60 +0,0 @@ -import pytest -import os -from lib import Assertions, Helper, Generators -from lib.fixtures import * # NOSONAR -from notifications_python_client.notifications import NotificationsAPIClient - - -@pytest.mark.e2e -@pytest.mark.devtest -def test_email_end_to_end_internal_dev(url, bearer_token): - """ - .. include:: ../../partials/happy_path/test_email_end_to_end_internal_dev.rst - """ - headers = Generators.generate_valid_headers(bearer_token.value) - resp = Helper.send_single_message( - url, - headers, - Generators.generate_send_message_body("email", "internal-dev") - ) - - message_id = resp.json().get("data").get("id") - - Helper.poll_get_message( - url=url, - headers=headers, - message_id=message_id - ) - - notifications_client = NotificationsAPIClient(os.environ.get("GUKN_API_KEY")) - gov_uk_response = notifications_client.get_all_notifications("delivered").get("notifications") - - Assertions.assert_email_gov_uk(gov_uk_response, message_id) - - -@pytest.mark.e2e -@pytest.mark.uattest -def test_email_end_to_end_uat(url, bearer_token): - """ - .. include:: ../../partials/happy_path/test_email_end_to_end_uat.rst - """ - headers = Generators.generate_valid_headers(bearer_token.value) - - resp = Helper.send_single_message( - url, - headers, - Generators.generate_send_message_body("email", "internal-qa") - ) - - message_id = resp.json().get("data").get("id") - - Helper.poll_get_message( - url=url, - headers=headers, - message_id=message_id - ) - - notifications_client = NotificationsAPIClient(os.environ.get("UAT_GUKN_API_KEY")) - gov_uk_response = notifications_client.get_all_notifications("delivered").get("notifications") - - Assertions.assert_email_gov_uk(gov_uk_response, message_id) diff --git a/tests/end_to_end/test_letter.py b/tests/end_to_end/test_letter.py deleted file mode 100644 index 2d2f00a86..000000000 --- a/tests/end_to_end/test_letter.py +++ /dev/null @@ -1,69 +0,0 @@ -import pytest -import os -from lib import Assertions, Generators, Helper -from lib.fixtures import * # NOSONAR -from notifications_python_client.notifications import NotificationsAPIClient - - -@pytest.mark.e2e -@pytest.mark.devtest -def test_letter_end_to_end_internal_dev(url, bearer_token): - """ - .. include:: ../../partials/happy_path/test_letter_end_to_end_internal_dev.rst - """ - headers = Generators.generate_valid_headers(bearer_token.value) - - resp = Helper.send_single_message( - url, - headers, - Generators.generate_send_message_body("letter", "internal-dev"), - ) - - message_id = resp.json().get("data").get("id") - - Helper.poll_get_message( - url=url, - headers=headers, - message_id=message_id, - end_state="sending", - poll_time=595, - ) - - notifications_client = NotificationsAPIClient(os.environ.get("GUKN_API_KEY")) - gov_uk_response = notifications_client.get_all_notifications("received").get( - "notifications" - ) - - Assertions.assert_letter_gov_uk(gov_uk_response, message_id) - - -@pytest.mark.e2e -@pytest.mark.uattest -def test_letter_end_to_end_uat(url, bearer_token): - """ - .. include:: ../../partials/happy_path/test_letter_end_to_end_uat.rst - """ - headers = Generators.generate_valid_headers(bearer_token.value) - - resp = Helper.send_single_message( - url, - headers, - Generators.generate_send_message_body("letter", "internal-qa"), - ) - - message_id = resp.json().get("data").get("id") - - Helper.poll_get_message( - url=url, - headers=headers, - message_id=message_id, - end_state="sending", - poll_time=595, - ) - - notifications_client = NotificationsAPIClient(os.environ.get("UAT_GUKN_API_KEY")) - gov_uk_response = notifications_client.get_all_notifications("received").get( - "notifications" - ) - - Assertions.assert_letter_gov_uk(gov_uk_response, message_id) diff --git a/tests/end_to_end/test_nhsapp.py b/tests/end_to_end/test_nhsapp.py deleted file mode 100644 index 8eed80424..000000000 --- a/tests/end_to_end/test_nhsapp.py +++ /dev/null @@ -1,72 +0,0 @@ -import pytest -import uuid -from lib import Assertions, Generators, Helper -from lib.fixtures import * # NOSONAR - - -@pytest.mark.e2e -@pytest.mark.devtest -def test_nhsapp_end_to_end(url, bearer_token): - """ - .. include:: ../../partials/happy_path/test_nhsapp_end_to_end_internal_dev.rst - """ - headers = Generators.generate_valid_headers(bearer_token.value) - - resp = Helper.send_single_message( - url, - headers, - Generators.generate_send_message_body("nhsapp", "internal-dev") - ) - - message_id = resp.json().get("data").get("id") - - Helper.poll_get_message( - url=url, - headers=headers, - message_id=message_id - ) - - Assertions.assert_get_message_status( - Helper.get_message( - url, - headers, - message_id - ), - "delivered" - ) - - -@pytest.mark.e2e -@pytest.mark.uattest -def test_nhsapp_end_to_end_uat(url, bearer_token): - """ - .. include:: ../../partials/happy_path/test_nhsapp_end_to_end_uat.rst - """ - headers = Generators.generate_valid_headers(bearer_token.value) - personalisation = str(uuid.uuid1()) - - resp = Helper.send_single_message( - url, - headers, - Generators.generate_send_message_body("nhsapp", "internal-qa", personalisation) - ) - - message_id = resp.json().get("data").get("id") - - Helper.poll_get_message( - url=url, - headers=headers, - message_id=message_id, - end_state="sending" - ) - - Assertions.assert_get_message_status( - Helper.get_message( - url, - headers, - message_id - ), - "sending" - ) - - Helper.nhs_app_login_and_view_message(personalisation) diff --git a/tests/end_to_end/test_sms.py b/tests/end_to_end/test_sms.py deleted file mode 100644 index 7b304cd86..000000000 --- a/tests/end_to_end/test_sms.py +++ /dev/null @@ -1,61 +0,0 @@ -import pytest -import os -from lib import Assertions, Generators, Helper -from lib.fixtures import * # NOSONAR -from notifications_python_client.notifications import NotificationsAPIClient - - -@pytest.mark.e2e -@pytest.mark.devtest -def test_sms_end_to_end_internal_dev(url, bearer_token): - """ - .. include:: ../../partials/happy_path/test_sms_end_to_end_internal_dev.rst - """ - headers = Generators.generate_valid_headers(bearer_token.value) - - resp = Helper.send_single_message( - url, - headers, - Generators.generate_send_message_body("sms", "internal-dev") - ) - - message_id = resp.json().get("data").get("id") - - Helper.poll_get_message( - url=url, - headers=headers, - message_id=message_id - ) - - notifications_client = NotificationsAPIClient(os.environ.get("GUKN_API_KEY")) - gov_uk_response = notifications_client.get_all_notifications("delivered").get("notifications") - - Assertions.assert_sms_gov_uk(gov_uk_response, message_id) - - -@pytest.mark.e2e -@pytest.mark.uattest -def test_sms_end_to_end_uat(url, bearer_token): - """ - .. include:: ../../partials/happy_path/test_sms_end_to_end_uat.rst - """ - headers = Generators.generate_valid_headers(bearer_token.value) - - resp = Helper.send_single_message( - url, - headers, - Generators.generate_send_message_body("sms", "internal-qa") - ) - - message_id = resp.json().get("data").get("id") - - Helper.poll_get_message( - url=url, - headers=headers, - message_id=message_id - ) - - notifications_client = NotificationsAPIClient(os.environ.get("UAT_GUKN_API_KEY")) - gov_uk_response = notifications_client.get_all_notifications("delivered").get("notifications") - - Assertions.assert_sms_gov_uk(gov_uk_response, message_id) diff --git a/tests/lib/assertions/assertions.py b/tests/lib/assertions/assertions.py index a23d3a0ad..24be78d2e 100644 --- a/tests/lib/assertions/assertions.py +++ b/tests/lib/assertions/assertions.py @@ -130,37 +130,6 @@ def assert_200_valid_message_id_response_body(resp, message_id, url): assert actual == expected - @staticmethod - def assert_email_gov_uk(response, message_id): - for message in response: - if message_id in message.get("reference"): - assert message.get("status") == "delivered" - assert message.get("type") == "email" - assert message.get("body") is not None - assert message.get("subject") is not None - assert message.get("email_address") is not None - break - - @staticmethod - def assert_sms_gov_uk(response, message_id): - for message in response: - if message_id in message.get("reference"): - assert message.get("status") == "delivered" - assert message.get("type") == "sms" - assert message.get("body") is not None - assert message.get("phone_number") is not None - break - - @staticmethod - def assert_letter_gov_uk(response, message_id): - for message in response: - if message_id in message.get("reference"): - assert message.get("status") == "received" - assert message.get("type") == "letter" - assert message.get("subject") is not None - assert message.get("body") is not None - break - @staticmethod def assert_message_batches_idempotency(resp_one, resp_two): error_handler.handle_retry(resp_one) diff --git a/tests/lib/constants/constants.py b/tests/lib/constants/constants.py index 484cb86b3..a40b01518 100644 --- a/tests/lib/constants/constants.py +++ b/tests/lib/constants/constants.py @@ -28,11 +28,6 @@ "d66ace32-20c2-4aff-a1fc-9ffa3f9fa577" ] -NHS_APP_ROUTING_PLAN = "db0f0498-d331-4fd9-a460-4d2a2a95b416" -EMAIL_ROUTING_PLAN = "f757f27b-63ee-4059-ba94-571c41e99807" -SMS_ROUTING_PLAN = "83686da4-06c8-4cf2-aebe-abe1857fb750" -LETTER_ROUTING_PLAN = "e5edd3db-503e-4997-b870-88ac9215cb47" - METHODS = ["get", "post", "put", "patch", "delete", "head", "options"] CORRELATION_ID = ["76491414-d0cf-4655-ae20-a4d1368472f3"] CORRELATION_IDS = [None] + CORRELATION_ID diff --git a/tests/lib/generators.py b/tests/lib/generators.py index ea4a546a6..389275f84 100644 --- a/tests/lib/generators.py +++ b/tests/lib/generators.py @@ -83,45 +83,6 @@ def generate_valid_create_message_body(environment="sandbox"): } } - @staticmethod - def generate_send_message_body(channel, environment, personalisation="Hello"): - if environment == "internal-dev": - nhs_number = "9627193232" - if channel == "nhsapp": - nhs_number = "9842434109" - elif environment == "internal-qa": - nhs_number = "9730617953" - else: - raise ValueError(f"Invalid environment value provided: {environment}") - if channel == "nhsapp": - routing_plan_id = constants.NHS_APP_ROUTING_PLAN - elif channel == "email": - routing_plan_id = constants.EMAIL_ROUTING_PLAN - elif channel == "sms": - routing_plan_id = constants.SMS_ROUTING_PLAN - elif channel == "letter": - routing_plan_id = constants.LETTER_ROUTING_PLAN - else: - raise ValueError(f"Invalid channel value provided: {channel}") - return { - "data": { - "type": "Message", - "attributes": { - "routingPlanId": routing_plan_id, - "messageReference": str(uuid.uuid1()), - "recipient": { - "nhsNumber": nhs_number - }, - "originator": { - "odsCode": "X26" - }, - "personalisation": { - "exampleParameter": personalisation - } - } - } - } - @staticmethod def generate_invalid_value_error(pointer): return Generators.generate_error(constants.ERROR_INVALID_VALUE, source={ diff --git a/tests/lib/helper.py b/tests/lib/helper.py index 817523a20..dce3b1fa1 100644 --- a/tests/lib/helper.py +++ b/tests/lib/helper.py @@ -1,9 +1,5 @@ import requests import time -import os -import re -from install_playwright import install -from playwright.sync_api import expect, sync_playwright from lib.constants.messages_paths import MESSAGES_ENDPOINT from lib import error_handler @@ -11,18 +7,6 @@ class Helper(): - @staticmethod - def send_single_message(url, auth, body): - resp = requests.post(f"{url}{MESSAGES_ENDPOINT}", headers={ - **auth, - "Accept": DEFAULT_CONTENT_TYPE, - "Content-Type": DEFAULT_CONTENT_TYPE - }, json=body - ) - error_handler.handle_retry(resp) - assert resp.status_code == 201 - return resp - @staticmethod def get_message(url, headers, message_id): resp = requests.get(f"{url}{MESSAGES_ENDPOINT}/{message_id}", headers=headers) @@ -48,52 +32,3 @@ def poll_get_message(url, headers, message_id, end_state="delivered", poll_time= if message_status != end_state: raise TimeoutError(f"Request took too long to be processed. \ Message status: {message_status}, Message ID: {message_id}") - - @staticmethod - def nhs_app_login_and_view_message(personalisation): - email = os.environ.get("UAT_NHS_APP_USERNAME") - password = os.environ.get("UAT_NHS_APP_PASSWORD") - otp = os.environ.get("UAT_NHS_APP_OTP") - - with sync_playwright() as playwright: - install(playwright.chromium) - browser = playwright.chromium.launch() - page = browser.new_page() - page.set_default_timeout(15000) - expect.set_options(timeout=15000) - - page.goto("https://www-onboardingaos.nhsapp.service.nhs.uk/login") - - expect(page.get_by_role("heading", name="Access your NHS services")).to_be_visible() - page.get_by_role("button", name="Continue").click() - - expect(page.get_by_role("heading", name="Enter your email address")).to_be_visible() - page.get_by_label("Email address", exact=True).fill(email) - page.get_by_role("button", name="Continue").click() - - expect(page.get_by_role("heading", name="Enter your password")).to_be_visible() - page.get_by_label("Password", exact=True).fill(password) - page.get_by_role("button", name="Continue").click() - - expect(page.get_by_role("heading", name="Enter the security code")).to_be_visible() - page.get_by_label("Security code", exact=True).fill(otp) - page.get_by_role("button", name="Continue").click() - - page.wait_for_url('**/patient/') - - expect(page.get_by_text('NHS number: 973 061')).to_be_visible() - link_text = re.compile(r"You have \d+ unread messages") - page.get_by_role("link", name=link_text).click() - - expect(page.get_by_role("heading", name="Messages")).to_be_visible() - page.get_by_role("link", name="Your NHS healthcare services").click() - - expect(page.get_by_role("heading", name="Your messages")).to_be_visible() - - # There might several unread messages, we need to select the right one - page.locator(f'text="APIM end to end test: {personalisation} "').locator("..") \ - .locator("..").get_by_label("Unread message from NHS").click() - - page.wait_for_url("**/patient/messages/app-messaging/app-message?messageId=**") - expect(page.get_by_role("heading", name="NHS ENGLAND - X26")).to_be_visible() - expect(page.get_by_text(f"APIM end to end test: {personalisation}")).to_be_visible() From a62ddd31b5f14ebf0362a3f4a0178cb2515af36a Mon Sep 17 00:00:00 2001 From: "rachel.kennedy13" Date: Thu, 20 Nov 2025 10:29:58 +0000 Subject: [PATCH 2/2] CCM-13184: Remove references to e2e tests in test documentation --- docs/tests/end_to_end/gov_notify/email.md | 35 --------------------- docs/tests/end_to_end/gov_notify/index.md | 5 --- docs/tests/end_to_end/gov_notify/letter.md | 35 --------------------- docs/tests/end_to_end/gov_notify/sms.md | 35 --------------------- docs/tests/end_to_end/index.md | 8 ----- docs/tests/end_to_end/nhsapp/index.md | 3 -- docs/tests/end_to_end/nhsapp/nhsapp.md | 35 --------------------- docs/tests/index.md | 3 -- tests/docs/end_to_end/gov_notify/email.rst | 8 ----- tests/docs/end_to_end/gov_notify/index.rst | 9 ------ tests/docs/end_to_end/gov_notify/letter.rst | 8 ----- tests/docs/end_to_end/gov_notify/sms.rst | 8 ----- tests/docs/end_to_end/index.rst | 8 ----- tests/docs/end_to_end/nhsapp/index.rst | 7 ----- tests/docs/end_to_end/nhsapp/nhsapp.rst | 8 ----- tests/docs/index.rst | 1 - 16 files changed, 216 deletions(-) delete mode 100644 docs/tests/end_to_end/gov_notify/email.md delete mode 100644 docs/tests/end_to_end/gov_notify/index.md delete mode 100644 docs/tests/end_to_end/gov_notify/letter.md delete mode 100644 docs/tests/end_to_end/gov_notify/sms.md delete mode 100644 docs/tests/end_to_end/index.md delete mode 100644 docs/tests/end_to_end/nhsapp/index.md delete mode 100644 docs/tests/end_to_end/nhsapp/nhsapp.md delete mode 100644 tests/docs/end_to_end/gov_notify/email.rst delete mode 100644 tests/docs/end_to_end/gov_notify/index.rst delete mode 100644 tests/docs/end_to_end/gov_notify/letter.rst delete mode 100644 tests/docs/end_to_end/gov_notify/sms.rst delete mode 100644 tests/docs/end_to_end/index.rst delete mode 100644 tests/docs/end_to_end/nhsapp/index.rst delete mode 100644 tests/docs/end_to_end/nhsapp/nhsapp.rst diff --git a/docs/tests/end_to_end/gov_notify/email.md b/docs/tests/end_to_end/gov_notify/email.md deleted file mode 100644 index 4f05b22b5..000000000 --- a/docs/tests/end_to_end/gov_notify/email.md +++ /dev/null @@ -1,35 +0,0 @@ -# Email Tests - -These tests check that the system can proccess a request to a users email end to end - - -## Scenario: An API consumer sending a request to generate an email can confirm the message is delivered in Gov Notify in the Internal Dev environment - -**Given** the API consumer submits a request to generate an email -
-**When** the request is submitted -
-**Then** the response is a 201 success -
-**And** Gov Notify shows the message as delivered -
- -**Asserts** -- Response returns a 201 status code -- Message is present in Gov Notify as delivered - - -## Scenario: An API consumer sending a request to generate an email can confirm the message is delivered in Gov Notify in the UAT environment - -**Given** the API consumer submits a request to generate an email -
-**When** the request is submitted -
-**Then** the response is a 201 success -
-**And** Gov Notify shows the message as delivered -
- -**Asserts** -- Response returns a 201 status code -- Message is present in Gov Notify as delivered diff --git a/docs/tests/end_to_end/gov_notify/index.md b/docs/tests/end_to_end/gov_notify/index.md deleted file mode 100644 index b2a5006b3..000000000 --- a/docs/tests/end_to_end/gov_notify/index.md +++ /dev/null @@ -1,5 +0,0 @@ -# Gov Notify Tests - -* [Email Tests](email.md) -* [SMS Tests](sms.md) -* [Letter Tests](letter.md) diff --git a/docs/tests/end_to_end/gov_notify/letter.md b/docs/tests/end_to_end/gov_notify/letter.md deleted file mode 100644 index ce520c75b..000000000 --- a/docs/tests/end_to_end/gov_notify/letter.md +++ /dev/null @@ -1,35 +0,0 @@ -# Letter Tests - -These tests check that the system can proccess a request to a users postal address end to end - - -## Scenario: An API consumer sending a request to generate a letter can confirm the message is received in Gov Notify in the Internal Dev environment - -**Given** the API consumer submits a request to generate a letter -
-**When** the request is submitted -
-**Then** the response is a 201 success -
-**And** Gov Notify shows the message as received -
- -**Asserts** -- Response returns a 201 status code -- Message is present in Gov Notify as received - - -## Scenario: An API consumer sending a request to generate a letter can confirm the message is received in Gov Notify in the uat environment - -**Given** the API consumer submits a request to generate a letter -
-**When** the request is submitted -
-**Then** the response is a 201 success -
-**And** Gov Notify shows the message as received -
- -**Asserts** -- Response returns a 201 status code -- Message is present in Gov Notify as received diff --git a/docs/tests/end_to_end/gov_notify/sms.md b/docs/tests/end_to_end/gov_notify/sms.md deleted file mode 100644 index 2b1def3f1..000000000 --- a/docs/tests/end_to_end/gov_notify/sms.md +++ /dev/null @@ -1,35 +0,0 @@ -# SMS Tests - -These tests check that the system can proccess a request to a users SMS end to end - - -## Scenario: An API consumer sending a request to generate an SMS can confirm the message is delivered in Gov Notify in the Internal Dev environment - -**Given** the API consumer submits a request to generate an SMS -
-**When** the request is submitted -
-**Then** the response is a 201 success -
-**And** Gov Notify shows the message as delivered -
- -**Asserts** -- Response returns a 201 status code -- Message is present in Gov Notify as delivered - - -## Scenario: An API consumer sending a request to generate an SMS can confirm the message is delivered in Gov Notify in the UAT environment - -**Given** the API consumer submits a request to generate an SMS -
-**When** the request is submitted -
-**Then** the response is a 201 success -
-**And** Gov Notify shows the message as delivered -
- -**Asserts** -- Response returns a 201 status code -- Message is present in Gov Notify as delivered diff --git a/docs/tests/end_to_end/index.md b/docs/tests/end_to_end/index.md deleted file mode 100644 index c38b28eb2..000000000 --- a/docs/tests/end_to_end/index.md +++ /dev/null @@ -1,8 +0,0 @@ -# End to end test suite - -* [Gov Notify Tests](gov_notify/index.md) - * [Email Tests](gov_notify/email.md) - * [SMS Tests](gov_notify/sms.md) - * [Letter Tests](gov_notify/letter.md) -* [NHS App Tests](nhsapp/index.md) - * [NHS App Tests](nhsapp/nhsapp.md) diff --git a/docs/tests/end_to_end/nhsapp/index.md b/docs/tests/end_to_end/nhsapp/index.md deleted file mode 100644 index 0061a1c3e..000000000 --- a/docs/tests/end_to_end/nhsapp/index.md +++ /dev/null @@ -1,3 +0,0 @@ -# NHS App Tests - -* [NHS App Tests](nhsapp.md) diff --git a/docs/tests/end_to_end/nhsapp/nhsapp.md b/docs/tests/end_to_end/nhsapp/nhsapp.md deleted file mode 100644 index 40fcbb827..000000000 --- a/docs/tests/end_to_end/nhsapp/nhsapp.md +++ /dev/null @@ -1,35 +0,0 @@ -# NHS App Tests - -These tests check that the system can proccess a request to a users nhs app account end to end - - -## Scenario: An API consumer sending a request to generate an nhs app message can confirm the message is delivered in the Internal Dev environment - -**Given** the API consumer submits a request to generate an NHS App message -
-**When** the request is submitted -
-**Then** the response is a 201 success -
-**And** The GET message endpoint shows the message as delivered -
- -**Asserts** -- Response returns a 201 status code -- Message is reported as delivered by the GET message endpoint - - -## Scenario: An API consumer sending a request to generate an nhs app message can confirm the message is delivered in the UAT environment - -**Given** the API consumer submits a request to generate an NHS App message -
-**When** the request is submitted -
-**Then** the response is a 201 success -
-**And** The message is delivered to the users NHS App account -
- -**Asserts** -- Response returns a 201 status code -- Message is reported as delivered by the GET message endpoint diff --git a/docs/tests/index.md b/docs/tests/index.md index f73c16b74..96b6cef7b 100644 --- a/docs/tests/index.md +++ b/docs/tests/index.md @@ -1,8 +1,5 @@ # Test Suite -* [End to end test suite](end_to_end/index.md) - * [Gov Notify Tests](end_to_end/gov_notify/index.md) - * [NHS App Tests](end_to_end/nhsapp/index.md) * [POST /v1/message-batches](post_v1_message-batches/index.md) * [Validation Tests](post_v1_message-batches/validation.md) * [Invalid Routing Plans](post_v1_message-batches/invalid_routing_plans.md) diff --git a/tests/docs/end_to_end/gov_notify/email.rst b/tests/docs/end_to_end/gov_notify/email.rst deleted file mode 100644 index 486b87309..000000000 --- a/tests/docs/end_to_end/gov_notify/email.rst +++ /dev/null @@ -1,8 +0,0 @@ -Email Tests -=========== - -These tests check that the system can proccess a request to a users email end to end - -.. automodule:: end_to_end.test_email - :noindex: - :members: diff --git a/tests/docs/end_to_end/gov_notify/index.rst b/tests/docs/end_to_end/gov_notify/index.rst deleted file mode 100644 index 14a144cd7..000000000 --- a/tests/docs/end_to_end/gov_notify/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -Gov Notify Tests -================ - -.. toctree:: - :maxdepth: 1 - - email - sms - letter \ No newline at end of file diff --git a/tests/docs/end_to_end/gov_notify/letter.rst b/tests/docs/end_to_end/gov_notify/letter.rst deleted file mode 100644 index 3079ae3bd..000000000 --- a/tests/docs/end_to_end/gov_notify/letter.rst +++ /dev/null @@ -1,8 +0,0 @@ -Letter Tests -============ - -These tests check that the system can proccess a request to a users postal address end to end - -.. automodule:: end_to_end.test_letter - :noindex: - :members: diff --git a/tests/docs/end_to_end/gov_notify/sms.rst b/tests/docs/end_to_end/gov_notify/sms.rst deleted file mode 100644 index d99b6f23e..000000000 --- a/tests/docs/end_to_end/gov_notify/sms.rst +++ /dev/null @@ -1,8 +0,0 @@ -SMS Tests -=========== - -These tests check that the system can proccess a request to a users SMS end to end - -.. automodule:: end_to_end.test_sms - :noindex: - :members: diff --git a/tests/docs/end_to_end/index.rst b/tests/docs/end_to_end/index.rst deleted file mode 100644 index ad10102e7..000000000 --- a/tests/docs/end_to_end/index.rst +++ /dev/null @@ -1,8 +0,0 @@ -End to end test suite -===================== - -.. toctree:: - :maxdepth: 2 - - gov_notify/index.rst - nhsapp/index.rst diff --git a/tests/docs/end_to_end/nhsapp/index.rst b/tests/docs/end_to_end/nhsapp/index.rst deleted file mode 100644 index be0f8069b..000000000 --- a/tests/docs/end_to_end/nhsapp/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -NHS App Tests -============= - -.. toctree:: - :maxdepth: 1 - - nhsapp diff --git a/tests/docs/end_to_end/nhsapp/nhsapp.rst b/tests/docs/end_to_end/nhsapp/nhsapp.rst deleted file mode 100644 index 1049cd8fb..000000000 --- a/tests/docs/end_to_end/nhsapp/nhsapp.rst +++ /dev/null @@ -1,8 +0,0 @@ -NHS App Tests -============= - -These tests check that the system can proccess a request to a users nhs app account end to end - -.. automodule:: end_to_end.test_nhsapp - :noindex: - :members: diff --git a/tests/docs/index.rst b/tests/docs/index.rst index 0f4cf856d..36b7a3731 100644 --- a/tests/docs/index.rst +++ b/tests/docs/index.rst @@ -4,7 +4,6 @@ Test Suite .. toctree:: :maxdepth: 2 - end_to_end/index post_v1_message-batches/index post_v1_single-message/index get_v1_messages/index