From 655073715cd1ee6a545b17dda8625a77d187f678 Mon Sep 17 00:00:00 2001 From: gonzalojaubert Date: Mon, 27 Nov 2023 16:19:21 +0000 Subject: [PATCH] fix integration test --- .../provider-unaware/end-to-end/entities.integration.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/framework-integration-tests/integration/provider-unaware/end-to-end/entities.integration.ts b/packages/framework-integration-tests/integration/provider-unaware/end-to-end/entities.integration.ts index f9c76b6bc..a69438066 100644 --- a/packages/framework-integration-tests/integration/provider-unaware/end-to-end/entities.integration.ts +++ b/packages/framework-integration-tests/integration/provider-unaware/end-to-end/entities.integration.ts @@ -1,14 +1,12 @@ import { ApolloClient, NormalizedCacheObject, gql } from '@apollo/client' import { random, commerce, finance, lorem, internet } from 'faker' import { expect } from 'chai' -import { sleep, waitForIt } from '../../helper/sleep' +import { waitForIt } from '../../helper/sleep' import { applicationUnderTest } from './setup' import { UUID } from '@boostercloud/framework-types' import { NEW_CART_IDS, QUANTITY_AFTER_DATA_MIGRATION_V2, QUANTITY_TO_MIGRATE_DATA } from '../../../src/constants' import { ProductType } from '../../../src/entities/product' -const secs = 10 - describe('Entities end-to-end tests', () => { let client: ApolloClient let userToken: string @@ -147,9 +145,6 @@ describe('Entities end-to-end tests', () => { `, }) - console.log(`Waiting ${secs} second${secs > 1 ? 's' : ''} for deletion to complete...`) - await sleep(secs * 1000) - client = applicationUnderTest.graphql.client(userToken) // Retrieve updated entity const queryResult = await waitForIt( @@ -178,7 +173,7 @@ describe('Entities end-to-end tests', () => { `, }) }, - () => true + (result) => !result?.data?.ProductReadModel ) const productData = queryResult.data.ProductReadModel