     }
 }
 
-extension XCTestCase {
-    
-    func wait(for duration: TimeInterval) {
-        let waitExpectation = expectation(description: "Waiting")
-        
-        let when = DispatchTime.now() + duration
-        DispatchQueue.main.asyncAfter(deadline: when) {
-            waitExpectation.fulfill()
-        }
-        
-        // We use a buffer here to avoid flakiness with Timer on CI
-        waitForExpectations(timeout: duration + 0.5)
-    }
-}
+//extension XCTestCase {
+//    
+//    func wait(for duration: TimeInterval) {
+//        let waitExpectation = expectation(description: "Waiting")
+//        
+//        let when = DispatchTime.now() + duration
+//        DispatchQueue.main.asyncAfter(deadline: when) {
+//            waitExpectation.fulfill()
+//        }
+//        
+//        // We use a buffer here to avoid flakiness with Timer on CI
+//        waitForExpectations(timeout: duration + 0.5)
+//    }
+//}

     
    private func checkResult(app: XCUIApplication, expectedSuccessText: String) {
        
        wait(for: 3)
        let successLabel = app.staticTexts["SuccessLabel"]
        let labelText: String = successLabel.label
        assert(labelText == expectedSuccessText)
    }

        app.buttons["CheckoutButton"].tap()
        
        // wait for payment type screen to load
        
        let ccButton = paymentTypeHelper.getCcButtonElement()
        
        let exists = NSPredicate(format: "exists == 1")
        expectation(for: exists, evaluatedWith: ccButton, handler: nil)
        waitForExpectations(timeout: 10, handler: nil)
        
        // make sure payment type buttons are visible
        paymentTypeHelper.checkPaymentTypes(expectedApplePay: true, expectedPayPal: true, expectedCC: true)
