Sha256: 1b62db97046ad24a7b40a66cb66ccb35b47ba42f158d9ea81af13105514a0efa

Contents?: true

Size: 1.25 KB

Versions: 5

Compression:

Stored size: 1.25 KB

Contents

require 'spec_helper'

describe "Viewing all translations", :redis => true, :js => true do 
  before(:each) do 
    visit "/lolita/i18n"
  end

  it "User see translations in default language and same translation in other language" do 
    within(".i18n-box .list>table>thead") do 
      page.should have_selector("th", :text => "English")
      page.should have_selector("th>select option[selected]", :text => "Latvian")
    end
  end

  it "User can switch to other language" do
    within(".i18n-box .list>table>thead") do 
      page.select("Russian", :from => "active_locale")
    end
    page.should have_selector("th select option[selected]", :text => "Russian")
  end

  it "User can view only untranslated" do 
    page.should have_selector("textarea", :text => "Virsraksts")
    page.check("show_untranslated")
    page.should have_selector("textarea", :text => "Other")
    page.should_not have_selector("textarea", :text => "Virsraksts")
  end

  it "User can sort original translation in ascending order" do 
    last_trans = page.evaluate_script("$('textarea:last').val()");
    last_trans.should_not eq("zzzz")
    click_link("translation_sort_link")
    new_last_trans = page.evaluate_script("$('textarea:last').val()");
    new_last_trans.should eq("zzzz")
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lolita-i18n-0.5.6 spec/features/translation_list_spec.rb
lolita-i18n-0.5.5 spec/features/translation_list_spec.rb
lolita-i18n-0.5.3 spec/features/translation_list_spec.rb
lolita-i18n-0.5.2 spec/features/translation_list_spec.rb
lolita-i18n-0.5.1 spec/features/translation_list_spec.rb