features/step_definitions/table_steps.rb in briar-0.0.8 vs features/step_definitions/table_steps.rb in briar-0.0.9

- old
+ new

@@ -18,10 +18,11 @@ pending "deprecated 0.0.8 - use 'Then I scroll to the \"#{row_id}\" row'" end Then /^I touch (?:the) "([^"]*)" row and wait for (?:the) "([^"]*)" view to appear$/ do |row_id, view_id| wait_for_row row_id + step_pause touch_row_and_wait_to_see row_id, view_id end Then /^I touch the "([^"]*)" row on the "([^"]*)" table and wait for the "([^"]*)" view to appear$/ do |row_id, table_id, view_id| wait_for_row row_id @@ -92,16 +93,21 @@ Then /^I should see that the text I just entered is in the "([^"]*)" row "([^"]*)" label$/ do |row_id, label_id| should_see_row_with_label_with_text row_id, label_id, @text_entered_by_keyboard end Then /^I move the "([^"]*)" row (up|down) (\d+) times? using the reorder edit control$/ do |row_id, dir, n| + if device.ios7? + pending 'reordering on iOS 7 (more specifically playback) is not supported' + end + should_see_row row_id dir_str = (dir.eql?('up')) ? 'drag_row_up' : 'drag_row_down' - n.to_i.times do ( - playback(dir_str, - {:query => "tableViewCell marked:'#{row_id}' descendant tableViewCellReorderControl"}) - step_pause) + n.to_i.times do + ( + playback(dir_str, + {:query => "tableViewCell marked:'#{row_id}' descendant tableViewCellReorderControl"}) + step_pause) end end Then /^I should (see|not see) (?:the|an?) "([^"]*)" table$/ do |visibility, table_id| if visibility.eql?('see') @@ -111,17 +117,17 @@ end end Then /^I should see a "([^"]*)" button in the "([^"]*)" row$/ do |button_id, row_id| should_see_row row_id - arr = query("tableViewCell marked:'#{row_id}' descendant child tableViewCellContentView child button marked:'#{button_id}'", AI) + arr = query("tableViewCell marked:'#{row_id}' descendant button marked:'#{button_id}'", AI) (arr.length == 1) end Then /^I touch the "([^"]*)" button in the "([^"]*)" row$/ do |button_id, row_id| should_see_row row_id - touch("tableViewCell marked:'#{row_id}' child tableViewCellContentView child button marked:'#{button_id}'") + touch("tableViewCell marked:'#{row_id}' descendant button marked:'#{button_id}'") end Then /^I should see a switch for "([^"]*)" in the "([^"]*)" row that is in the "([^"]*)" position$/ do |switch_id, row_id, on_off| should_see_switch_in_row_with_state switch_id, row_id, (on_off.eql? 'on') ? 1 : 0 end @@ -149,7 +155,12 @@ touch_text_field_in_row_and_wait_for_keyboard text_field_id, row_id end Then /^I should see that the "([^"]*)" row has image "([^"]*)"$/ do |row_id, image_id| should_see_row_with_image row_id, image_id +end + + +Then(/^I should see that the "([^"]*)" row has no text in the "([^"]*)" label$/) do |row_id, label_id| + should_see_row_with_label_that_has_no_text end