Skip to content

Commit 7190374

Browse files
committed
Fix isolation errors in UI tests
1 parent 2e5981d commit 7190374

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

ParchmentUITests/ParchmentUITests.swift

+8-5
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@ import XCTest
22

33
@MainActor
44
final class ParchmentUITests: XCTestCase {
5-
var app: XCUIApplication!
6-
75
override func setUp() {
86
continueAfterFailure = false
9-
app = XCUIApplication()
10-
app.launchArguments = ["--ui-testing"]
11-
app.launch()
127
}
138

149
func testSelect() {
10+
let app = XCUIApplication()
11+
app.launchArguments = ["--ui-testing"]
12+
app.launch()
13+
1514
let cell0 = app.collectionViews.cells["View 0"]
1615
let cell1 = app.collectionViews.cells["View 1"]
1716

@@ -27,6 +26,10 @@ final class ParchmentUITests: XCTestCase {
2726
}
2827

2928
func testSwipe() {
29+
let app = XCUIApplication()
30+
app.launchArguments = ["--ui-testing"]
31+
app.launch()
32+
3033
app.scrollViews.firstMatch.swipeLeft()
3134
let content1 = app.scrollViews.firstMatch.staticTexts["1"]
3235
XCTAssertTrue(content1.waitForExistence(timeout: 1))

0 commit comments

Comments
 (0)