Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from EmbeddedSources/master
Added an automator script for the CoverStory
- Loading branch information
Showing
6 changed files
with
73 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
on run argv | ||
|
||
tell application "/Applications/CoverStory.app" | ||
|
||
quit | ||
|
||
activate | ||
|
||
set x to open (item 1 of argv) | ||
|
||
tell x to export to HTML in (item 2 of argv) | ||
|
||
quit | ||
|
||
end tell | ||
|
||
|
||
|
||
return item 1 of argv & "|" & item 2 of argv | ||
|
||
end run | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
http://jorudolph.wordpress.com/category/ios-continous-integration-series/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
XCODE_PATH=`xcode-select -print-path` | ||
TPL=$XCODE_PATH/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate | ||
APP=/Users/USERNAME/Library/Developer/Xcode/DerivedData/APP-RANDOMHASH/Build/Products/CONFIG-iphonesimulator/APPNAME.app | ||
|
||
instruments -t "$TPL" "$APP" -e UIASCRIPT PATHTOYOUR/suite.js -e UIARESULTSPATH PATHTO/ARTIFACTS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
describe("PocketCasts", function() { | ||
var target = UIATarget.localTarget(); | ||
|
||
function dumpTree() { | ||
UIATarget.localTarget().frontMostApp().logElementTree(); | ||
} | ||
|
||
function pickVideoWithIndex(i) { | ||
target.frontMostApp().mainWindow().tableViews()[0].visibleCells()[i].tap(); | ||
} | ||
|
||
function firstTableGroup() { | ||
return target.frontMostApp().mainWindow().tableViews()[0].groups()[0]; | ||
} | ||
|
||
function goBack() { | ||
target.frontMostApp().navigationBar().leftButton().tap(); | ||
} | ||
|
||
afterEach(function(){ | ||
goBack(); | ||
}); | ||
|
||
it("should show download button for video, that is not downloaded", function(){ | ||
pickVideoWithIndex(0); | ||
expect(firstTableGroup().name()).toEqual("Tap to download video"); | ||
}); | ||
|
||
it("should show play button for video that is downloaded", function(){ | ||
pickVideoWithIndex(1); | ||
expect(firstTableGroup().name()).toEqual("Tap to play video"); | ||
}); | ||
|
||
it("should show subscribe button for pro video when there's no subscription", function(){ | ||
pickVideoWithIndex(2); | ||
expect(firstTableGroup().name()).toEqual("Tap to subscribe at railscasts.com"); | ||
}); | ||
}); |