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
diff --git CalabashJS/CalabashJSLib/LPWebQuery.m CalabashJS/CalabashJSLib/LPWebQuery.m | |
index a9593c1..a7e49d7 100644 | |
--- CalabashJS/CalabashJSLib/LPWebQuery.m | |
+++ CalabashJS/CalabashJSLib/LPWebQuery.m | |
@@ -6,6 +6,10 @@ | |
// Copyright (c) 2012 Trifork. All rights reserved. | |
// | |
+#ifndef DEBUG | |
+#define DEBUG 0 |
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
# examples of usage | |
# Scenario: the activities home view should have the right stuff on it | |
# Then I should see navbar with title "Coping Skills" | |
# Then I scroll down until I see the "recommendation" row limit 1 | |
# Then I should see that the "recommendation" row has text "Recommendation" in the "title" label | |
# Then I should see that the "recommendation" row has text "custom selection based on your current needs" in the "details" label | |
# | |
# Then I scroll down until I see the "random" row limit 1 | |
# Then I should see that the "random" row has text "Random" in the "title" label | |
# Then I should see that the "random" row has text "random selection from all the skills" in the "details" label |
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
#import <objc/runtime.h> | |
#import <objc/message.h> | |
@interface UIWindow (Private) | |
- (void) swizzled_createContext; | |
@end | |
@implementation UIWindow (Private) | |
- (void) swizzled_createContext { | |
// nop |
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
common: SCREENSHOT_PATH=./cucumber-screenshots/ -f 'Slowhandcuke::Formatter' OS=ios5 | |
rerun_out: -f rerun -o rerun.txt | |
no_launch: EMBED=1 NO_LAUNCH=1 | |
ipad: DEVICE=ipad -p common -p no_launch | |
iphone: DEVICE=iphone -p common -p no_launch | |
<% | |
pluto_ip = IO.read("#{ENV['HOME']}/.lesspainful/devices/pluto") | |
neptune_ip = IO.read("#{ENV['HOME']}/.lesspainful/devices/neptune") | |
%> |
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
def move_appointment(appointment_mark, weekday, dir, hours, opts) | |
# asserts that the SelectCell has been touched | |
touch_and_hold_appointment(appointment_mark, weekday) | |
cell_view = custom_view_class('SelectCell', :mi) | |
res = query(cell_view).first | |
# no error checking! | |
normalize_rect_for_orientation!(res['rect']) | |
y_offset = hours * (res['frame']['height'] + 10) |
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
def view_at_point?(point, view_class='view') | |
res = query(view_class) | |
res.each { |view_hash| | |
center = {:x => view_hash['rect']['center_x'], :y => view_hash['rect']['center_y']} | |
return true if center == point | |
} | |
false | |
end | |
def wait_for_view_at_point_to_disappear(point, opts={}) |
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
see https://github.com/jmoody/briar/blob/master/lib/briar/irbrc.rb |
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
$ gem dependency mime-types | |
Gem mime-types-2.0 | |
hoe (~> 3.7, development) | |
hoe-bundler (~> 1.2, development) | |
hoe-doofus (~> 1.0, development) | |
hoe-gemspec2 (~> 1.1, development) | |
hoe-git (~> 1.5, development) | |
hoe-rubygems (~> 1.0, development) | |
hoe-travis (~> 1.2, development) | |
minitest (~> 5.0, development) |
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
def non_location_items | |
all_items = query("view:'MKAnnotationView'") | |
location_items = query("view:'MKModernUserLocationView'") | |
all_items.delete_if { |item| location_items.include?(item) } | |
end | |
def touch_first_non_location | |
desc = non_location_items.first['description'].split(';').first | |
touch("view:'MKAnnotationView' {description BEGINSWITH '#{desc}'}") | |
sleep(0.4) |