forked from moredip/Frank
/
table_deletion.rb
30 lines (24 loc) · 1.08 KB
/
table_deletion.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
When /^I confirm table cell deletion$/ do
wait_for_nothing_to_be_animating
touch "view:'UITableViewCellDeleteConfirmationControl'"
wait_for_nothing_to_be_animating
end
When /^I touch the delete edit control for the table view cell "([^"]*)"$/ do |tvc_mark|
delete_control_selector = "view:'UITableViewCell' view marked:'#{tvc_mark}' parent view:'UITableViewCell' view:'UITableViewCellEditControl'"
touch delete_control_selector
end
When /^I should see the confirm deletion button$/ do
check_element_exists("view:'UITableViewCellDeleteConfirmationControl'")
end
When /^I should not see the confirm deletion button$/ do
check_element_does_not_exist("view:'UITableViewCellDeleteConfirmationControl'")
end
Then /^I should not see an "(.*?)" button$/ do |button_mark|
check_element_does_not_exist("button marked:'#{button_mark}'")
end
Then /^I should see an "(.*?)" button$/ do |button_mark|
check_element_exists("button marked:'#{button_mark}'")
end
Then /^I should not see a "(.*?)" button$/ do |button_mark|
check_element_does_not_exist("button marked:'#{button_mark}'")
end