Merge pull request #943 from zorgiepoo/improve-tests

Improve tests
This commit is contained in:
Kornel authored and GitHub committed 2016-12-22 23:32:19 +01:00
commit 4d34e4358a
5 files changed
+16 -11

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@
<key>SUEnableSystemProfiling</key>
<true/>
<key>SUFeedURL</key>
<string>http://0.0.0.0:1337/sparkletestcast.xml</string>
<string>http://localhost:1337/sparkletestcast.xml</string>
<key>SUPublicDSAKeyFile</key>
<string>test_app_only_dsa_pub.pem</string>
<key>NSAppTransportSecurity</key>
+1 -1
View File
@@ -17,7 +17,7 @@
]]>
</description>
<pubDate>Sat, 26 Jul 2014 15:20:11 +0000</pubDate>
<enclosure url="http://0.0.0.0:1337/Sparkle_Test_App.zip" sparkle:version="2.0" length="$INSERT_ARCHIVE_LENGTH" type="application/octet-stream" sparkle:dsaSignature="$INSERT_DSA_SIGNATURE" />
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" sparkle:version="2.0" length="$INSERT_ARCHIVE_LENGTH" type="application/octet-stream" sparkle:dsaSignature="$INSERT_DSA_SIGNATURE" />
</item>
</channel>
</rss>
+6 -6
View File
@@ -6,21 +6,21 @@
<title>Version 2.0</title>
<description>desc</description>
<pubDate>Sat, 26 Jul 2014 15:20:11 +0000</pubDate>
<enclosure url="http://0.0.0.0:1337/Sparkle_Test_App.zip" sparkle:version="2.0" />
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" sparkle:version="2.0" />
</item>
<!-- The best chosen release -->
<item>
<title>Version 3.0</title>
<enclosure url="http://0.0.0.0:1337/Sparkle_Test_App.zip" sparkle:version="3.0" />
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" sparkle:version="3.0" />
<sparkle:deltas>
<enclosure url="http://0.0.0.0:1337/3.0_from_2.0.patch"
<enclosure url="http://localhost:1337/3.0_from_2.0.patch"
sparkle:version="3.0"
sparkle:deltaFrom="2.0"
length="1235"
type="application/octet-stream"
sparkle:dsaSignature="..." />
<enclosure url="http://0.0.0.0:1337/3.0_from_1.0.patch"
<enclosure url="http://localhost:1337/3.0_from_1.0.patch"
sparkle:version="3.0"
sparkle:deltaFrom="1.0"
length="1485"
@@ -32,13 +32,13 @@
<item>
<title>Version 4.0</title>
<pubDate>Sat, 26 Jul 2014 15:20:13 +0000</pubDate>
<enclosure url="http://0.0.0.0:1337/Sparkle_Test_App.zip" sparkle:version="4.0" />
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" sparkle:version="4.0" />
<sparkle:minimumSystemVersion>17.0.0</sparkle:minimumSystemVersion>
</item>
<!-- A joke release testing maximumSystemVersion -->
<item>
<title>Version 5.0</title>
<enclosure url="http://0.0.0.0:1337/Sparkle_Test_App.zip" sparkle:version="5.0" />
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" sparkle:version="5.0" />
<sparkle:maximumSystemVersion>2.0.0</sparkle:maximumSystemVersion>
</item>
</channel>
+2 -2
View File
@@ -6,13 +6,13 @@
<title>Version 3.0</title>
<pubDate>Sat, 26 Jul 2014 15:20:12 +0000</pubDate>
<customNS:releaseNotesLink>https://sparkle-project.org/#works</customNS:releaseNotesLink>
<enclosure url="http://0.0.0.0:1337/Sparkle_Test_App.zip" customNS:version="3.0" />
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" customNS:version="3.0" />
</item>
<item>
<title>Version 2.0</title>
<description>desc</description>
<pubDate>Sat, 26 Jul 2014 15:20:11 +0000</pubDate>
<enclosure url="http://0.0.0.0:1337/Sparkle_Test_App.zip" customNS:version="2.0" />
<enclosure url="http://localhost:1337/Sparkle_Test_App.zip" customNS:version="2.0" />
</item>
</channel>
</rss>
+6 -1
View File
@@ -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()