forked from CodeEditApp/CodeEdit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.swift
33 lines (29 loc) · 1.01 KB
/
App.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//
// App.swift
// CodeEditUITests
//
// Created by Khan Winter on 7/21/24.
//
import XCTest
enum App {
static func launchWithCodeEditWorkspace() -> XCUIApplication {
let application = XCUIApplication()
application.launchArguments = ["-ApplePersistenceIgnoreState", "YES", "--open", projectPath()]
application.launch()
return application
}
// Launches CodeEdit in a new directory and returns the directory path.
static func launchWithTempDir() throws -> (XCUIApplication, String) {
let tempDirURL = try tempProjectPath()
let application = XCUIApplication()
application.launchArguments = ["-ApplePersistenceIgnoreState", "YES", "--open", tempDirURL]
application.launch()
return (application, tempDirURL)
}
static func launch() -> XCUIApplication {
let application = XCUIApplication()
application.launchArguments = ["-ApplePersistenceIgnoreState", "YES"]
application.launch()
return application
}
}