Add mock update feed UI tests
This commit is contained in:
parent
ca9c680da7
commit
03ee628fb6
5 changed files with 120 additions and 0 deletions
|
|
@ -3,6 +3,14 @@ import Cocoa
|
|||
|
||||
extension UpdateDriver: SPUUpdaterDelegate {
|
||||
func feedURLString(for updater: SPUUpdater) -> String? {
|
||||
#if DEBUG
|
||||
let env = ProcessInfo.processInfo.environment
|
||||
if let override = env["CMUX_UI_TEST_FEED_URL"], !override.isEmpty {
|
||||
UpdateTestURLProtocol.registerIfNeeded()
|
||||
recordFeedURLString(override, usedFallback: false)
|
||||
return override
|
||||
}
|
||||
#endif
|
||||
let infoURL = Bundle.main.object(forInfoDictionaryKey: "SUFeedURL") as? String
|
||||
let fallback = "https://github.com/manaflow-ai/cmuxterm/releases/latest/download/appcast.xml"
|
||||
let feedURLString = (infoURL?.isEmpty == false) ? infoURL! : fallback
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue