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
4 changes: 2 additions & 2 deletions .github/actions/acceptance-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ runs:
steps:

- name: Run component tests
if: ${{ inputs.testType != 'e2e' }}
if: ${{ inputs.testType == 'component' }}
uses: ./.github/actions/acceptance-tests-component
with:
testType: ${{ inputs.testType }}
targetEnvironment: ${{ inputs.targetEnvironment }}
targetComponent: ${{ inputs.targetComponent }}

- name: Run e2e tests
if: ${{ inputs.testType == 'e2e' && inputs.targetEnvironment == 'main' }}
if: ${{ inputs.testType == 'e2e' }}
uses: ./.github/actions/acceptance-tests-e2e
with:
targetEnvironment: ${{ inputs.targetEnvironment }}
3 changes: 2 additions & 1 deletion .github/actions/build-proxies/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,5 @@ runs:
--apimEnvironment "${{ env.APIM_ENV }}" \
--boundedContext "notify-supplier" \
--targetDomain "$TARGET_DOMAIN" \
--version "${{ inputs.version }}"
--version "${{ inputs.version }}" \
--internalRef "feature/CCM-17012" # TO BE REMOVED - used to trigger workflow until internal branch merges
1 change: 1 addition & 0 deletions .github/workflows/deploy-dynamic-env-proxy.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Test
name: Deploy dynamic PR environment proxy
run-name: Deploy proxy for PR environment on internal-dev by @${{ github.actor }}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { expect, test } from "@playwright/test";
import getRestApiGatewayBaseUrl from "tests/helpers/aws-gateway-helper";
import { pollForLetterStatus } from "tests/helpers/poll-for-letters-helper";
import { getLettersFromQueueViaIndex } from "tests/helpers/generate-fetch-test-data";
import {
getVariantsWithUrgency,
sendEventsForVariants,
Expand Down Expand Up @@ -44,12 +43,6 @@ test.describe("Urgent Letter Priority Tests", () => {
await verifyAllocationLogsContainPriority(urgencyNineLetterIds, 9);
await verifyAllocationLogsContainPriority(urgencyTenLetterIds, 10);

const lettersFromQueue = await getLettersFromQueueViaIndex(supplier);

const letterIdsFromQueue = lettersFromQueue.map(
(letter) => letter.letterId,
);

const header = createValidRequestHeaders(supplier);
const response = await request.get(`${baseUrl}/${SUPPLIER_LETTERS}`, {
headers: header,
Expand All @@ -63,10 +56,9 @@ test.describe("Urgent Letter Priority Tests", () => {
GetLettersResponseSchema.parse(responseBody);

const letterIds = getLettersResponse.data.map((letter) => letter.id);
expect(letterIds).toEqual(letterIdsFromQueue);

verifyIndexPositionOfLetterVariants(
letterIdsFromQueue,
letterIds,
urgencyTenLetterIds,
urgencyNineLetterIds,
);
Expand Down
3 changes: 2 additions & 1 deletion tests/e2e-tests/api/data/test_get_letter_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
@pytest.mark.devtest
@pytest.mark.inttest
@pytest.mark.prodtest
def test_200_get_letter_status(url, authentication_secret):
def test_200_get_letter_data(url, authentication_secret):
headers = Generators.generate_valid_headers(authentication_secret)
ids = get_pending_letter_ids(url, headers, LETTERS_ENDPOINT, limit=1)

print(f"calling GET {url}/{LETTERS_ENDPOINT}/{ids[0]}/data with headers {headers}")
get_letter_data = requests.get(f"{url}/{LETTERS_ENDPOINT}/{ids[0]}/data", headers=headers)

ErrorHandler.handle_retry(get_letter_data)
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e-tests/api/letters/test_get_letter_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ def test_200_get_letter_status(url, authentication_secret):
ids = get_pending_letter_ids(url, headers, LETTERS_ENDPOINT, limit=1)
letter_id = ids[0]

print(f"calling GET {url}/{LETTERS_ENDPOINT}/{letter_id} with headers {headers}")
get_message_response = requests.get(f"{url}/{LETTERS_ENDPOINT}/{letter_id}", headers=headers)

ErrorHandler.handle_retry(get_message_response)
assert get_message_response.status_code == 200, f"Response: {get_message_response.status_code}: {get_message_response.text}"


@pytest.mark.test
@pytest.mark.devtest
@pytest.mark.inttest
Expand Down
1 change: 1 addition & 0 deletions tests/e2e-tests/lib/letters.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def get_pending_letter_ids(
response.raise_for_status()
data.extend(response.json().get("data", []))
if len(data) >= limit:
print(f"Created and found letters with IDs {[item.get('id') for item in data]}")
return [item.get("id") for item in data]
time.sleep(interval_s)

Expand Down
Loading