Skip to content

Commit

Permalink
Add TestsHost and update Example
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Ye committed Nov 9, 2023
1 parent ce7ae74 commit dae5924
Show file tree
Hide file tree
Showing 23 changed files with 955 additions and 88 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//
// ContentView.swift
// ExampleApp
// Example
//
// Created by Kyle on 2023/9/22.
// Created by Kyle on 2023/11/9.
//

import OpenSwiftUI
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//
// ExampleAppApp.swift
// ExampleApp
// ExampleApp.swift
// Example
//
// Created by Kyle on 2023/9/22.
// Created by Kyle on 2023/11/9.
//

import OpenSwiftUI
Expand Down
3 changes: 0 additions & 3 deletions Example/README.md

This file was deleted.

23 changes: 23 additions & 0 deletions Tests/OpenSwiftUIUITests/LaunchTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// UITestsLaunchTests.swift
// OpenSwiftUIUITests
//
// Created by Kyle on 2023/11/9.
//

import XCTest

final class UITestsLaunchTests: XCTestCase {
override class var runsForEachTargetApplicationUIConfiguration: Bool {
true
}

override func setUpWithError() throws {
continueAfterFailure = false
}

func testLaunch() throws {
let app = XCUIApplication()
app.launch()
}
}
20 changes: 20 additions & 0 deletions Tests/OpenSwiftUIUITests/UITests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// UITests.swift
// OpenSwiftUIUITests
//
// Created by Kyle on 2023/11/9.
//

import XCTest
import Hammer
import UIKit

final class UITests: XCTestCase {
func testExample() throws {
let app = XCUIApplication()
app.launch()
let eventGenerator = EventGenerator(window: app.windows.firstMatch.value as! UIWindow)
eventGenerator.showTouches = true
try eventGenerator.fingerUp()
}
}
Loading

0 comments on commit dae5924

Please sign in to comment.