frank-cucumber 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/frank-cucumber.gemspec +1 -1
- data/frank-skeleton/frank_static_resources.bundle/index.html +6 -16
- data/frank-skeleton/frank_static_resources.bundle/index.html.haml +12 -14
- data/frank-skeleton/frank_static_resources.bundle/js/controller.coffee +6 -1
- data/frank-skeleton/frank_static_resources.bundle/js/controller.js +8 -1
- data/frank-skeleton/frank_static_resources.bundle/stylesheets/css/symbiote.css +1 -0
- data/frank-skeleton/frank_static_resources.bundle/stylesheets/sass/_elements.scss +28 -0
- data/frank-skeleton/frank_static_resources.bundle/stylesheets/sass/_header.scss +61 -0
- data/frank-skeleton/frank_static_resources.bundle/stylesheets/sass/_inspect_tabs_list_tabs.scss +194 -0
- data/frank-skeleton/frank_static_resources.bundle/{jquery.treeview.css → stylesheets/sass/_jquery.treeview.scss} +18 -20
- data/frank-skeleton/frank_static_resources.bundle/stylesheets/sass/_jqui.scss +2 -0
- data/frank-skeleton/frank_static_resources.bundle/stylesheets/sass/_layout.scss +13 -0
- data/frank-skeleton/frank_static_resources.bundle/stylesheets/sass/_mixins.sass +137 -0
- data/frank-skeleton/frank_static_resources.bundle/{reset.css → stylesheets/sass/_reset.scss} +2 -2
- data/frank-skeleton/frank_static_resources.bundle/stylesheets/sass/_selector_test_toolbar.scss +81 -0
- data/frank-skeleton/frank_static_resources.bundle/{_solarized_colors.scss → stylesheets/sass/_solarized.scss} +0 -0
- data/frank-skeleton/frank_static_resources.bundle/stylesheets/sass/_typography.scss +11 -0
- data/frank-skeleton/frank_static_resources.bundle/stylesheets/sass/_unicode.scss +3 -0
- data/frank-skeleton/frank_static_resources.bundle/stylesheets/sass/_z_index.scss +2 -0
- data/frank-skeleton/frank_static_resources.bundle/stylesheets/sass/symbiote.scss +26 -0
- data/frank-skeleton/libCocoaHTTPServer.a +0 -0
- data/frank-skeleton/libFrank.a +0 -0
- data/frank-skeleton/libShelley.a +0 -0
- data/lib/frank-cucumber.rb +1 -0
- data/lib/frank-cucumber/cli.rb +14 -3
- data/lib/frank-cucumber/core_frank_steps.rb +53 -28
- data/lib/frank-cucumber/frank_helper.rb +32 -4
- data/lib/frank-cucumber/rect.rb +24 -0
- data/lib/frank-cucumber/version.rb +1 -1
- data/test/rect_test.rb +25 -0
- metadata +114 -35
- data/frank-skeleton/frank_static_resources.bundle/symbiote.css +0 -505
@@ -0,0 +1,13 @@
|
|
1
|
+
//--------------------------------------------------------
|
2
|
+
// veritcal layout for entire page.
|
3
|
+
//--------------------------------------------------------
|
4
|
+
// for horizontal layouts, see individual partial files.
|
5
|
+
//--------------------------------------------------------
|
6
|
+
|
7
|
+
$header-height: 40px;
|
8
|
+
$toast-height: $header-height;
|
9
|
+
$refresh-size: $header-height;
|
10
|
+
$selector-test-toolbar-vt-padding: 8px;
|
11
|
+
|
12
|
+
$selector-test-height: $btn-input-height + $label-line-height + ($selector-test-toolbar-vt-padding*2);
|
13
|
+
$columns-top: $header-height + $selector-test-height;
|
@@ -0,0 +1,137 @@
|
|
1
|
+
@mixin center-align($height: "", $width: "")
|
2
|
+
top: 50%
|
3
|
+
margin-top: -$height/2
|
4
|
+
left: 50%
|
5
|
+
margin-left: -$width/2
|
6
|
+
|
7
|
+
@mixin absolute-fill
|
8
|
+
position: absolute
|
9
|
+
top: 0
|
10
|
+
right: 0
|
11
|
+
bottom: 0
|
12
|
+
left: 0
|
13
|
+
height: 100%
|
14
|
+
width: 100%
|
15
|
+
|
16
|
+
@mixin clearfix-after
|
17
|
+
&:after
|
18
|
+
content: ""
|
19
|
+
display: block
|
20
|
+
height: 1px
|
21
|
+
width: 1px
|
22
|
+
clear: both
|
23
|
+
position: relative
|
24
|
+
|
25
|
+
@mixin transition ( $trans )
|
26
|
+
-webkit-transition: ( $trans )
|
27
|
+
-moz-transition: ( $trans )
|
28
|
+
transition: ( $trans )
|
29
|
+
|
30
|
+
@mixin transition-two ( $trans, $trans2 )
|
31
|
+
-webkit-transition: ( $trans, $trans2 )
|
32
|
+
-moz-transition: ( $trans, $trans2 )
|
33
|
+
transition: ( $trans, $trans2 )
|
34
|
+
|
35
|
+
@mixin transition-transform( $duration )
|
36
|
+
-webkit-transition: -webkit-transform $duration
|
37
|
+
-moz-transition: -moz-transform $duration
|
38
|
+
-ms-transition: -ms-transform $duration
|
39
|
+
-o-transition: -o-transform $duration
|
40
|
+
transition: transform $duration
|
41
|
+
|
42
|
+
@mixin transition-delay ( $delay )
|
43
|
+
-webkit-transition-delay: ( $delay )
|
44
|
+
-moz-transition-delay: ( $delay )
|
45
|
+
transition-delay: ( $delay )
|
46
|
+
|
47
|
+
@mixin transition-property ( $property )
|
48
|
+
-webkit-transition-property: ( $property )
|
49
|
+
-moz-transition-property: ( $property )
|
50
|
+
transition-property: ( $property )
|
51
|
+
|
52
|
+
@mixin transition-property-two ( $property1, $property2 )
|
53
|
+
-webkit-transition-property: ( $property1, $property2 )
|
54
|
+
-moz-transition-property: ( $property1, $property2 )
|
55
|
+
transition-property: ( $property1, $property2 )
|
56
|
+
|
57
|
+
@mixin transition-duration ( $duration )
|
58
|
+
-webkit-transition-duration: ( $duration )
|
59
|
+
-moz-transition-duration: ( $duration )
|
60
|
+
transition-duration: ( $duration )
|
61
|
+
|
62
|
+
@mixin animation ( $animation )
|
63
|
+
-webkit-animation: ( $animation )
|
64
|
+
-moz-animation: ( $animation )
|
65
|
+
-ms-animation: ( $animation )
|
66
|
+
animation: ( $animation )
|
67
|
+
|
68
|
+
@mixin text-shadow( $shadow )
|
69
|
+
-webkit-text-shadow: ( $shadow )
|
70
|
+
-moz-text-shadow: ( $shadow )
|
71
|
+
text-shadow: ( $shadow )
|
72
|
+
|
73
|
+
@mixin box-shadow( $shadow )
|
74
|
+
-webkit-box-shadow: ( $shadow )
|
75
|
+
-moz-box-shadow: ( $shadow )
|
76
|
+
box-shadow: ( $shadow )
|
77
|
+
|
78
|
+
@mixin box-shadow-two( $shadow1, $shadow2 )
|
79
|
+
-webkit-box-shadow: ( $shadow1, $shadow2 )
|
80
|
+
-moz-box-shadow: ( $shadow1, $shadow2 )
|
81
|
+
box-shadow: ( $shadow1, $shadow2 )
|
82
|
+
|
83
|
+
@mixin transform ( $transform )
|
84
|
+
-webkit-transform: ( $transform )
|
85
|
+
-moz-transform: ( $transform )
|
86
|
+
-ms-transform: ( $transform )
|
87
|
+
-o-transform: ( $transform )
|
88
|
+
transform: ( $transform )
|
89
|
+
|
90
|
+
@mixin transform-style ( $style )
|
91
|
+
-webkit-transform-style: ( $style )
|
92
|
+
-moz-transform-style: ( $style )
|
93
|
+
-ms-transform-style: ( $style )
|
94
|
+
transform-style: ( $style )
|
95
|
+
|
96
|
+
@mixin backface-visibility ( $visibility )
|
97
|
+
-webkit-backface-visibility: ( $visibility )
|
98
|
+
-moz-backface-visibility: ( $visibility )
|
99
|
+
-ms-backface-visibility: ( $visibility )
|
100
|
+
backface-visibility: ( $visibility )
|
101
|
+
|
102
|
+
@mixin perspective ( $perspective )
|
103
|
+
-webkit-perspective: ( $perspective )
|
104
|
+
-moz-perspective: ( $perspective )
|
105
|
+
-ms-perspective: ( $perspective )
|
106
|
+
perspective: ( $perspective )
|
107
|
+
|
108
|
+
@mixin perspective-origin( $origin )
|
109
|
+
-webkit-perspective-origin: ( $origin )
|
110
|
+
-moz-perspective-origin: ( $origin )
|
111
|
+
-ms-perspective-origin: ( $origin )
|
112
|
+
perspective-origin: ( $origin )
|
113
|
+
|
114
|
+
@mixin border-radius ( $radius )
|
115
|
+
-webkit-border-radius: ( $radius )
|
116
|
+
-moz-border-radius: ( $radius )
|
117
|
+
border-radius: ( $radius )
|
118
|
+
|
119
|
+
@mixin box-sizing( $box-size )
|
120
|
+
-webkit-box-sizing: ( $box-size )
|
121
|
+
-khtml-box-sizing: ( $box-size )
|
122
|
+
-icab-box-sizing: ( $box-size )
|
123
|
+
-moz-box-sizing: ( $box-size )
|
124
|
+
-o-box-sizing: ( $box-size )
|
125
|
+
box-sizing: ( $box-size )
|
126
|
+
|
127
|
+
@mixin user-select ( $user-select )
|
128
|
+
-webkit-user-select: ( $user-select )
|
129
|
+
-moz-user-select: ( $user-select )
|
130
|
+
-ms-user-select: ( $user-select )
|
131
|
+
user-select: ( $user-select )
|
132
|
+
|
133
|
+
@mixin linear-gradient ( $start-point, $stop1, $stop2 )
|
134
|
+
background-image: -webkit-linear-gradient( $start-point, $stop1, $stop2 )
|
135
|
+
background-image: -moz-linear-gradient( $start-point, $stop1, $stop2 )
|
136
|
+
background-image: -ms-linear-gradient( $start-point, $stop1, $stop2 )
|
137
|
+
background-image: linear-gradient( $start-point, $stop1, $stop2 )
|
data/frank-skeleton/frank_static_resources.bundle/{reset.css → stylesheets/sass/_reset.scss}
RENAMED
@@ -22,11 +22,11 @@ article, aside, details, figcaption, figure, footer, header, hgroup, nav, sectio
|
|
22
22
|
h1,h2,h3,h4,h5,h6 {font-size: 1.0em; }
|
23
23
|
|
24
24
|
/* save your sanity */
|
25
|
-
* {
|
25
|
+
* {
|
26
26
|
-webkit-box-sizing: border-box;
|
27
27
|
-khtml-box-sizing: border-box;
|
28
28
|
-icab-box-sizing: border-box;
|
29
29
|
-moz-box-sizing: border-box;
|
30
30
|
-o-box-sizing: border-box;
|
31
|
-
box-sizing: border-box;
|
31
|
+
box-sizing: border-box;
|
32
32
|
}
|
data/frank-skeleton/frank_static_resources.bundle/stylesheets/sass/_selector_test_toolbar.scss
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
//----------------------------------------------
|
2
|
+
// horizontal layout
|
3
|
+
$wrap-middle-width: 60%;
|
4
|
+
$wrap-outter-width: (100% - $wrap-middle-width)/2;
|
5
|
+
//----------------------------------------------
|
6
|
+
|
7
|
+
#selector-test {
|
8
|
+
position: relative;
|
9
|
+
text-align: center;
|
10
|
+
padding: $selector-test-toolbar-vt-padding 0;
|
11
|
+
.wrap {
|
12
|
+
display: inline-block;
|
13
|
+
position: relative;
|
14
|
+
vertical-align: middle;
|
15
|
+
padding: 0 .5em;
|
16
|
+
&.middle { width: $wrap-middle-width; }
|
17
|
+
&.outter { width: $wrap-outter-width; }
|
18
|
+
}//.wrap
|
19
|
+
|
20
|
+
#query { width: 100%; }
|
21
|
+
|
22
|
+
label {
|
23
|
+
display: block;
|
24
|
+
text-align: left;
|
25
|
+
text-transform: capitalize;
|
26
|
+
&:after {
|
27
|
+
content: "#{$arrow-right-down}";
|
28
|
+
font-size: .8em;
|
29
|
+
font-weight: bold;
|
30
|
+
padding-left: .3em;
|
31
|
+
}
|
32
|
+
}//label
|
33
|
+
}//#selector-test
|
34
|
+
|
35
|
+
$drop-indicator-width: 2em;
|
36
|
+
|
37
|
+
.dropdown {
|
38
|
+
position: relative;
|
39
|
+
display: block;
|
40
|
+
width: 100%;
|
41
|
+
|
42
|
+
* { z-index: $dropdown-child-z; }
|
43
|
+
|
44
|
+
button {
|
45
|
+
position: relative;
|
46
|
+
width: 100%;
|
47
|
+
padding-left: .8em;
|
48
|
+
padding-right: $drop-indicator-width;
|
49
|
+
white-space: nowrap;
|
50
|
+
overflow: hidden;
|
51
|
+
text-overflow: ellipsis;
|
52
|
+
}//button
|
53
|
+
|
54
|
+
ul {
|
55
|
+
position: absolute;
|
56
|
+
top: 100%;
|
57
|
+
width: 100%;
|
58
|
+
float: left;
|
59
|
+
opacity: 0;
|
60
|
+
visibility: hidden;
|
61
|
+
@include transition-two( visibility 0s linear 0.2s,opacity 0.2s linear );
|
62
|
+
&.shown {
|
63
|
+
opacity: 1;
|
64
|
+
visibility:visible;
|
65
|
+
@include transition-delay( 0s );
|
66
|
+
}//&.shown
|
67
|
+
}//ul
|
68
|
+
|
69
|
+
.drop-indicator {
|
70
|
+
color: #eee;
|
71
|
+
position: absolute;
|
72
|
+
width: $drop-indicator-width;
|
73
|
+
right: 0;
|
74
|
+
top: 6px;
|
75
|
+
bottom: 6px;
|
76
|
+
border-left: 1px solid white;
|
77
|
+
text-align: center;
|
78
|
+
cursor: pointer;
|
79
|
+
@include user-select( none );
|
80
|
+
}//.drop-indicator
|
81
|
+
}//.dropdown
|
File without changes
|
@@ -0,0 +1,26 @@
|
|
1
|
+
//-------------------------------
|
2
|
+
// primary application file
|
3
|
+
// all partials should be loaded here.
|
4
|
+
//-------------------------------
|
5
|
+
// base
|
6
|
+
@import "_unicode.scss";
|
7
|
+
@import "_mixins.sass";
|
8
|
+
@import "_solarized.scss";
|
9
|
+
@import "_typography.scss";
|
10
|
+
@import "_z_index.scss";
|
11
|
+
//----------------------------------
|
12
|
+
@import "_reset.scss";
|
13
|
+
@import "_elements.scss";
|
14
|
+
//----------------------------------
|
15
|
+
// global layout affords control
|
16
|
+
// over container heights.
|
17
|
+
@import "_layout.scss";
|
18
|
+
//----------------------------------
|
19
|
+
// partials
|
20
|
+
@import "_header.scss";
|
21
|
+
@import "_selector_test_toolbar.scss";
|
22
|
+
@import "_inspect_tabs_list_tabs.scss";
|
23
|
+
//-------------------------------
|
24
|
+
// vender
|
25
|
+
@import "_jquery.treeview.scss";
|
26
|
+
@import "_jqui.scss";
|
Binary file
|
data/frank-skeleton/libFrank.a
CHANGED
Binary file
|
data/frank-skeleton/libShelley.a
CHANGED
Binary file
|
data/lib/frank-cucumber.rb
CHANGED
data/lib/frank-cucumber/cli.rb
CHANGED
@@ -48,7 +48,9 @@ module Frank
|
|
48
48
|
method_option option
|
49
49
|
end
|
50
50
|
method_option 'arch', :type => :string, :default => 'i386'
|
51
|
+
method_option :noclean, :type => :boolean, :default => false, :aliases => '--nc', :desc => "Don't clean the build directory before building"
|
51
52
|
def build
|
53
|
+
clean = !options['noclean']
|
52
54
|
|
53
55
|
in_root do
|
54
56
|
unless File.directory? 'Frank'
|
@@ -64,14 +66,23 @@ module Frank
|
|
64
66
|
|
65
67
|
static_bundle = 'frank_static_resources.bundle'
|
66
68
|
|
67
|
-
|
69
|
+
if clean
|
70
|
+
remove_dir build_output_dir
|
71
|
+
end
|
72
|
+
|
73
|
+
build_steps = 'build'
|
74
|
+
if clean
|
75
|
+
build_steps = 'clean ' + build_steps
|
76
|
+
end
|
68
77
|
|
69
78
|
extra_opts = XCODEBUILD_OPTIONS.map{ |o| "-#{o} #{options[o]}" if options[o] }.compact.join(' ')
|
70
79
|
extra_opts += " -arch #{options['arch']}"
|
71
80
|
|
72
|
-
run %Q|xcodebuild -xcconfig Frank/frankify.xcconfig
|
81
|
+
run %Q|xcodebuild -xcconfig Frank/frankify.xcconfig #{build_steps} #{extra_opts} -configuration Debug -sdk iphonesimulator DEPLOYMENT_LOCATION=YES DSTROOT="#{build_output_dir}" FRANK_LIBRARY_SEARCH_PATHS="\\"#{frank_lib_directory}\\""|
|
73
82
|
|
74
|
-
|
83
|
+
app = Dir.glob("#{build_output_dir}/*.app").delete_if { |x| x =~ /\/#{app_bundle_name}$/ }
|
84
|
+
app = app.first
|
85
|
+
FileUtils.cp_r("#{app}/.", frankified_app_dir)
|
75
86
|
|
76
87
|
fix_frankified_apps_bundle_identifier
|
77
88
|
|
@@ -4,37 +4,42 @@ require 'rspec/expectations'
|
|
4
4
|
|
5
5
|
# -- See -- #
|
6
6
|
Then /^I wait to see "([^\"]*)"$/ do |expected_mark|
|
7
|
-
|
7
|
+
quote = get_selector_quote(expected_mark)
|
8
|
+
wait_until(:message => "waited to see view marked #{quote}#{expected_mark}#{quote}"){
|
8
9
|
view_with_mark_exists( expected_mark )
|
9
10
|
}
|
10
11
|
end
|
11
12
|
|
12
13
|
Then /^I wait to not see "([^\"]*)"$/ do |expected_mark|
|
13
14
|
sleep 3 # ugh, this should be removed but I'm worried it'll break existing tests
|
14
|
-
|
15
|
-
wait_until(:message => "waited to not see view marked
|
15
|
+
quote = get_selector_quote(expected_mark)
|
16
|
+
wait_until(:message => "waited to not see view marked #{quote}#{expected_mark}#{quote}"){
|
16
17
|
!view_with_mark_exists( expected_mark )
|
17
18
|
}
|
18
19
|
end
|
19
20
|
|
20
21
|
Then /^I should see a navigation bar titled "([^\"]*)"$/ do |expected_mark|
|
21
|
-
|
22
|
+
quote = get_selector_quote(expected_mark)
|
23
|
+
check_element_exists( "navigationItemView marked:#{quote}#{expected_mark}#{quote}" )
|
22
24
|
end
|
23
25
|
|
24
26
|
Then /^I wait to see a navigation bar titled "([^\"]*)"$/ do |expected_mark|
|
25
|
-
|
26
|
-
|
27
|
+
quote = get_selector_quote(expected_mark)
|
28
|
+
wait_until( :timeout => 30, :message => "waited to see a navigation bar titled #{quote}#{expected_mark}#{quote}" ) {
|
29
|
+
element_exists( "navigationItemView marked:#{quote}#{expected_mark}#{quote}" )
|
27
30
|
}
|
28
31
|
end
|
29
32
|
|
30
33
|
Then /^I wait to not see a navigation bar titled "([^\"]*)"$/ do |expected_mark|
|
31
|
-
|
32
|
-
|
34
|
+
quote = get_selector_quote(expected_mark)
|
35
|
+
wait_until( :timeout => 30, :message => "waited to not see a navigation bar titled #{quote}#{expected_mark}#{quote}" ) {
|
36
|
+
!element_exists( "navigationItemView marked:#{quote}#{expected_mark}#{quote}" )
|
33
37
|
}
|
34
38
|
end
|
35
39
|
|
36
40
|
Then /^I should see a "([^\"]*)" button$/ do |expected_mark|
|
37
|
-
|
41
|
+
quote = get_selector_quote(expected_mark)
|
42
|
+
check_element_exists("button marked:#{quote}#{expected_mark}#{quote}")
|
38
43
|
end
|
39
44
|
|
40
45
|
Then /^I should see "([^\"]*)"$/ do |expected_mark|
|
@@ -42,7 +47,8 @@ Then /^I should see "([^\"]*)"$/ do |expected_mark|
|
|
42
47
|
end
|
43
48
|
|
44
49
|
Then /^I should not see "([^\"]*)"$/ do |expected_mark|
|
45
|
-
|
50
|
+
quote = get_selector_quote(expected_mark)
|
51
|
+
check_element_does_not_exist("view marked:#{quote}#{expected_mark}#{quote}")
|
46
52
|
end
|
47
53
|
|
48
54
|
Then /I should see the following:/ do |table|
|
@@ -64,6 +70,11 @@ Then /^I should see an alert view titled "([^\"]*)"$/ do |expected_mark|
|
|
64
70
|
values.should include(expected_mark)
|
65
71
|
end
|
66
72
|
|
73
|
+
Then /^I should see an alert view with the message "([^\"]*)"$/ do |expected_mark|
|
74
|
+
values = frankly_map( 'alertView', 'message')
|
75
|
+
values.should include(expected_mark)
|
76
|
+
end
|
77
|
+
|
67
78
|
Then /^I should not see an alert view$/ do
|
68
79
|
check_element_does_not_exist( 'alertView' )
|
69
80
|
end
|
@@ -71,20 +82,24 @@ end
|
|
71
82
|
Then /^I should see an element of class "([^\"]*)" with name "([^\"]*)" with the following labels: "([^\"]*)"$/ do |className, classLabel, listOfLabels|
|
72
83
|
arrayOfLabels = listOfLabels.split(',');
|
73
84
|
arrayOfLabels.each do |label|
|
74
|
-
|
85
|
+
quote = get_selector_quote(label)
|
86
|
+
check_element_exists("view marked:'#{classLabel}' parent view:'#{className}' descendant view marked:#{quote}#{label}#{quote}")
|
75
87
|
end
|
76
88
|
end
|
77
89
|
|
78
90
|
Then /^I should see an element of class "([^\"]*)" with name "([^\"]*)" with a "([^\"]*)" button$/ do |className, classLabel, buttonName|
|
79
|
-
|
91
|
+
quote = get_selector_quote(buttonName)
|
92
|
+
check_element_exists("view marked:'#{classLabel}' parent view:'#{className}' descendant button marked:#{quote}#{buttonName}#{quote}")
|
80
93
|
end
|
81
94
|
|
82
95
|
Then /^I should not see a hidden button marked "([^\"]*)"$/ do |expected_mark|
|
83
|
-
|
96
|
+
quote = get_selector_quote(expected_mark)
|
97
|
+
element_is_not_hidden("button marked:#{quote}#{expected_mark}#{quote}").should be_false
|
84
98
|
end
|
85
99
|
|
86
100
|
Then /^I should see a nonhidden button marked "([^\"]*)"$/ do |expected_mark|
|
87
|
-
|
101
|
+
quote = get_selector_quote(expected_mark)
|
102
|
+
element_is_not_hidden("button marked:#{quote}#{expected_mark}#{quote}").should be_true
|
88
103
|
end
|
89
104
|
|
90
105
|
Then /^I should see an element of class "([^\"]*)"$/ do |className|
|
@@ -101,8 +116,9 @@ end
|
|
101
116
|
# -- Type/Fill in -- #
|
102
117
|
|
103
118
|
When /^I type "([^\"]*)" into the "([^\"]*)" text field$/ do |text_to_type, field_name|
|
104
|
-
|
105
|
-
|
119
|
+
quote = get_selector_quote(field_name)
|
120
|
+
text_fields_modified = frankly_map( "textField placeholder:#{quote}#{field_name}#{quote}", "setText:", text_to_type )
|
121
|
+
raise "could not find text fields with placeholder #{quote}#{field_name}#{quote}" if text_fields_modified.empty?
|
106
122
|
#TODO raise warning if text_fields_modified.count > 1
|
107
123
|
end
|
108
124
|
|
@@ -154,7 +170,8 @@ end
|
|
154
170
|
# -- touch -- #
|
155
171
|
# generic views
|
156
172
|
When /^I touch "([^\"]*)"$/ do |mark|
|
157
|
-
|
173
|
+
quote = get_selector_quote(mark)
|
174
|
+
selector = "view marked:#{quote}#{mark}#{quote} first"
|
158
175
|
if element_exists(selector)
|
159
176
|
touch( selector )
|
160
177
|
else
|
@@ -165,10 +182,10 @@ end
|
|
165
182
|
|
166
183
|
When /^I touch "([^\"]*)" if exists$/ do |mark|
|
167
184
|
sleep 1
|
168
|
-
|
185
|
+
quote = get_selector_quote(mark)
|
186
|
+
selector = "view marked:#{quote}#{mark}#{quote} first"
|
169
187
|
if element_exists(selector)
|
170
188
|
touch(selector)
|
171
|
-
sleep 1
|
172
189
|
end
|
173
190
|
end
|
174
191
|
|
@@ -178,7 +195,8 @@ When /^I touch the first table cell$/ do
|
|
178
195
|
end
|
179
196
|
|
180
197
|
When /^I touch the table cell marked "([^\"]*)"$/ do |mark|
|
181
|
-
|
198
|
+
quote = get_selector_quote(mark)
|
199
|
+
touch("tableViewCell marked:#{quote}#{mark}#{quote}")
|
182
200
|
end
|
183
201
|
|
184
202
|
When /^I touch the (\d*)(?:st|nd|rd|th)? table cell$/ do |ordinal|
|
@@ -189,19 +207,22 @@ end
|
|
189
207
|
Then /I touch the following:/ do |table|
|
190
208
|
values = frankly_map( 'view', 'accessibilityLabel' )
|
191
209
|
table.raw.each do |expected_mark|
|
192
|
-
|
210
|
+
quote = get_selector_quote(expected_mark)
|
211
|
+
touch( "view marked:#{quote}#{expected_mark}#{quote}" )
|
193
212
|
sleep 2
|
194
213
|
end
|
195
214
|
end
|
196
215
|
|
197
216
|
# buttons
|
198
217
|
When /^I touch the button marked "([^\"]*)"$/ do |mark|
|
199
|
-
|
218
|
+
quote = get_selector_quote(mark)
|
219
|
+
touch( "button marked:#{quote}#{mark}#{quote}" )
|
200
220
|
end
|
201
221
|
|
202
222
|
# action sheets
|
203
223
|
When /^I touch the "([^\"]*)" action sheet button$/ do |mark|
|
204
|
-
|
224
|
+
quote = get_selector_quote(mark)
|
225
|
+
touch( "actionSheet threePartButton marked:#{quote}#{mark}#{quote}" )
|
205
226
|
end
|
206
227
|
|
207
228
|
When /^I touch the (\d*)(?:st|nd|rd|th)? action sheet button$/ do |ordinal|
|
@@ -211,7 +232,8 @@ end
|
|
211
232
|
|
212
233
|
# alert views
|
213
234
|
When /^I touch the "([^\"]*)" alert view button$/ do |mark|
|
214
|
-
|
235
|
+
quote = get_selector_quote(mark)
|
236
|
+
touch( "alertView threePartButton marked:#{quote}#{mark}#{quote}" )
|
215
237
|
end
|
216
238
|
|
217
239
|
When /^I touch the (\d*)(?:st|nd|rd|th)? alert view button$/ do |ordinal|
|
@@ -222,14 +244,16 @@ end
|
|
222
244
|
# -- switch -- #
|
223
245
|
|
224
246
|
When /^I flip switch "([^\"]*)"$/ do |mark|
|
225
|
-
|
247
|
+
quote = get_selector_quote(mark)
|
248
|
+
touch("view:'UISwitch' marked:#{quote}#{mark}#{quote}")
|
226
249
|
end
|
227
250
|
|
228
251
|
|
229
252
|
Then /^switch "([^\"]*)" should be (on|off)$/ do |mark,expected_state|
|
230
253
|
expected_state = expected_state == 'on'
|
231
|
-
|
232
|
-
|
254
|
+
|
255
|
+
quote = get_selector_quote(mark)
|
256
|
+
selector = "view:'UISwitch' marked:#{quote}#{mark}#{quote}"
|
233
257
|
switch_states = frankly_map( selector, "isOn" )
|
234
258
|
|
235
259
|
switch_states.each do |switch_state|
|
@@ -247,7 +271,8 @@ end
|
|
247
271
|
Then /^a pop\-over menu is displayed with the following:$/ do |table|
|
248
272
|
sleep 1
|
249
273
|
table.raw.each do |expected_mark|
|
250
|
-
|
274
|
+
quote = get_selector_quote(expected_mark)
|
275
|
+
check_element_exists "actionSheet view marked:#{quote}#{expected_mark}#{quote}"
|
251
276
|
end
|
252
277
|
end
|
253
278
|
|