diff --git a/phpmon/Domain/Menu/MainMenu+Startup.swift b/phpmon/Domain/Menu/MainMenu+Startup.swift index a38a41f..654b3e4 100644 --- a/phpmon/Domain/Menu/MainMenu+Startup.swift +++ b/phpmon/Domain/Menu/MainMenu+Startup.swift @@ -128,10 +128,9 @@ extension MainMenu { // Check if the linked version has changed between launches of phpmon PhpGuard().compareToLastGlobalVersion() - // TODO: Move to a new dedicated module - // Scan which PHP extensions can be installed - let extensions = BrewTapFormulae.from(tap: "shivammathur/homebrew-extensions")["8.2"]! - print("The following extensions can be installed for this version of PHP: \(extensions)") + #warning("Move to a dedicated module and check if tap is installed first!") + // let extensions = BrewTapFormulae.from(tap: "shivammathur/homebrew-extensions")["8.2"]! + // print("The following extensions can be installed for this version of PHP: \(extensions)") // We are ready! Log.info("PHP Monitor is ready to serve!") diff --git a/phpmon/Domain/SwiftUI/Menu/StatsView.swift b/phpmon/Domain/SwiftUI/Menu/StatsView.swift index 299a84e..030debb 100644 --- a/phpmon/Domain/SwiftUI/Menu/StatsView.swift +++ b/phpmon/Domain/SwiftUI/Menu/StatsView.swift @@ -89,6 +89,7 @@ struct StatsView: View { } label: { Image(systemName: "gearshape.fill") } + .accessibility(identifier: "phpConfigButton") .focusable(false) .frame(minWidth: 30, alignment: .center) } diff --git a/tests/ui/MainMenuTest.swift b/tests/ui/MainMenuTest.swift index e3eb0cd..78a9e2e 100644 --- a/tests/ui/MainMenuTest.swift +++ b/tests/ui/MainMenuTest.swift @@ -54,6 +54,16 @@ final class MainMenuTest: UITestCase { app.mainMenuItem(withText: "mi_about".localized).click() } + final func test_can_open_config_editor() throws { + let app = launch(openMenu: true) + + app.buttons["phpConfigButton"].click() + + Thread.sleep(forTimeInterval: 0.5) + + assertExists(app.staticTexts["confman.title".localized], 1) + } + final func test_can_open_settings() throws { let app = launch(openMenu: true) app.mainMenuItem(withText: "mi_preferences".localized).click()