diff --git a/qa-core/src/config/public-api/TestConfiguration/PublicAPIClient.ts b/qa-core/src/config/public-api/TestConfiguration/PublicAPIClient.ts index 1f563e7ab5..0dfe74bb6a 100644 --- a/qa-core/src/config/public-api/TestConfiguration/PublicAPIClient.ts +++ b/qa-core/src/config/public-api/TestConfiguration/PublicAPIClient.ts @@ -59,11 +59,7 @@ class PublicAPIClient { // @ts-ignore const response = await fetch(`https://${process.env.TENANT_ID}.${this.host}${url}`, requestOptions) - if ( - response.status == 404 || - response.status == 500 || - response.status == 403 - ) { + if (response.status == 500 || response.status == 403) { console.error("Error in apiCall") console.error("Response:", response) const json = await response.json() diff --git a/qa-core/src/config/public-api/TestConfiguration/index.ts b/qa-core/src/config/public-api/TestConfiguration/index.ts index a869448b36..e67da27883 100644 --- a/qa-core/src/config/public-api/TestConfiguration/index.ts +++ b/qa-core/src/config/public-api/TestConfiguration/index.ts @@ -47,6 +47,8 @@ export default class TestConfiguration { } async setupAccountAndTenant() { + // This step is required to create a new account and tenant for the tests, its part of + // the support for running tests in multiple environments. const account = generateAccount() await this.accounts.validateEmail(account.email) await this.accounts.validateTenantId(account.tenantId) @@ -63,6 +65,7 @@ export default class TestConfiguration { await this.internalApplicationsApi.create(body) } + // After the account and tenant have been created, we need to get and set the API key for the test async setApiKey() { const apiKeyResponse = await this.auth.getApiKey() this.apiClient.setApiKey(apiKeyResponse.apiKey)