Tusker/TuskerUITests/OnboardingTests.swift

39 lines
1019 B
Swift

//
// OnboardingTests.swift
// TuskerUITests
//
// Created by Shadowfacts on 12/21/19.
// Copyright © 2019 Shadowfacts. All rights reserved.
//
import XCTest
import Ambassador
class OnboardingTests: TuskerUITests {
override func setUp() {
super.setUp()
router["/api/v1/instance"] = JSONResponse(handler: { (_) in
return [
"description": "An instance description",
"max_toot_chars": 500,
"thumbnail": "http://localhost:8080/thumbnail.png",
"title": "Localhost",
"uri": "http://localhost:8080",
"version": "2.7.2",
"urls": [:]
]
})
}
func testExample() {
let searchField = app.searchFields.element
searchField.tap()
searchField.typeText("http://localhost:8080")
XCTAssertTrue(app.staticTexts["localhost"].exists)
XCTAssertTrue(app.staticTexts["An instance description"].exists)
}
}