1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-08 04:20:07 +02:00

Improve tests

This commit is contained in:
2023-03-03 23:11:40 +01:00
parent 13ee618d5c
commit 127d5f4494
7 changed files with 166 additions and 69 deletions

View File

@ -9,7 +9,6 @@
import XCTest
class UITestCase: XCTestCase {
/** Launches the app and opens the menu. */
public func launch(
openMenu: Bool = false,
@ -50,7 +49,15 @@ class UITestCase: XCTestCase {
public func click(_ element: XCUIElement) {
element.click()
}
}
extension XCPMApplication {
/**
Opens a given menu item found in the menu bar's status item.
*/
public func mainMenuItem(withText text: String) -> XCUIElement {
self.statusItems.firstMatch.menuItems[text].firstMatch
}
}
extension XCUIElement {