Created
May 7, 2020 17:37
-
-
Save backmeupplz/e4a2e3a2d796bedad4a01f0c999d39e4 to your computer and use it in GitHub Desktop.
Todorant UI test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// TodorantUITests.swift | |
// TodorantUITests | |
// | |
// Created by Nikita Kolmogorov on 2020-03-21. | |
// Copyright © 2020 Facebook. All rights reserved. | |
// | |
import XCTest | |
class TodorantUITests: XCTestCase { | |
override func setUp() { | |
super.setUp() | |
let app = XCUIApplication() | |
app.launchEnvironment = ProcessInfo.processInfo.environment | |
setupSnapshot(app, waitForAnimations: true) | |
app.launch() | |
} | |
func testScreenshots() { | |
let app = XCUIApplication() | |
sleep(20) | |
if deviceLanguage == "ru" { | |
app.buttons["Настройки, tab, 3 of 3"].tap() | |
sleep(2) | |
app.otherElements["delete"].tap() | |
sleep(2) | |
app.otherElements["add_ru"].tap() | |
sleep(8) | |
app.buttons["Текущее, tab, 1 of 3"].tap() | |
snapshot("1Current") | |
app.buttons["Планирование, tab, 2 of 3"].tap() | |
snapshot("2Planning") | |
sleep(2) | |
app.buttons["Настройки, tab, 3 of 3"].tap() | |
sleep(2) | |
app.otherElements["delete"].tap() | |
sleep(4) | |
app.buttons["Текущее, tab, 1 of 3"].tap() | |
snapshot("0Empty") | |
} else if deviceLanguage == "uk" { | |
<...> | |
} else if deviceLanguage == "it" { | |
<...> | |
} else { | |
app.buttons["Settings, tab, 3 of 3"].tap() | |
sleep(2) | |
app.otherElements["delete"].tap() | |
sleep(2) | |
app.otherElements["add_en"].tap() | |
sleep(8) | |
app.buttons["Current, tab, 1 of 3"].tap() | |
snapshot("1Current") | |
app.buttons["Planning, tab, 2 of 3"].tap() | |
snapshot("2Planning") | |
sleep(2) | |
app.buttons["Settings, tab, 3 of 3"].tap() | |
sleep(2) | |
app.otherElements["delete"].tap() | |
sleep(4) | |
app.buttons["Current, tab, 1 of 3"].tap() | |
snapshot("0Empty") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment