Sha256: 3f3f78e98bb54269d1cdd7c601cb4c4df58ebeaddc37bdb06027c745f0b124e1

Contents?: true

Size: 808 Bytes

Versions: 35

Compression:

Stored size: 808 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe "setting locale", type: :feature do
  stub_authorization!

  before do
    ActionView::Base.raise_on_missing_translations = false
    I18n.locale = I18n.default_locale
    I18n.backend.store_translations(:fr,
      date: {
        month_names: []
      },
      spree: {
        i18n: { this_file_language: "Français" },
        admin: {
          tab: { orders: "Ordres" }
        },
        listing_orders: "Ordres"
      })
    Spree::Backend::Config[:locale] = "fr"
  end

  after do
    I18n.locale = I18n.default_locale
    Spree::Backend::Config[:locale] = "en"
    ActionView::Base.raise_on_missing_translations = true
  end

  it "should be in french" do
    visit spree.admin_path
    expect(page).to have_content("Ordres")
  end
end

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
solidus_backend-2.8.6 spec/features/admin/locale_spec.rb
solidus_backend-2.6.6 spec/features/admin/locale_spec.rb
solidus_backend-2.7.4 spec/features/admin/locale_spec.rb
solidus_backend-2.8.5 spec/features/admin/locale_spec.rb
solidus_backend-2.7.3 spec/features/admin/locale_spec.rb
solidus_backend-2.6.5 spec/features/admin/locale_spec.rb
solidus_backend-2.9.0 spec/features/admin/locale_spec.rb
solidus_backend-2.9.0.rc.1 spec/features/admin/locale_spec.rb
solidus_backend-2.8.4 spec/features/admin/locale_spec.rb
solidus_backend-2.8.3 spec/features/admin/locale_spec.rb
solidus_backend-2.7.2 spec/features/admin/locale_spec.rb
solidus_backend-2.6.4 spec/features/admin/locale_spec.rb
solidus_backend-2.8.2 spec/features/admin/locale_spec.rb
solidus_backend-2.8.1 spec/features/admin/locale_spec.rb
solidus_backend-2.6.3 spec/features/admin/locale_spec.rb
solidus_backend-2.8.0 spec/features/admin/locale_spec.rb
solidus_backend-2.7.1 spec/features/admin/locale_spec.rb
solidus_backend-2.6.2 spec/features/admin/locale_spec.rb
solidus_backend_devise_token_auth-2.8.0.alpha.14 spec/features/admin/locale_spec.rb
solidus_backend_devise_token_auth-2.8.0.alpha.13 spec/features/admin/locale_spec.rb