From 470aea749d755a1f74e174ad6ac99dde6b43eca6 Mon Sep 17 00:00:00 2001 From: Robert Ing Date: Thu, 10 Oct 2024 15:04:00 -0400 Subject: [PATCH] add waitForCondition --- test/src/tests-identity.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/src/tests-identity.ts b/test/src/tests-identity.ts index e2358ca9..ebe578af 100644 --- a/test/src/tests-identity.ts +++ b/test/src/tests-identity.ts @@ -639,6 +639,9 @@ describe('identity', function() { mParticle.init(apiKey, window.mParticle.config); + waitForCondition(hasLoginReturned) + .then(() => { + const cookiesAfterInit = findCookie(); cookiesAfterInit.should.have.properties('gs', 'cu', testMPID); @@ -705,6 +708,7 @@ describe('identity', function() { }); done(); + }) }).catch(done); }); });