         app.launchArguments.append("-CardDisabled")
         app.launch()
         sleep(1)
-        self.waitForElementToBeHittable(app.buttons["Add Payment Method"])
+        waitForElementToBeHittable(app.buttons["Add Payment Method"])
         app.buttons["Add Payment Method"].tap()
     }
 
     func testDropIn_cardDisabledOption_disablesCreditCard() {
-        XCTAssertTrue(app.staticTexts["PayPal"].exists);
-        XCTAssertFalse(app.staticTexts["Credit or Debit Card"].exists);
+        XCTAssertTrue(app.staticTexts["PayPal"].exists)
+        XCTAssertFalse(app.staticTexts["Credit or Debit Card"].exists)
     }
 }
 

        app.launch()
        sleep(1)

        self.waitForElementToBeHittable(app.buttons["Add Payment Method"])
        app.buttons["Add Payment Method"].tap()

        self.waitForElementToBeHittable(app.staticTexts["Credit or Debit Card"])
        app.staticTexts["Credit or Debit Card"].tap()
    }
    

        app.launchArguments.append("-ThreeDSecureDefault")
        app.launch()
        sleep(1)
        waitForElementToBeHittable(app.buttons["Add Payment Method"])
        app.buttons["Add Payment Method"].tap()
    }
    
    func testDropIn_dismissesWhenCancelled() {
        waitForElementToBeHittable(app.buttons["Cancel"])
        app.buttons["Cancel"].forceTapElement()
        XCTAssertTrue(app.buttons["Cancelled🎲"].exists)
    }
    
    func testDropIn_displaysPaymentOptions_applePay_card_payPal() {
        waitForElementToBeHittable(app.staticTexts["Credit or Debit Card"])
        sleep(1)
        XCTAssertTrue(app.staticTexts["Credit or Debit Card"].exists)
        XCTAssertTrue(app.staticTexts["PayPal"].exists)
        XCTAssertTrue(app.staticTexts["Apple Pay"].exists)
    }
    
    func testDropIn_cardInput_receivesNonce() {
        waitForElementToBeHittable(app.staticTexts["Credit or Debit Card"])
        app.staticTexts["Credit or Debit Card"].tap()
        
        let elementsQuery = app.scrollViews.otherElements
        let cardNumberTextField = elementsQuery.textFields["Card Number"]
        
        waitForElementToBeHittable(cardNumberTextField)
        cardNumberTextField.typeText("4111111111111111")
        
        waitForElementToBeHittable(app.staticTexts[Date.getNextYear()])
        app.staticTexts["11"].forceTapElement()
        app.staticTexts[Date.getNextYear()].forceTapElement()
        
        let securityCodeField = elementsQuery.textFields["CVV"]
        waitForElementToBeHittable(securityCodeField)
        securityCodeField.forceTapElement()
        securityCodeField.typeText("123")
        
        let postalCodeField = elementsQuery.textFields["12345"]
        waitForElementToBeHittable(postalCodeField)
        postalCodeField.forceTapElement()
        postalCodeField.typeText("12345")
        
        app.buttons["Add Card"].forceTapElement()
        
        waitForElementToAppear(app.staticTexts["ending in 11"])
        
        XCTAssertTrue(app.staticTexts["ending in 11"].exists)
    }
    
    func testDropIn_cardInput_showsInvalidState_withInvalidCardNumber() {
        waitForElementToBeHittable(app.staticTexts["Credit or Debit Card"])
        app.staticTexts["Credit or Debit Card"].tap()
        
        let elementsQuery = app.scrollViews.otherElements
        let cardNumberTextField = elementsQuery.textFields["Card Number"]
        
        waitForElementToBeHittable(cardNumberTextField)
        cardNumberTextField.typeText("4141414141414141")
        
        waitForElementToAppear(elementsQuery.staticTexts["You must provide a valid Card Number."])
    }
    
    func testDropIn_cardInput_hidesInvalidCardNumberState_withDeletion() {
        waitForElementToBeHittable(app.staticTexts["Credit or Debit Card"])
        app.staticTexts["Credit or Debit Card"].tap()
        
        let elementsQuery = app.scrollViews.otherElements
        let cardNumberTextField = elementsQuery.textFields["Card Number"]
        
        waitForElementToBeHittable(cardNumberTextField)
        cardNumberTextField.typeText("4141414141414141")
        
        waitForElementToAppear(elementsQuery.staticTexts["You must provide a valid Card Number."])
        
        cardNumberTextField.typeText("\u{8}")
        
        XCTAssertFalse(elementsQuery.textFields["Invalid: Card Number"].exists)
    }
}

