Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ test.beforeAll(async () => {
apiContext = await playwrightRequest.newContext();
console.log(`Running ${TEST_TYPE} tests with scenario tags: ${scopedTestScenario}`);
await cleanupDatabaseFromAPI(apiContext, addData.nhsNumbers);
await cleanupWireMock(apiContext);

const dateMap = generateDynamicDateMap();
const updatedParticipantRecords = replaceDynamicDatesInJson(addData.inputParticipantRecords, dateMap);
Expand All @@ -36,7 +37,6 @@ test.beforeAll(async () => {
});

test.afterAll(async () => {
await cleanupWireMock(apiContext);
await apiContext.dispose();
});

Expand Down
3 changes: 3 additions & 0 deletions tests/playwright-tests/src/tests/steps/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export async function validateSqlDatabaseFromAPI(request: APIRequestContext, val
export async function validateServiceNowRequestWithMockServer(request: APIRequestContext, validations: ServiceNowRequestValidations[]) {
const wireMockUrl = getWireMockUrl();

// Wait for 5 seconds
await new Promise((resolve) => setTimeout(resolve, 5000));

var response = await request.get(wireMockUrl);
var body = await response.json() as WireMockResponse;

Expand Down
Loading