Sha256: a895a81b4981586b475ff501977aca48232b7dc8a622b48882c853eacfaf6c6b

Contents?: true

Size: 683 Bytes

Versions: 85

Compression:

Stored size: 683 Bytes

Contents

# frozen_string_literal: true

module Spree
  module TestingSupport
    module Translations
      def check_missing_translations(page, example)
        missing_translations = page.body.scan(/translation missing: #{I18n.locale}\.(.*?)[\s<\"&]/)
        if missing_translations.any?
          puts "Found missing translations: #{missing_translations.inspect}"
          puts "In spec: #{example.location}"
        end
      end
    end
  end
end

RSpec.configure do |config|
  config.after(:each, type: :feature) do |example|
    check_missing_translations(page, example)
  end

  config.after(:each, type: :system) do |example|
    check_missing_translations(page, example)
  end
end

Version data entries

85 entries across 85 versions & 1 rubygems

Version Path
solidus_core-4.4.2 lib/spree/testing_support/translations.rb
solidus_core-4.4.1 lib/spree/testing_support/translations.rb
solidus_core-4.4.0 lib/spree/testing_support/translations.rb
solidus_core-4.3.4 lib/spree/testing_support/translations.rb
solidus_core-4.2.4 lib/spree/testing_support/translations.rb
solidus_core-4.1.5 lib/spree/testing_support/translations.rb
solidus_core-4.3.3 lib/spree/testing_support/translations.rb
solidus_core-4.3.2 lib/spree/testing_support/translations.rb
solidus_core-4.1.4 lib/spree/testing_support/translations.rb
solidus_core-4.3.1 lib/spree/testing_support/translations.rb
solidus_core-4.3.0 lib/spree/testing_support/translations.rb
solidus_core-4.2.3 lib/spree/testing_support/translations.rb
solidus_core-4.1.3 lib/spree/testing_support/translations.rb
solidus_core-4.0.4 lib/spree/testing_support/translations.rb
solidus_core-3.4.6 lib/spree/testing_support/translations.rb
solidus_core-4.0.3 lib/spree/testing_support/translations.rb
solidus_core-4.1.2 lib/spree/testing_support/translations.rb
solidus_core-4.2.2 lib/spree/testing_support/translations.rb
solidus_core-3.4.5 lib/spree/testing_support/translations.rb
solidus_core-4.2.1 lib/spree/testing_support/translations.rb