     func testPurchaseAsIdentifiedThenLogOutThenRestoreGrantsEntitlements() {
         var completionCalled = false
         let existingUserID = UUID().uuidString
-        expect(self.purchasesDelegate.customerInfoUpdateCount).toEventually(equal(1), timeout: .seconds(10))
+        self.waitUntilCustomerInfoIsUpdated()
 
         Purchases.shared.logIn(existingUserID) { logInCustomerInfo, created, logInError in
             self.purchaseMonthlyOffering()

    func assertNoPurchases(_ customerInfo: CustomerInfo?) {
        expect(customerInfo?.entitlements.all.count) == 0
    }
    
}

    func testPurchaseMadeBeforeLogInWithExistingUserIsNotRetainedUnlessRestoreCalled() {
        var completionCalled = false
        let existingUserID = "\(#function)\(UUID().uuidString)"
        self.waitUntilCustomerInfoIsUpdated()

        // log in to create the user, then log out
        Purchases.shared.logIn(existingUserID) { logInCustomerInfo, created, logInError in
