briar 0.0.7 → 0.0.8
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.
- checksums.yaml +8 -8
- data/Rakefile +6 -11
- data/bin/briar +58 -0
- data/bin/briar_helpers.rb +28 -2
- data/briar.gemspec +3 -2
- data/features/step_definitions/alerts_and_sheets/action_sheet_steps.rb +10 -4
- data/features/step_definitions/alerts_and_sheets/alert_view_steps.rb +3 -10
- data/features/step_definitions/bars/navbar_steps.rb +1 -9
- data/features/step_definitions/bars/tabbar_steps.rb +2 -4
- data/features/step_definitions/bars/toolbar_steps.rb +2 -11
- data/features/step_definitions/control/button_steps.rb +3 -8
- data/features/step_definitions/control/segmented_control_steps.rb +20 -58
- data/features/step_definitions/email_steps.rb +10 -7
- data/features/step_definitions/keyboard_steps.rb +7 -2
- data/features/step_definitions/picker/date_picker_steps.rb +21 -177
- data/features/step_definitions/table_steps.rb +35 -71
- data/features/step_definitions/text_field_steps.rb +1 -5
- data/features/step_definitions/text_view_steps.rb +2 -2
- data/install-calabash-framework.sh.example +10 -0
- data/lib/briar.rb +31 -5
- data/lib/briar/alerts_and_sheets/action_sheet.rb +99 -0
- data/lib/briar/alerts_and_sheets/alert_view.rb +25 -4
- data/lib/briar/bars/navbar.rb +30 -19
- data/lib/briar/bars/tabbar.rb +7 -4
- data/lib/briar/bars/toolbar.rb +14 -1
- data/lib/briar/briar_core.rb +46 -15
- data/lib/briar/control/button.rb +35 -1
- data/lib/briar/control/segmented_control.rb +69 -8
- data/lib/briar/control/slider.rb +2 -2
- data/lib/briar/cucumber.rb +3 -1
- data/lib/briar/email.rb +19 -13
- data/lib/briar/keyboard.rb +50 -10
- data/lib/briar/label.rb +20 -0
- data/lib/briar/picker/date_picker.rb +88 -584
- data/lib/briar/picker/date_picker_core.rb +293 -0
- data/lib/briar/picker/date_picker_manipulation.rb +255 -0
- data/lib/briar/picker/picker.rb +10 -0
- data/lib/briar/table.rb +261 -93
- data/lib/briar/version.rb +1 -1
- data/spec/spec_helper.rb +0 -2
- metadata +14 -13
- data/lib/briar/gestalt.rb +0 -87
- data/spec/briar/gestalt_spec.rb +0 -66
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWQxYjFjZTk0YzdhM2U1ZDE1OGNhMGJiMTM1YzdiM2ViNDJjN2I3Ng==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzUwZTIwMzg1YjRlMjllYjhiZDhiNzkzYzcyZTliOWI3ZDYzNWM3Mg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTc4NzUwMzUxYjc3OTkwOGYxNjdhNWEwZDYwZTQ3OGM3ZDFmODlhM2Q5Nzg4
|
10
|
+
ZGVjZTJhMWU3NDcxMGIxNzExMzk3MzFiNDE4OTUzNjYxMTM0MzkxY2ViY2Zk
|
11
|
+
YTIzNTU4MDBhOWE5NWQ1NTM2ZDBjZjQzNzMyMjlkZjMxZGM3ZjA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjA3YTRhNTFlODZlMGU1ODJhMzMzM2Q1ZTZhYjg0ZWUxN2E4ZmQ4ZTI2YzE4
|
14
|
+
OGRiMTA4YjM4MDZiZWRkZjE3MjdlMzI0OWM3MDRjOGUyMjk1MThkYzYxNWFi
|
15
|
+
NGY3NTg3OWZkOTNmOTk5MWU0N2Y2ZWQxMGM3YzQ3YjUzMDFmMzM=
|
data/Rakefile
CHANGED
@@ -5,14 +5,9 @@ task :show_simulator do
|
|
5
5
|
sh "/usr/bin/osascript -e 'tell application \"RubyMine\" to activate'"
|
6
6
|
end
|
7
7
|
|
8
|
-
#
|
9
|
-
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
|
14
|
-
#task :push do
|
15
|
-
# sh 'gem update'
|
16
|
-
# sh 'gem build briar.gemspec'
|
17
|
-
# sh "gem push briar-#{Briar::VERSION}.gem"
|
18
|
-
#end
|
8
|
+
# let us try to use gem_tasks
|
9
|
+
#$ rake -T
|
10
|
+
#rake build # Build briar-0.0.7.gem into the pkg directory.
|
11
|
+
#rake install # Build and install briar-0.0.7.gem into system gems.
|
12
|
+
#rake release # Create tag v0.0.7 and build and push briar-0.0.7.gem to Rubygems
|
13
|
+
|
data/bin/briar
CHANGED
@@ -38,6 +38,64 @@ elsif cmd == BRIAR_RM_CAL_TARGETS
|
|
38
38
|
FileUtils.rm_r path
|
39
39
|
end
|
40
40
|
|
41
|
+
elsif cmd == BRIAR_INSTALL_CALABASH_GEM
|
42
|
+
puts 'will install calabash-cucumber gem'
|
43
|
+
gem_dir = "#{ENV['HOME']}/git/calabash-ios/calabash-cucumber"
|
44
|
+
unless File.exists?(gem_dir)
|
45
|
+
puts "expected gem '#{gem_dir}' - cannot install the calabash-cucumber gem"
|
46
|
+
exit 1
|
47
|
+
end
|
48
|
+
system("cd #{gem_dir}; rake install")
|
49
|
+
|
50
|
+
elsif cmd == BRIAR_INSTALL_GEM
|
51
|
+
puts 'will install briar gem'
|
52
|
+
gem_dir = "#{ENV['HOME']}/git/briar"
|
53
|
+
unless File.exists?(gem_dir)
|
54
|
+
puts "expected gem '#{gem_dir}' - cannot install the briar gem"
|
55
|
+
exit 1
|
56
|
+
end
|
57
|
+
system("cd #{gem_dir}; rake install")
|
58
|
+
|
59
|
+
elsif cmd == BRIAR_INSTALL_CALABASH_SERVER
|
60
|
+
puts 'will install calabash-ios server'
|
61
|
+
cal_framework = 'calabash.framework'
|
62
|
+
unless File.exists?(cal_framework)
|
63
|
+
puts "expected '#{cal_framework}' to be in the local directory."
|
64
|
+
puts "run this command in the directory that contins '#{cal_framework}'"
|
65
|
+
exit 1
|
66
|
+
end
|
67
|
+
|
68
|
+
gem_dir = "#{ENV['HOME']}/git/calabash-ios/calabash-cucumber"
|
69
|
+
unless File.exists?(gem_dir)
|
70
|
+
puts "expected gem '#{gem_dir}' - cannot install the calabash server"
|
71
|
+
exit 1
|
72
|
+
end
|
73
|
+
|
74
|
+
server_dir = "#{ENV['HOME']}/git/calabash-ios-server"
|
75
|
+
unless File.exists?(server_dir)
|
76
|
+
puts "expected calabash-ios server to be in dir '#{server_dir}'"
|
77
|
+
puts "will not be able run '#{gem_dir}/rake build_server'"
|
78
|
+
exit 1
|
79
|
+
end
|
80
|
+
|
81
|
+
version_file = File.read("#{server_dir}/calabash/Classes/FranklyServer/Routes/LPVersionRoute.h")
|
82
|
+
tokens = version_file.split(/define kLPCALABASHVERSION/)
|
83
|
+
line = tokens[1].split("\n").first
|
84
|
+
version = line.tr('^A-Za-z0-9.\-\_', '')
|
85
|
+
|
86
|
+
puts "building calabash server using 'rake build_server'"
|
87
|
+
system("cd #{gem_dir}; rake build_server")
|
88
|
+
puts 'remove old cal simulator targets'
|
89
|
+
system('briar rm-cal-targets')
|
90
|
+
puts 'copying new framework to ./'
|
91
|
+
system("cp #{gem_dir}/staticlib/#{cal_framework}.zip ./")
|
92
|
+
puts 'removing old framework'
|
93
|
+
system("rm -rf #{cal_framework}")
|
94
|
+
puts 'unzipping new framework'
|
95
|
+
system("unzip #{cal_framework}.zip")
|
96
|
+
puts 'cleaning up'
|
97
|
+
system("rm -rf #{cal_framework}.zip")
|
98
|
+
puts "installed new server version '#{version}'"
|
41
99
|
else
|
42
100
|
print_usage
|
43
101
|
exit 1
|
data/bin/briar_helpers.rb
CHANGED
@@ -1,14 +1,40 @@
|
|
1
1
|
require 'briar'
|
2
2
|
|
3
3
|
BRIAR_RM_CAL_TARGETS='rm-cal-targets'
|
4
|
+
BRIAR_INSTALL_CALABASH_GEM='install-calabash-gem'
|
5
|
+
BRIAR_INSTALL_CALABASH_SERVER='install-calabash-server'
|
6
|
+
BRIAR_INSTALL_GEM='gem'
|
4
7
|
|
5
8
|
def print_usage
|
6
9
|
puts <<EOF
|
7
10
|
briar #{Briar::VERSION}
|
8
|
-
|
9
|
-
|
11
|
+
|
12
|
+
briar #{BRIAR_RM_CAL_TARGETS}
|
13
|
+
WARN: this is a destructive operation!
|
14
|
+
* deletes all *-cal targets from simulator
|
15
|
+
you have been warned.
|
10
16
|
searches the ~/Library/Application Support/iPhone Simulator for *-cal.app
|
11
17
|
targets and deletes the enclosing directory. useful for clearing out old
|
12
18
|
calabash targets when the framework needs to be updated.
|
19
|
+
|
20
|
+
briar #{BRIAR_INSTALL_GEM}
|
21
|
+
looks for ~/git/briar and runs 'rake install'. useful for developing and
|
22
|
+
testing the briar gem
|
23
|
+
|
24
|
+
briar #{BRIAR_INSTALL_CALABASH_GEM}
|
25
|
+
looks for ~/git/calabash-ios/calabash-cucumber directory and runs
|
26
|
+
'rake install' to install the calabash-cucumber gem. useful for developing
|
27
|
+
and testing the calabash-cucumber gem.
|
28
|
+
|
29
|
+
briar #{BRIAR_INSTALL_CALABASH_SERVER}
|
30
|
+
WARN: this is a destructive operation!
|
31
|
+
* replaces calabash.framework in current directory
|
32
|
+
* deletes all *-cal targets from simulator
|
33
|
+
you have been warned.
|
34
|
+
|
35
|
+
builds and installs the calabash server using calabash-cucumber rake task
|
36
|
+
'rake rake build_server', removes all *-cal targets from simulator, and
|
37
|
+
replaces calabash.framework in local directory. useful for developing and
|
38
|
+
testing the calabash-ios-server.
|
13
39
|
EOF
|
14
40
|
end
|
data/briar.gemspec
CHANGED
@@ -14,8 +14,9 @@ Gem::Specification.new do |gem|
|
|
14
14
|
gem.homepage = 'https://github.com/jmoody/briar'
|
15
15
|
gem.license = 'MIT'
|
16
16
|
|
17
|
-
gem.add_runtime_dependency 'calabash-cucumber'
|
18
|
-
gem.add_runtime_dependency '
|
17
|
+
#gem.add_runtime_dependency 'calabash-cucumber'
|
18
|
+
gem.add_runtime_dependency 'calabash-cucumber', '0.9.151'
|
19
|
+
gem.add_runtime_dependency 'rake', '10.1.0'
|
19
20
|
gem.add_runtime_dependency 'bundler'
|
20
21
|
gem.add_runtime_dependency 'lesspainful'
|
21
22
|
gem.add_runtime_dependency 'syntax'
|
@@ -1,6 +1,12 @@
|
|
1
1
|
Then /^I touch the "([^"]*)" button on the action sheet$/ do |button_title|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
timeout = 1.0
|
3
|
+
msg = "waited for '#{timeout}' seconds but did not see sheet with button '#{button_title}'"
|
4
|
+
options = {:timeout => timeout,
|
5
|
+
:retry_frequency => 0.2,
|
6
|
+
:post_timeout => 0.1,
|
7
|
+
:timeout_message => msg}
|
8
|
+
wait_for(options) do
|
9
|
+
not query('actionSheet').empty?
|
10
|
+
end
|
11
|
+
touch_sheet_button button_title
|
6
12
|
end
|
@@ -3,20 +3,13 @@ Then /^I should see alert with "([^"]*)" button$/ do |button_id|
|
|
3
3
|
end
|
4
4
|
|
5
5
|
Then /^I should see alert with title "([^"]*)"$/ do |title|
|
6
|
-
|
7
|
-
screenshot_and_raise "i do not see an alert view with title '#{title}'"
|
8
|
-
end
|
6
|
+
should_see_alert_with_title title
|
9
7
|
end
|
10
8
|
|
11
9
|
Then /^I should see alert with message "([^"]*)"$/ do |message|
|
12
|
-
|
13
|
-
screenshot_and_raise "i do not see an alert view with message '#{message}'"
|
14
|
-
end
|
10
|
+
should_see_alert_with_message message
|
15
11
|
end
|
16
12
|
|
17
13
|
Then /^I should not see an alert$/ do
|
18
|
-
|
19
|
-
unless res.empty?
|
20
|
-
screenshot_and_raise "i expected to see no alert view, but found '#{res}'"
|
21
|
-
end
|
14
|
+
should_not_see_alert
|
22
15
|
end
|
@@ -40,15 +40,7 @@ Then /^I should (not see|see) (?:the|an?) "([^"]*)" button in the navbar$/ do |v
|
|
40
40
|
end
|
41
41
|
|
42
42
|
When /^I touch the "([^"]*)" navbar button, then I should see the "([^"]*)" view$/ do |button_name, view_id|
|
43
|
-
|
44
|
-
if idx
|
45
|
-
touch_transition("navigationButton index:#{idx}",
|
46
|
-
"view marked:'#{view_id}'",
|
47
|
-
{:timeout=>TOUCH_TRANSITION_TIMEOUT,
|
48
|
-
:retry_frequency=>TOUCH_TRANSITION_RETRY_FREQ})
|
49
|
-
else
|
50
|
-
screenshot_and_raise "could not find navbar item '#{button_name}'"
|
51
|
-
end
|
43
|
+
touch_navbar_item_and_wait_for_view button_name, view_id
|
52
44
|
end
|
53
45
|
|
54
46
|
Then /^I go back after waiting$/ do
|
@@ -6,7 +6,7 @@ end
|
|
6
6
|
|
7
7
|
Then /^the tabbar is visible$/ do
|
8
8
|
pending "deprecated 0.0.5 - use 'Then I should see the tabbar'"
|
9
|
-
|
9
|
+
should_see_tabbar
|
10
10
|
end
|
11
11
|
|
12
12
|
|
@@ -23,9 +23,7 @@ Then /I touch (?:the) "([^"]*)" tab$/ do |name|
|
|
23
23
|
end
|
24
24
|
|
25
25
|
When /^I touch the "([^"]*)" tab I should see the "([^"]*)" view$/ do |tab_label, view_id|
|
26
|
-
|
27
|
-
touch_tabbar_item tab_label
|
28
|
-
should_see_view_after_animation view_id
|
26
|
+
touch_tabbar_item tab_label, view_id
|
29
27
|
end
|
30
28
|
|
31
29
|
Then /^I should see "([^"]*)" tabs$/ do |list_of_tabs|
|
@@ -1,17 +1,8 @@
|
|
1
|
-
#include Briar::Bars
|
2
|
-
#include Briar::Core
|
3
|
-
|
4
1
|
Then /^I touch the "([^"]*)" toolbar button$/ do |name|
|
5
|
-
|
6
|
-
touch("toolbar descendant view marked:'#{name}'")
|
7
|
-
step_pause
|
2
|
+
touch_toolbar_button name
|
8
3
|
end
|
9
4
|
|
10
5
|
When /^I touch the "([^"]*)" toolbar button, then I should see the "([^"]*)" view$/ do |button_name, view_id|
|
11
|
-
|
12
|
-
touch_transition("toolbar descendant view marked:'done with info'",
|
13
|
-
"view marked:'#{view_id}'",
|
14
|
-
{:timeout=>TOUCH_TRANSITION_TIMEOUT,
|
15
|
-
:retry_frequency=>TOUCH_TRANSITION_RETRY_FREQ})
|
6
|
+
touch_toolbar_button button_name, view_id
|
16
7
|
end
|
17
8
|
|
@@ -1,16 +1,10 @@
|
|
1
1
|
|
2
2
|
When /^I touch (?:the|a) "([^"]*)" button, then I should see the "([^"]*)" view$/ do |button_id, view_id|
|
3
|
-
|
4
|
-
"view marked:'#{view_id}'",
|
5
|
-
{:timeout=>TOUCH_TRANSITION_TIMEOUT,
|
6
|
-
:retry_frequency=>TOUCH_TRANSITION_RETRY_FREQ})
|
3
|
+
touch_button_and_wait_for_view button_id, view_id
|
7
4
|
end
|
8
5
|
|
9
6
|
Then /^I touch (?:the|a) "([^"]*)" button and wait for (?:the|a) "([^"]*)" view$/ do |button_id, view_id|
|
10
|
-
|
11
|
-
"view marked:'#{view_id}'",
|
12
|
-
{:timeout=>TOUCH_TRANSITION_TIMEOUT,
|
13
|
-
:retry_frequency=>TOUCH_TRANSITION_RETRY_FREQ})
|
7
|
+
touch_button_and_wait_for_view button_id, view_id
|
14
8
|
end
|
15
9
|
|
16
10
|
Then /^I should see (?:the|a) "([^"]*)" button has title "([^"]*)"$/ do |button_id, title|
|
@@ -19,6 +13,7 @@ end
|
|
19
13
|
|
20
14
|
# as of 0.9.136 - I should (not)? see a ... button
|
21
15
|
# conflicts with calabash predefined steps
|
16
|
+
#Then /^I should( not)? see (?:the|an?) "([^"]*)" button$/ do |visibility, button_id|
|
22
17
|
Then /^I should( not)? see (?:the|an) "([^"]*)" button$/ do |visibility, button_id|
|
23
18
|
visibility ? should_not_see_button(button_id) : should_see_button(button_id)
|
24
19
|
end
|
@@ -1,85 +1,47 @@
|
|
1
|
-
#include Briar::Control::Segmented_Control
|
2
1
|
|
3
|
-
Then /^I should see segmented control "([^"]*)" with titles "([^"]*)"$/ do |
|
4
|
-
|
5
|
-
should_see_view control_name
|
6
|
-
tokens = titles.split(",")
|
7
|
-
tokens.each do |token|
|
8
|
-
token.strip!
|
9
|
-
end
|
10
|
-
idx = index_of_control_with_name control_name
|
11
|
-
if idx
|
12
|
-
actual_titles = query("segmentedControl index:#{idx} child segment child segmentLabel", :text).reverse
|
13
|
-
counter = 0
|
14
|
-
tokens.zip(actual_titles).each do |expected, actual|
|
15
|
-
unless actual.eql? expected
|
16
|
-
screenshot_and_raise "when inspecting #{control_name} i expected title: #{expected} but found: #{actual} at index #{counter}"
|
17
|
-
end
|
18
|
-
counter = counter + 1
|
19
|
-
end
|
20
|
-
else
|
21
|
-
screenshot_and_raise "could not find segmented control with name #{control_name}"
|
22
|
-
end
|
2
|
+
Then /^I should see segmented control "([^"]*)" with titles "([^"]*)"$/ do |control_id, titles|
|
3
|
+
should_see_control_with_segment_titles control_id, titles
|
23
4
|
end
|
24
5
|
|
25
|
-
Then /^I touch segment "([^"]*)" in segmented control "([^"]*)"$/ do |
|
26
|
-
|
27
|
-
@control_name = control_name
|
28
|
-
idx = index_of_control_with_name control_name
|
29
|
-
if idx
|
30
|
-
touch("segmentedControl index:#{idx} child segment child segmentLabel marked:'#{segment_name}'")
|
31
|
-
wait_for_animation
|
32
|
-
else
|
33
|
-
screenshot_and_raise "could not find segmented control with name #{control_name}"
|
34
|
-
end
|
6
|
+
Then /^I touch segment "([^"]*)" in segmented control "([^"]*)"$/ do |segment_id, control_id|
|
7
|
+
touch_segment segment_id, control_id
|
35
8
|
end
|
36
9
|
|
37
10
|
|
38
|
-
Then /^I should see segment "([^"]*)" in segmented control "([^"]*)" (is|is not) selected$/ do |
|
39
|
-
|
40
|
-
@control_name = control_name
|
41
|
-
control_idx = index_of_control_with_name control_name
|
42
|
-
if control_idx
|
43
|
-
segment_idx = index_of_segment_with_name_in_control_with_name(segment_name, control_name)
|
44
|
-
if segment_idx
|
45
|
-
selected_arr = query("segmentedControl index:#{control_idx} child segment", :isSelected).reverse
|
46
|
-
res = selected_arr[segment_idx]
|
47
|
-
target = selectedness.eql?("is") ? 1 : 0
|
48
|
-
unless res.to_i == target
|
49
|
-
screenshot_and_raise "found segment named #{segment_name} in #{control_name}, but it was _not_ selected"
|
50
|
-
end
|
51
|
-
else
|
52
|
-
screenshot_and_raise "could not find #{segment_name} in #{control_name}"
|
53
|
-
end
|
54
|
-
else
|
55
|
-
screenshot_and_raise "could not find control named #{control_name}"
|
56
|
-
end
|
11
|
+
Then /^I should see segment "([^"]*)" in segmented control "([^"]*)" (is|is not) selected$/ do |segment_id, control_id, selectedness|
|
12
|
+
should_see_segment_with_selected_state control_id, segment_id, selectedness.eql?('is') ? 1 : 0
|
57
13
|
end
|
58
14
|
|
59
15
|
Then /^I should see the segment I touched (is|is not) selected and the "([^"]*)" should be set correctly$/ do |selectedness, label_id|
|
60
16
|
@associated_label = label_id
|
61
|
-
|
62
|
-
|
63
|
-
|
17
|
+
should_see_segment_with_selected_state @control_id, @segment_id, selectedness.eql?('is') ? 1 : 0
|
18
|
+
# unexpected!
|
19
|
+
# this is a label outside the control that is set by touching the segment
|
20
|
+
# not so good because it conflates segment_id and the title of the segment
|
21
|
+
should_see_label_with_text label_id, @segment_id
|
64
22
|
end
|
65
23
|
|
66
24
|
Then /^I touch the segment again$/ do
|
67
|
-
|
25
|
+
touch_segment @segment_id, @control_id
|
68
26
|
end
|
69
27
|
|
70
28
|
Then /^I should see the segment is not selected and the detail label is cleared$/ do
|
71
|
-
|
29
|
+
# ugh - that @associated_label variable needs to be set
|
30
|
+
macro %Q|I should see segment "#{@segment_id}" in segmented control "#{@control_id}" is not selected|
|
72
31
|
macro %Q|I should see label "#{@associated_label}" with text ""|
|
73
32
|
end
|
74
33
|
|
75
34
|
Then /^I should see the segment I touched (is|is not) selected and the "([^"]*)" in the "([^"]*)" row should be set correctly$/ do |selectedness, label_id, row_id|
|
35
|
+
# ugh - that @associated_label variable needs to be set
|
76
36
|
@associated_label = label_id
|
77
37
|
@associated_row = row_id
|
78
|
-
macro %Q|I should see segment "#{@
|
79
|
-
should_see_row_with_label_with_text @associated_row, @associated_label, "#{@
|
38
|
+
macro %Q|I should see segment "#{@segment_id}" in segmented control "#{@control_id}" #{selectedness} selected|
|
39
|
+
should_see_row_with_label_with_text @associated_row, @associated_label, "#{@segment_id}"
|
80
40
|
end
|
81
41
|
|
82
42
|
Then /^I should see the segment is not selected and the label in the row is cleared$/ do
|
83
|
-
|
43
|
+
# ugh - difficult to extract to a function because we need the
|
44
|
+
# @associated_row and @associated_label to be set
|
45
|
+
macro %Q|I should see segment "#{@segment_id}" in segmented control "#{@control_id}" is not selected|
|
84
46
|
should_see_row_with_label_with_text @associated_row, @associated_label, ""
|
85
47
|
end
|
@@ -5,9 +5,8 @@ Then /^I should see email body that contains "([^"]*)"$/ do |text|
|
|
5
5
|
end
|
6
6
|
|
7
7
|
Then /^I should see email view with body that contains "([^"]*)"$/ do |text|
|
8
|
-
if
|
8
|
+
if !device.ios5?
|
9
9
|
warn_about_ios6_email_view
|
10
|
-
puts 'WARN: iOS6 detected - cannot test for email views on iOS simulator or devices'
|
11
10
|
else
|
12
11
|
wait_for_animation
|
13
12
|
unless email_body_contains? text
|
@@ -24,7 +23,7 @@ Then /^I touch the "([^"]*)" row and wait to see the email view$/ do |row_id|
|
|
24
23
|
should_see_row row_id
|
25
24
|
touch("tableViewCell marked:'#{row_id}'")
|
26
25
|
wait_for_animation
|
27
|
-
if
|
26
|
+
if !device.ios5?
|
28
27
|
warn_about_ios6_email_view
|
29
28
|
else
|
30
29
|
should_see_mail_view
|
@@ -35,7 +34,7 @@ Then /^I touch the "([^"]*)" row and wait to see the email view$/ do |row_id|
|
|
35
34
|
end
|
36
35
|
|
37
36
|
Then /^I should see email view with "([^"]*)" in the subject$/ do |text|
|
38
|
-
if
|
37
|
+
if !device.ios5?
|
39
38
|
warn_about_ios6_email_view
|
40
39
|
else
|
41
40
|
wait_for_animation
|
@@ -47,7 +46,7 @@ Then /^I should see email view with "([^"]*)" in the subject$/ do |text|
|
|
47
46
|
end
|
48
47
|
|
49
48
|
Then /^I should see email view with recipients? "([^"]*)"$/ do |comma_sep_addrs|
|
50
|
-
if
|
49
|
+
if !device.ios5?
|
51
50
|
warn_about_ios6_email_view
|
52
51
|
else
|
53
52
|
should_see_recipients comma_sep_addrs
|
@@ -60,7 +59,7 @@ Then /^I should see email view with to field set to "([^"]*)"$/ do |text|
|
|
60
59
|
end
|
61
60
|
|
62
61
|
Then /^I should see email view with text like "([^"]*)" in the subject$/ do |text|
|
63
|
-
if
|
62
|
+
if !device.ios5?
|
64
63
|
warn_about_ios6_email_view
|
65
64
|
else
|
66
65
|
should_see_mail_view
|
@@ -72,7 +71,11 @@ Then /^I should see email view with text like "([^"]*)" in the subject$/ do |tex
|
|
72
71
|
end
|
73
72
|
|
74
73
|
When /^I cancel email editing I should see the "([^"]*)" view$/ do |view_id|
|
75
|
-
|
74
|
+
if device.ios5?
|
75
|
+
delete_draft_and_wait_for view_id
|
76
|
+
else
|
77
|
+
warn_about_ios6_email_view
|
78
|
+
end
|
76
79
|
end
|
77
80
|
|
78
81
|
Given(/^we are testing on the simulator or a device configured to send emails$/) do
|