Skip to content

Commit

Permalink
Fix isolation errors in UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rechsteiner committed Sep 8, 2024
1 parent 2e5981d commit 7190374
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions ParchmentUITests/ParchmentUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@ import XCTest

@MainActor
final class ParchmentUITests: XCTestCase {
var app: XCUIApplication!

override func setUp() {
continueAfterFailure = false
app = XCUIApplication()
app.launchArguments = ["--ui-testing"]
app.launch()
}

func testSelect() {
let app = XCUIApplication()
app.launchArguments = ["--ui-testing"]
app.launch()

let cell0 = app.collectionViews.cells["View 0"]
let cell1 = app.collectionViews.cells["View 1"]

Expand All @@ -27,6 +26,10 @@ final class ParchmentUITests: XCTestCase {
}

func testSwipe() {
let app = XCUIApplication()
app.launchArguments = ["--ui-testing"]
app.launch()

app.scrollViews.firstMatch.swipeLeft()
let content1 = app.scrollViews.firstMatch.staticTexts["1"]
XCTAssertTrue(content1.waitForExistence(timeout: 1))
Expand Down

0 comments on commit 7190374

Please sign in to comment.