From 3c3dd9c95a7e64c0ace24ae69290b2cd3d8ef8d5 Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Tue, 1 Aug 2023 16:46:11 +0100 Subject: [PATCH] Updating test - performs signup and deletion flow Including two more steps within this test. - Verify the self response is unauthorized - Verify the self response matches the account This will cover the '/api/auth/self' endpoint --- .../src/account-api/tests/accounts/accounts.cloud.spec.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qa-core/src/account-api/tests/accounts/accounts.cloud.spec.ts b/qa-core/src/account-api/tests/accounts/accounts.cloud.spec.ts index 9455bf4b19..a0b5198f03 100644 --- a/qa-core/src/account-api/tests/accounts/accounts.cloud.spec.ts +++ b/qa-core/src/account-api/tests/accounts/accounts.cloud.spec.ts @@ -45,9 +45,15 @@ describe("Accounts", () => { // Send the verification request await config.accountsApi.accounts.verifyAccount(code!) + // Verify self response is unauthorized + await config.api.accounts.self({ status: 403 }) + // Can now log in to the account await config.loginAsAccount(createAccountRequest) + // Verify self response matches account + await config.api.accounts.self() + // Delete account await config.api.accounts.deleteCurrentAccount()