mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 20:10:08 +02:00
✅ Add UI test for PHP config editor
This commit is contained in:
@ -128,10 +128,9 @@ extension MainMenu {
|
|||||||
// Check if the linked version has changed between launches of phpmon
|
// Check if the linked version has changed between launches of phpmon
|
||||||
PhpGuard().compareToLastGlobalVersion()
|
PhpGuard().compareToLastGlobalVersion()
|
||||||
|
|
||||||
// TODO: Move to a new dedicated module
|
#warning("Move to a dedicated module and check if tap is installed first!")
|
||||||
// Scan which PHP extensions can be installed
|
// let extensions = BrewTapFormulae.from(tap: "shivammathur/homebrew-extensions")["8.2"]!
|
||||||
let extensions = BrewTapFormulae.from(tap: "shivammathur/homebrew-extensions")["8.2"]!
|
// print("The following extensions can be installed for this version of PHP: \(extensions)")
|
||||||
print("The following extensions can be installed for this version of PHP: \(extensions)")
|
|
||||||
|
|
||||||
// We are ready!
|
// We are ready!
|
||||||
Log.info("PHP Monitor is ready to serve!")
|
Log.info("PHP Monitor is ready to serve!")
|
||||||
|
@ -89,6 +89,7 @@ struct StatsView: View {
|
|||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "gearshape.fill")
|
Image(systemName: "gearshape.fill")
|
||||||
}
|
}
|
||||||
|
.accessibility(identifier: "phpConfigButton")
|
||||||
.focusable(false)
|
.focusable(false)
|
||||||
.frame(minWidth: 30, alignment: .center)
|
.frame(minWidth: 30, alignment: .center)
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,16 @@ final class MainMenuTest: UITestCase {
|
|||||||
app.mainMenuItem(withText: "mi_about".localized).click()
|
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 {
|
final func test_can_open_settings() throws {
|
||||||
let app = launch(openMenu: true)
|
let app = launch(openMenu: true)
|
||||||
app.mainMenuItem(withText: "mi_preferences".localized).click()
|
app.mainMenuItem(withText: "mi_preferences".localized).click()
|
||||||
|
Reference in New Issue
Block a user