Sha256: 1225b8ac9469e32e7c2294436df720a12842ac5137caa9ae8933bb14745b5f92

Contents?: true

Size: 986 Bytes

Versions: 1

Compression:

Stored size: 986 Bytes

Contents

require 'spec_helper'

RSpec.feature 'Translations', :js do
  stub_authorization!

  given!(:store) { create(:store) }

  background do
    reset_spree_preferences
  end

  context 'localization settings' do
    given(:language) { Spree.t(:this_file_language, scope: 'i18n', locale: 'de') }
    given(:french) { Spree.t(:this_file_language, scope: 'i18n', locale: 'fr') }

    background do
      SolidusI18n::Config.available_locales = []
      visit spree.edit_admin_general_settings_path
      click_on "Locales"
    end

    scenario 'adds german to available locales' do
      targetted_select2_search(language, from: '#s2id_available_locales_')
      click_on 'Update'
      expect(SolidusI18n::Config.available_locales).to include(:de)
    end

    scenario 'adds french to available locales' do
      targetted_select2_search(french, from: '#s2id_available_locales_')
      click_on 'Update'
      expect(SolidusI18n::Config.available_locales).to include(:fr)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_i18n-1.2.0 spec/features/admin/translations_spec.rb