Sha256: 8e3a85d89af0f0850a170741b29ba73ad40ad14b941205409638d72a4c6c3580

Contents?: true

Size: 1.85 KB

Versions: 7

Compression:

Stored size: 1.85 KB

Contents

######### <%= I18n.translate( :given ).upcase %> #########
<%= I18n.translate( :given ).capitalize %>(/^<%= I18n.translate( "steps.drag_until" ) %>$/) do |direction, element|
  @page.drag_until_element_is_visible_with_special_query direction.to_sym, element
end

<%= I18n.translate( :given ).capitalize %>(/^<%= I18n.translate( "steps.page_contains" ) %>$/) do |page_text|
  @page.is_on_page! page_text
end

######### <%= I18n.translate( :when ).upcase %> #########

<%= I18n.translate( :when ).capitalize %>(/^<%= I18n.translate( "steps.drag_number_of_times" ) %>$/) do |direction, times|
  @page.drag_for_specified_number_of_times(direction.to_sym, times.to_i)
end

<%= I18n.translate( :when ).capitalize %>(/^<%= I18n.translate( "steps.touch_element" ) %>$/) do |element|
  @page.touch_screen_element element
end

<%= I18n.translate( :when ).capitalize %>(/^<%= I18n.translate( "steps.drag_screen" ) %>$/) do |direction|
  @page.drag_to direction.to_sym
end

<%= I18n.translate( :when ).capitalize %>(/^<%= I18n.translate( "steps.restart_app" ) %>$/) do
  @page.restart_app
end

######### <%= I18n.translate( :then ).upcase %> #########

<%= I18n.translate( :then ).capitalize %>(/^<%= I18n.translate "steps.wait_progress_bar" %>$/) do
  # wait_for_progress is a method of the base class, so doesn't matter what is
  # the value of the @page variable, because all screens will have this method
  @page.wait_for_progress
end

<%= I18n.translate( :then ).capitalize %>(/^<%= I18n.translate "steps.should_see_page" %>$/) do |page_text|
  @page.is_on_page! page_text
end

<%= I18n.translate( :then ).capitalize %>(/^<%= I18n.translate "steps.should_see_page_that_contains" %>$/) do |page_text|
  @page.is_on_page! page_text
end
<% unless I18n.config.default_locale == :en %>

<%= I18n.translate( :then ).capitalize %>(/^<%= I18n.translate "steps.take_print" %>$/) do
  screenshot_embed
end
<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sunomono-1.0.6 lib/templates/base_steps.tt
sunomono-1.0.5 lib/templates/base_steps.tt
sunomono-1.0.4 lib/templates/base_steps.tt
sunomono-1.0.3 lib/templates/base_steps.tt
sunomono-1.0.0 lib/templates/base_steps.tt
sunomono-0.3.1 lib/templates/base_steps.tt
sunomono-0.3.0 lib/templates/base_steps.tt