Sha256: 87370174a59fa690bcd6359e0850dd237f262be770d5c18a89ac67d02f6d9243

Contents?: true

Size: 657 Bytes

Versions: 2

Compression:

Stored size: 657 Bytes

Contents

Given /^I am on the dashboard page$/ do
  visit(heart_engine.default_dashboards_path)
end

When /^I choose "(.*?)" from the language options$/ do |arg1|
  click_link("lang_#{lang(arg1)}")
end

Then /^the page displays the interface in "(.*?)"$/ do |arg1|
  @language = arg1
  page.should have_content(I18n.t(:no_average, :locale => "#{lang(arg1)}_heart"))
end

Then /^reloading the dashboard page does not revert my language preference$/ do
  visit(default_dashboards_path)
  page.should have_content(I18n.t(:no_average, :locale => "#{lang(@language)}_heart"))
end

def lang(option)
  case option
  when "English"
    :en
  when "Japanese"
    :ja
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
heart-0.0.2 test/dummy/features/step_definitions/language_switching_steps.rb
heart-0.0.1 test/dummy/features/step_definitions/language_switching_steps.rb