import XCTest
class WelcomeTests: OXTestCase {
func testVisibilityOfEssentialElements() {
let title = app.staticTexts[AccessibilityIdentifiers.Welcome.title].firstMatch
XCTAssert(title.isHittable, "Expected the title to be presented")
let linkCardButton = app.buttons[AccessibilityIdentifiers.Welcome.linkCardButton].firstMatch
XCTAssert(linkCardButton.isHittable, "Expected the link card button to be presented")
let getNewCardButton = app.buttons[AccessibilityIdentifiers.Welcome.getNewCard].firstMatch //This is "Login" button on the Welcome Screen
XCTAssert(getNewCardButton.isHittable, "Expected the get new card button to be presented")
getNewCardButton.tap()
let loginInputField = app.textFields[AccessibilityIdentifiers.LoginForm.loginInputField].firstMatch
XCTAssert(loginInputField.isHittable, "Expected the login field to be presented")
loginInputField.typeText("5512345678")
let passwordInputField = app.otherElements[AccessibilityIdentifiers.LoginForm.passwordInputField].firstMatch
XCTAssert(passwordInputField.exists, "Expected the password field to be presented")
passwordInputField.tap()
passwordInputField.typeText("password")
}
}