From 98b3a9828abfd0283a3574d21f5c8b15d47ed28f Mon Sep 17 00:00:00 2001 From: Zorg Date: Thu, 22 Dec 2016 12:17:45 -0500 Subject: [PATCH 1/2] Use localhost instead of 0.0.0.0. Latter doesn't work when offline. --- TestApplication/TestApplication-Info.plist | 2 +- TestApplication/sparkletestcast.xml | 2 +- Tests/Resources/testappcast.xml | 12 ++++++------ Tests/Resources/testnamespaces.xml | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/TestApplication/TestApplication-Info.plist b/TestApplication/TestApplication-Info.plist index 45b0254b..7195cb07 100644 --- a/TestApplication/TestApplication-Info.plist +++ b/TestApplication/TestApplication-Info.plist @@ -27,7 +27,7 @@ SUEnableSystemProfiling SUFeedURL - http://0.0.0.0:1337/sparkletestcast.xml + http://localhost:1337/sparkletestcast.xml SUPublicDSAKeyFile test_app_only_dsa_pub.pem NSAppTransportSecurity diff --git a/TestApplication/sparkletestcast.xml b/TestApplication/sparkletestcast.xml index 670d606c..38eb19b8 100644 --- a/TestApplication/sparkletestcast.xml +++ b/TestApplication/sparkletestcast.xml @@ -17,7 +17,7 @@ ]]> Sat, 26 Jul 2014 15:20:11 +0000 - + diff --git a/Tests/Resources/testappcast.xml b/Tests/Resources/testappcast.xml index e3894b41..287dbda4 100644 --- a/Tests/Resources/testappcast.xml +++ b/Tests/Resources/testappcast.xml @@ -6,21 +6,21 @@ Version 2.0 desc Sat, 26 Jul 2014 15:20:11 +0000 - + Version 3.0 - + - - Version 4.0 Sat, 26 Jul 2014 15:20:13 +0000 - + 17.0.0 Version 5.0 - + 2.0.0 diff --git a/Tests/Resources/testnamespaces.xml b/Tests/Resources/testnamespaces.xml index 94f5f1de..0f3e5950 100644 --- a/Tests/Resources/testnamespaces.xml +++ b/Tests/Resources/testnamespaces.xml @@ -6,13 +6,13 @@ Version 3.0 Sat, 26 Jul 2014 15:20:12 +0000 https://sparkle-project.org/#works - + Version 2.0 desc Sat, 26 Jul 2014 15:20:11 +0000 - + From 6fcd6beb84a70a7a34c45a66d122805626b441b3 Mon Sep 17 00:00:00 2001 From: Zorg Date: Thu, 22 Dec 2016 12:18:31 -0500 Subject: [PATCH 2/2] Fix UI tests from not working when update alert automatically shows --- UITests/SUTestApplicationTest.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/UITests/SUTestApplicationTest.swift b/UITests/SUTestApplicationTest.swift index 72cd02fb..7074953b 100644 --- a/UITests/SUTestApplicationTest.swift +++ b/UITests/SUTestApplicationTest.swift @@ -76,13 +76,18 @@ class SUTestApplicationTest: XCTestCase { let app = XCUIApplication() let menuBarsQuery = app.menuBars - + menuBarsQuery.menuBarItems["Sparkle Test App"].click() // If the update window already showed up automatically, this option will be disabled. // Even if it's disabled, attempting to click it will do no harm and continue on menuBarsQuery.menuItems["Check for Updates…"].click() + // Workaround to make sure we can click the install update button later + // This workaround is needed if the alert prompts up automatically *before* we manually check for updates + // I'm not sure why this workaround works or is necessary + app.dialogs["SUUpdateAlert"].staticTexts["Software Update"].click() + app.dialogs["SUUpdateAlert"].buttons["Install Update"].click() app.buttons["Install and Relaunch"].click()