Skip to content

Commit

Permalink
add parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
BorisLys committed Dec 4, 2024
1 parent ca11371 commit 819b9a5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,16 @@ jobs:
-xctestrun DerivedData/Build/Products/SwiftRadioUITests_Regression_iphonesimulator18.0-arm64.xctestrun \
-destination 'platform=iOS Simulator,name=${{ env.SIMULATOR_NAME }},OS=${{ env.SIMULATOR_VERSION }}' \
-resultBundlePath ./TestResults.xcresult \
-parallel-testing-enabled YES \
-maximum-concurrent-test-simulator-destinations 2
| xcbeautify --renderer github-actions
else
xcodebuild test-without-building \
-xctestrun DerivedData/Build/Products/SwiftRadioUITests_${{ github.event.inputs.test_plan_type }}_iphonesimulator18.0-arm64.xctestrun \
-destination 'platform=iOS Simulator,name=${{ env.SIMULATOR_NAME }},OS=${{ env.SIMULATOR_VERSION }}' \
-resultBundlePath ./TestResults.xcresult \
-parallel-testing-enabled YES \
-maximum-concurrent-test-simulator-destinations 2 \
| xcbeautify --renderer github-actions
fi
continue-on-error: true
Expand Down
1 change: 1 addition & 0 deletions SwiftRadioUITests/Data/BundleId.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
enum BundleId: String {
case app = "com.borisLysikov.SwiftRadio"
case safari = "com.apple.mobilesafari"
case springboard = "com.apple.springboard"
}

14 changes: 14 additions & 0 deletions SwiftRadioUITests/Extensions/XCUIElement+Actions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,18 @@ extension XCUIElement {
left.press(forDuration: 1, thenDragTo: right)
}

func openNotificationCenter() {
let app = XCUIApplication()
let coord1 = app.coordinate(withNormalizedOffset: CGVector(dx: 0.1, dy: 0.01))
let coord2 = app.coordinate(withNormalizedOffset: CGVector(dx: 0.1, dy: 0.8))
coord1.press(forDuration: 0.1, thenDragTo: coord2)
}

func openControlCenter() {
let app = XCUIApplication()
let coord1 = app.coordinate(withNormalizedOffset: CGVector(dx: 0.9, dy: 0.01))
let coord2 = app.coordinate(withNormalizedOffset: CGVector(dx: 0.9, dy: 0.2))
coord1.press(forDuration: 0.1, thenDragTo: coord2)
}

}

0 comments on commit 819b9a5

Please sign in to comment.