refactor: extract launchApp helper in AboutHelpUITests #74
@@ -35,9 +35,15 @@ final class AboutHelpUITests: XCTestCase {
|
|||||||
return el
|
return el
|
||||||
}
|
}
|
||||||
|
|
||||||
func testAboutDialogShowsVersionAndBuildDate() throws {
|
private func launchApp() {
|
||||||
app.launch()
|
app.launch()
|
||||||
|
if !app.wait(for: .runningForeground, timeout: 10) {
|
||||||
app.activate()
|
app.activate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func testAboutDialogShowsVersionAndBuildDate() throws {
|
||||||
|
launchApp()
|
||||||
|
|
||||||
let openAbout = app.buttons["openAboutBtn"]
|
let openAbout = app.buttons["openAboutBtn"]
|
||||||
XCTAssertTrue(openAbout.waitForExistence(timeout: 10))
|
XCTAssertTrue(openAbout.waitForExistence(timeout: 10))
|
||||||
@@ -54,8 +60,7 @@ final class AboutHelpUITests: XCTestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testHelpOverlaysDoNotChangeSidebarHeight() throws {
|
func testHelpOverlaysDoNotChangeSidebarHeight() throws {
|
||||||
app.launch()
|
launchApp()
|
||||||
app.activate()
|
|
||||||
|
|
||||||
let toggle = app.buttons["btnToggleAllHelp"]
|
let toggle = app.buttons["btnToggleAllHelp"]
|
||||||
XCTAssertTrue(toggle.waitForExistence(timeout: 10))
|
XCTAssertTrue(toggle.waitForExistence(timeout: 10))
|
||||||
|
|||||||
Reference in New Issue
Block a user