Sha256: 21cc07e8c439385c2b98665bf0748f887cb04c68ecb81c46bd794c107db75ade
Contents?: true
Size: 1.64 KB
Versions: 34
Compression:
Stored size: 1.64 KB
Contents
require "rails_helper" describe "the Languages", js: true do login_success it "Languages list" do admin_sign_in visit "#{cama_root_relative_path}/admin/settings/languages" expect(page).to have_content("Languages configuration") within '#languages_form' do page.execute_script('$("#languages_form [name=\'lang[]\']").filter("[value=\'fr\']").click()') page.execute_script('$("#languages_form [name=\'admin_language\']").filter("[value=\'es\']").click()') click_button "Submit" end expect(page).to have_css('.alert-success') within '#languages_form' do expect(page).to have_checked_field("Inglés") expect(page).to have_checked_field("Español") expect(page).to have_checked_field("Francés") page.execute_script('$("#languages_form [name=\'lang[]\']").filter("[value=\'es\']").click()') page.execute_script('$("#languages_form [name=\'admin_language\']").filter("[value=\'en\']").click()') click_button "Enviar" end page.execute_script('$("#languages_form [name=\'admin_language\']").filter("[value=\'es\']").click()') expect(page).to have_css('.alert-success') # Revert to single language and english backend within '#languages_form' do page.execute_script('$("#languages_form [name=\'lang[]\']").filter("[value=\'fr\']").prop("checked", false)') page.execute_script('$("#languages_form [name=\'lang[]\']").filter("[value=\'es\']").prop("checked", false)') page.execute_script('$("#languages_form [name=\'admin_language\']").filter("[value=\'en\']").click()') click_button "Submit" end expect(page).to have_css('.alert-success') end end
Version data entries
34 entries across 34 versions & 1 rubygems