-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathApp.swift
More file actions
47 lines (42 loc) · 1.53 KB
/
Copy pathApp.swift
File metadata and controls
47 lines (42 loc) · 1.53 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// 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)
}
// Launches CodeEdit with an app-writable directory that CodeEdit creates before opening.
static func launchWithAppWritableTempDir() -> (XCUIApplication, String) {
let tempDirID = appWritableTempProjectID()
let application = XCUIApplication()
application.launchArguments = [
"-ApplePersistenceIgnoreState",
"YES",
"--codeedit-uitest-open-temp-workspace",
tempDirID
]
application.launch()
return (application, tempDirID)
}
static func launch() -> XCUIApplication {
let application = XCUIApplication()
application.launchArguments = ["-ApplePersistenceIgnoreState", "YES"]
application.launch()
return application
}
}