Erste Alpha-Version
This commit is contained in:
committed by
Dr. Michael Kübler
parent
93feb97739
commit
223bf746ef
@@ -1,43 +1,30 @@
|
||||
//
|
||||
// MikeMailUITests.swift
|
||||
// MikeMailUITests
|
||||
//
|
||||
// Created by Dr. med. Michael Kübler on 06.11.26.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
import XCUIAutomation
|
||||
|
||||
final class MikeMailUITests: XCTestCase {
|
||||
|
||||
override func setUpWithError() throws {
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
|
||||
// In UI tests it is usually best to stop immediately when a failure occurs.
|
||||
@MainActor
|
||||
func testMailWindowAndCompose() throws {
|
||||
continueAfterFailure = false
|
||||
|
||||
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
|
||||
}
|
||||
|
||||
override func tearDownWithError() throws {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
@MainActor
|
||||
func testExample() throws {
|
||||
// UI tests must launch the application that they test.
|
||||
let app = XCUIApplication()
|
||||
app.launchArguments = ["-ApplePersistenceIgnoreState", "YES"]
|
||||
app.launch()
|
||||
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
||||
// XCUIAutomation Documentation
|
||||
// https://developer.apple.com/documentation/xcuiautomation
|
||||
}
|
||||
|
||||
@MainActor
|
||||
func testLaunchPerformance() throws {
|
||||
// This measures how long it takes to launch your application.
|
||||
measure(metrics: [XCTApplicationLaunchMetric()]) {
|
||||
XCUIApplication().launch()
|
||||
}
|
||||
app.activate()
|
||||
XCTAssertTrue(app.buttons["Neue Nachricht"].waitForExistence(timeout: 5), app.debugDescription)
|
||||
XCTAssertTrue(app.staticTexts["Nachricht auswählen"].waitForExistence(timeout: 5), app.debugDescription)
|
||||
app.buttons["Neue Nachricht"].click()
|
||||
XCTAssertTrue(app.buttons["Anhang hinzufügen"].waitForExistence(timeout: 5))
|
||||
XCTAssertFalse(app.buttons["Senden"].isEnabled)
|
||||
XCTAssertTrue(app.buttons["Adressbuch"].exists)
|
||||
XCTAssertTrue(app.textFields["recipientField"].exists)
|
||||
app.buttons["Abbrechen"].click()
|
||||
app.buttons["Konten"].click()
|
||||
XCTAssertTrue(app.secureTextFields.firstMatch.waitForExistence(timeout: 5))
|
||||
XCTAssertTrue(app.buttons["Speichern"].exists)
|
||||
XCTAssertTrue(app.buttons["Neues Konto hinzufügen"].exists)
|
||||
XCTAssertTrue(app.buttons["Konto löschen"].exists)
|
||||
app.buttons["Neues Konto hinzufügen"].click()
|
||||
XCTAssertTrue(app.textFields["accountEmail"].waitForExistence(timeout: 5))
|
||||
app.buttons["Schließen"].click()
|
||||
XCTAssertTrue(app.buttons["Abrufen"].exists)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user