Merge branch 'master' into memcached-apm

This commit is contained in:
Pau Pérez Fabregat
2019-10-01 16:58:01 +02:00
committed by GitHub
52 changed files with 7003 additions and 678 deletions

View File

@@ -9,6 +9,7 @@ assignees: ''
## Description
<!-- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->
<!-- How has this bug affected you? What were you trying to accomplish? -->
## Expected Behavior
@@ -22,6 +23,8 @@ assignees: ''
## Steps to Reproduce
<!-- Provide an unambiguous set of steps to reproduce this bug -->
<!-- Include code to reproduce if relevant -->
<!-- Include links -->
<!-- Include user ID -->
1.
2.
@@ -29,13 +32,11 @@ assignees: ''
4.
## Animated Gif/Screenshot
<!-- Provide a screenshot or brief animated gif reproducing the bug. Linux users can use
[Peek](https://github.com/phw/peek#ubuntu) while Mac users can use [Recordit](http://recordit.co/) -->
## Context
<!-- How has this bug affected you? What were you trying to accomplish? -->
<!-- Provide a screenshot or brief video reproducing the bug. -->
<!-- Please try to have the dev tools opened on the network tab (press F12 to open the devtools of your browser -->
## Workaround
<!-- Include a workaround for this bug (if relevant) -->
## Severity
<!-- Assign a label and explain the impact.
@@ -55,7 +56,6 @@ https://github.com/openfoodfoundation/openfoodnetwork/wiki/Bug-severity
* Version used:
* Browser name and version:
* Operating System and version (desktop or mobile):
* OFN Platform instance where you discovered the bug, and which version of the software they are using.
## Possible Fix
<!-- Not obligatory, but suggest a fix or reason for the bug -->

View File

@@ -14,5 +14,12 @@ assignees: ''
**- I want to be able to do:** (specify the desired behavior)
(Link to others issues or resources to provide context > only if really necessary). -->
## Acceptance Criteria
<!-- Document the outcomes that need to be achieved before this component can be considered complete. -->
## Acceptance Criteria & Tests
<!-- Document the outcomes that need to be achieved before this component can be considered complete.
-->
<!-- Provide an unambiguous set of steps a tester should do to validate the PR that will solve this issue -->
1.
2.
3.
4.

View File

@@ -104,7 +104,10 @@ group :assets do
gem 'coffee-rails', '~> 3.2.1'
gem 'compass-rails'
gem 'therubyracer', '=0.12.0'
gem 'mini_racer', '0.1.15'
# Previously we found that libv8 6.7.288.46.1 breakis the compilation of mini_racer.
# Now we see that we need to set the version explicitly. Nothing else depends on libv8.
gem 'libv8', '6.3.292.48.1'
gem 'uglifier', '>= 1.0.3'

View File

@@ -465,7 +465,7 @@ GEM
addressable (~> 2.3)
letter_opener (1.7.0)
launchy (~> 2.2)
libv8 (3.16.14.19)
libv8 (6.3.292.48.1)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
@@ -476,6 +476,8 @@ GEM
mime-types (1.25.1)
mini_mime (1.0.1)
mini_portile2 (2.1.0)
mini_racer (0.1.15)
libv8 (~> 6.3)
momentjs-rails (2.20.1)
railties (>= 3.1)
money (5.1.1)
@@ -579,7 +581,6 @@ GEM
rdoc (3.12.2)
json (~> 1.4)
redcarpet (3.5.0)
ref (2.0.0)
request_store (1.4.1)
rack (>= 1.4)
roadie (3.4.0)
@@ -670,9 +671,6 @@ GEM
stripe (4.24.0)
faraday (~> 0.13)
net-http-persistent (~> 3.0)
therubyracer (0.12.0)
libv8 (~> 3.16.14.0)
ref
thor (0.20.3)
tilt (1.4.1)
timecop (0.9.1)
@@ -685,7 +683,7 @@ GEM
railties (> 3.2.8, < 4.0.0)
sprockets (>= 2.2.0)
tzinfo (0.3.55)
uglifier (4.1.20)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.3.2)
unicorn (5.5.1)
@@ -705,7 +703,7 @@ GEM
nokogiri (~> 1.6)
rubyzip (~> 1.0)
selenium-webdriver (~> 3.0)
webmock (3.7.4)
webmock (3.7.6)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
@@ -773,7 +771,9 @@ DEPENDENCIES
kaminari (~> 0.14.1)
knapsack
letter_opener (>= 1.4.1)
libv8 (= 6.3.292.48.1)
listen (= 3.0.8)
mini_racer (= 0.1.15)
momentjs-rails
newrelic_rpm (~> 3.0)
nokogiri (>= 1.6.7.1)
@@ -814,7 +814,6 @@ DEPENDENCIES
spring (= 1.7.2)
spring-commands-rspec
stripe
therubyracer (= 0.12.0)
timecop
truncate_html
turbo-sprockets-rails3

View File

@@ -46,7 +46,12 @@ module Spree
@user.spree_roles = roles.reject(&:blank?).collect{ |r| Spree::Role.find(r) }
end
flash.now[:success] = Spree.t(:account_updated)
message = if new_email_unconfirmed?
Spree.t(:email_updated)
else
Spree.t(:account_updated)
end
flash.now[:success] = message
end
render :edit
end
@@ -126,6 +131,10 @@ module Spree
def load_roles
@roles = Spree::Role.scoped
end
def new_email_unconfirmed?
params[:user][:email] != @user.email
end
end
end
end

View File

@@ -19,7 +19,7 @@ module OrderShipment
#
# @return [ShippingMethod]
def shipping_method
return if shipments.empty?
return if shipments.blank?
shipments.first.shipping_method
end

View File

@@ -25,36 +25,21 @@ module VariantStock
#
# @return [Float|Integer]
def on_hand
warn_deprecation(__method__, '#total_on_hand')
total_on_hand
end
# Sets the stock level of the variant.
# This will only work if `track_inventory_levels` config is set
# and if there is a stock item for the variant.
# This will only work if there is a stock item for the variant.
#
# @raise [StandardError] when the track_inventory_levels config key is not set
# and when the variant has no stock item
# @raise [StandardError] when the variant has no stock item
def on_hand=(new_level)
warn_deprecation(__method__, '#total_on_hand')
error = 'Cannot set on_hand value when Spree::Config[:track_inventory_levels] is false'
raise error unless Spree::Config.track_inventory_levels
raise_error_if_no_stock_item_available
overwrite_stock_levels(new_level)
end
# Checks whether this variant is produced on demand.
#
# In Spree 2.0 this attribute is removed in favour of
# track_inventory_levels only. It was initially introduced in
# https://github.com/openfoodfoundation/spree/commit/20b5ad9835dca7f41a40ad16c7b45f987eea6dcc
def on_demand
warn_deprecation(__method__, 'StockItem#backorderable?')
# A variant that has not been saved yet, doesn't have a stock item
# This provides a default value for variant.on_demand using Spree::StockLocation.backorderable_default
return Spree::StockLocation.first.backorderable_default if stock_items.empty?
@@ -69,8 +54,6 @@ module VariantStock
#
# @raise [StandardError] when the variant has no stock item yet
def on_demand=(new_value)
warn_deprecation(__method__, 'StockItem#backorderable=')
raise_error_if_no_stock_item_available
# There should be only one at the default stock location.
@@ -89,8 +72,6 @@ module VariantStock
# Here we depend only on variant.total_on_hand and variant.on_demand.
# This way, variant_overrides only need to override variant.total_on_hand and variant.on_demand.
def can_supply?(quantity)
return true unless Spree::Config[:track_inventory_levels]
on_demand || total_on_hand >= quantity
end
@@ -158,11 +139,4 @@ module VariantStock
def stock_item
stock_items.first
end
def warn_deprecation(method_name, new_method_name)
ActiveSupport::Deprecation.warn(
"`##{method_name}` is deprecated and will be removed. " \
"Please use `#{new_method_name}` instead."
)
end
end

View File

@@ -32,7 +32,7 @@ module Spree
# NOTE: This is an override of spree's method, needed to allow orders
# without line items (ie. user invoices) to not have inventory units
def require_inventory
return false unless Spree::Config[:track_inventory_levels] && line_items.count > 0 # This line altered
return false unless line_items.count > 0 # This line altered
order.completed? && !order.canceled?
end
end

View File

@@ -10,6 +10,11 @@ class SubscriptionLineItem < ActiveRecord::Base
(price_estimate || 0) * (quantity || 0)
end
# Ensure SubscriptionLineItem always has access to soft-deleted Variant attribute
def variant
Spree::Variant.unscoped { super }
end
# Used to calculators to estimate fees
alias_method :amount, :total_estimate

View File

@@ -1,5 +0,0 @@
<!-- surround_contents 'body' -->
<div <%= yield(:app_wrapper_attrs).strip.html_safe %>>
<%= render_original %>
</div>

View File

@@ -73,7 +73,9 @@ class EmbeddedPageService
def current_referer
return if @request.referer.blank?
URI(@request.referer).host.downcase
uri = URI(@request.referer)
return if uri.host.blank?
uri.host.downcase
end
def current_referer_without_www

View File

@@ -9,8 +9,8 @@ class SubscriptionValidator
attr_reader :subscription
validates_presence_of :shop, :customer, :schedule, :shipping_method, :payment_method
validates_presence_of :bill_address, :ship_address, :begins_at
validates :shop, :customer, :schedule, :shipping_method, :payment_method, presence: true
validates :bill_address, :ship_address, :begins_at, presence: true
validate :shipping_method_allowed?
validate :payment_method_allowed?
validate :payment_method_type_allowed?

View File

@@ -2,8 +2,8 @@
%h1.page-title
=t :customers
- content_for :app_wrapper_attrs do
= "ng-app='admin.customers'"
- content_for :main_ng_app_name do
= "admin.customers"
- content_for :page_actions do
%li

View File

@@ -4,8 +4,8 @@
= t('.editing')
= @enterprise.name
- content_for :app_wrapper_attrs do
= "ng-app='admin.enterprises'"
- content_for :main_ng_app_name do
= "admin.enterprises"
- content_for :page_actions do
%li= select :enterprise, :id, options_for_select(editable_enterprises.collect {|e| [e.name, e.id, {:'data-url' => "#{main_app.edit_admin_enterprise_path(e.permalink)}", :'ng-selected' => "selected==#{e.id}"}]}, @enterprise.id ), {}, {:'enterprise-switcher' => '', 'data-initial' => "#{@enterprise.id}", :'ng-init' => "selected='#{@enterprise.id}'", :'ng-model' => 'selected', :id => 'enterprise_switcher', :class => 'select2'}

View File

@@ -1,8 +1,8 @@
- content_for :page_title do
= t('.title')
- content_for :app_wrapper_attrs do
= "ng-app='admin.enterprises'"
- content_for :main_ng_app_name do
= "admin.enterprises"
- content_for :page_actions do
= render 'admin/shared/user_guide_link'

View File

@@ -6,8 +6,8 @@
- content_for :page_actions do
%li= button_link_to t('.back_link'), main_app.admin_enterprises_path, icon: 'icon-arrow-left'
- content_for :app_wrapper_attrs do
= "ng-app='admin.enterprises'"
- content_for :main_ng_app_name do
= "admin.enterprises"
= admin_inject_available_countries(module: 'admin.enterprises')
= admin_inject_json "admin.enterprises", "defaultCountryID", Spree::Config[:default_country_id]

View File

@@ -1,8 +1,8 @@
= content_for :page_title do
= t :admin_order_cycles
- content_for :app_wrapper_attrs do
= "ng-app='admin.orderCycles'"
- content_for :main_ng_app_name do
= "admin.orderCycles"
= content_for :page_actions do
- if subscriptions_enabled?

View File

@@ -1,8 +1,8 @@
- content_for :page_title do
= t('admin.subscriptions.subscriptions')
- content_for :app_wrapper_attrs do
= "ng-app='admin.subscriptions'"
- content_for :main_ng_app_name do
= "admin.subscriptions"
- content_for :page_actions do
%li

View File

@@ -1,5 +1,5 @@
- content_for :app_wrapper_attrs do
= "ng-app='admin.lineItems'"
- content_for :main_ng_app_name do
= "admin.lineItems"
- content_for :page_title do
%h1.page-title

View File

@@ -13,8 +13,8 @@
#select-customer{"data-hook" => ""}
%fieldset.no-border-bottom
%legend{:align => "center"}= Spree.t(:customer_search)
- content_for :app_wrapper_attrs do
= 'ng-app=admin.orders'
- content_for :main_ng_app_name do
= "admin.orders"
= hidden_field_tag :customer_search_override, nil, distributor_id: @order.distributor_id, :class => 'fullwidth title customer-search-override'
= render :partial => "spree/admin/orders/customer_details/autocomplete", :formats => :js

View File

@@ -7,8 +7,11 @@
= render partial: 'spree/admin/shared/order_sub_menu'
- content_for :app_wrapper_attrs do
= "ng-app='admin.orders' ng-controller='ordersCtrl'"
- content_for :main_ng_app_name do
= "admin.orders"
- content_for :main_ng_ctrl_name do
= "ordersCtrl"
- content_for :table_filter_title do
= t(:search)

View File

@@ -53,18 +53,17 @@
= f.label :sku, t(:sku)
= f.text_field :sku, :size => 16
- if Spree::Config[:track_inventory_levels]
.alpha.two.columns
= f.field_container :on_hand do
= f.label :on_hand, t(:on_hand)
= f.number_field :on_hand, :min => 0
.omega.two.columns
= f.field_container :on_demand, :class => ['checkbox'] do
%label
= f.check_box :on_demand
= t(:on_demand)
.alpha.two.columns
= f.field_container :on_hand do
= f.label :on_hand, t(:on_hand)
= f.number_field :on_hand, :min => 0
.omega.two.columns
= f.field_container :on_demand, :class => ['checkbox'] do
%label
= f.check_box :on_demand
= t(:on_demand)
.clear
.clear
%ul#shipping_specs
%li#shipping_specs_weight_field.field.alpha.two.columns

View File

@@ -38,18 +38,17 @@
= f.label :cost_price, Spree.t(:cost_price)
= f.text_field :cost_price, value: number_to_currency(@variant.cost_price, unit: ''), class: 'fullwidth'
- if Spree::Config[:track_inventory_levels]
%div{ 'set-on-demand' => '' }
.field.checkbox
%label
= f.check_box :on_demand
= t(:on_demand)
%div{'ofn-with-tip' => t('admin.products.variants.to_order_tip')}
%a= t('admin.whats_this')
.field
= f.label :on_hand, t(:on_hand)
.fullwidth
= f.text_field :on_hand
%div{ 'set-on-demand' => '' }
.field.checkbox
%label
= f.check_box :on_demand
= t(:on_demand)
%div{'ofn-with-tip' => t('admin.products.variants.to_order_tip')}
%a= t('admin.whats_this')
.field
= f.label :on_hand, t(:on_hand)
.fullwidth
= f.text_field :on_hand
.right.six.columns.omega.label-block
- if @product.variant_unit != 'weight'

View File

@@ -0,0 +1,78 @@
= admin_inject_currency_config
= render "layouts/i18n_script"
#wrapper{"data-hook" => ""}
- if flash[:error]
.flash.error= flash[:error]
- if notice
.flash.notice= notice
- if flash[:success]
.flash.success= flash[:success]
#progress
.wrapper
#spinner
.progress-message
= Spree.t(:loading)
\...
= render :partial => 'spree/admin/shared/alert', :collection => session[:alerts]
%header#header{"data-hook" => ""}
.container
%figure.columns.five{"data-hook" => "logo-wrapper"}
= link_to image_tag(Spree::Config[:admin_interface_logo], :id => 'logo'), spree.admin_path
%nav.columns.eleven{"data-hook" => "admin_login_navigation_bar"}
= render :partial => 'spree/layouts/admin/login_nav'
%nav#admin-menu{"data-hook" => ""}
.container
.sixteen.columns.main-menu-wrapper
%ul.inline-menu.fullwidth-menu{"data-hook" => "admin_tabs"}
= render :partial => 'spree/admin/shared/tabs'
- if content_for?(:sub_menu)
%nav#sub-menu{"data-hook" => ""}
.container
.sixteen.columns
= yield :sub_menu
- if content_for?(:page_title) || content_for?(:page_actions)
#content-header{"data-hook" => ""}
.container
.sixteen.columns
.block-table
- if content_for?(:page_title)
.table-cell
%h1{:class => "page-title"}= yield :page_title
- if content_for?(:page_actions)
.page-actions.table-cell.toolbar{"data-hook" => "toolbar"}
%ul.inline-menu
= yield :page_actions
.container
.row
- content_class = content_for?(:sidebar) ? "with-sidebar" : ""
#content{:class => content_class, "data-hook" => ""}
- if content_for?(:table_filter)
- table_filter_class = content_for?(:sidebar) ? 'twelve columns' : 'sixteen columns'
#table-filter{:class => table_filter_class, "data-hook" => ""}
%fieldset
%legend{:align => "center"}= yield :table_filter_title
= yield :table_filter
- div_class = content_for?(:sidebar) ? 'twelve columns' : 'sixteen columns'
%div{:class => div_class}
= yield
- if content_for?(:sidebar)
%aside#sidebar.four.columns{"data-hook" => ""}
- if content_for?(:sidebar_title)
%h5.sidebar-title
%span= yield :sidebar_title
= yield :sidebar
%div{"data-hook" => "admin_footer_scripts"}
= render 'spree/shared/google_analytics'
%script
= raw "Spree.api_key = \"#{try_spree_current_user.try(:spree_api_key).to_s}\";"

View File

@@ -4,81 +4,12 @@
= render :partial => 'spree/admin/shared/head'
%body.admin
= admin_inject_currency_config
= render "layouts/i18n_script"
#wrapper{"data-hook" => ""}
- if flash[:error]
.flash.error= flash[:error]
- if notice
.flash.notice= notice
- if flash[:success]
.flash.success= flash[:success]
#progress
.wrapper
#spinner
.progress-message
= Spree.t(:loading)
\...
= render :partial => 'spree/admin/shared/alert', :collection => session[:alerts]
%header#header{"data-hook" => ""}
.container
%figure.columns.five{"data-hook" => "logo-wrapper"}
= link_to image_tag(Spree::Config[:admin_interface_logo], :id => 'logo'), spree.admin_path
%nav.columns.eleven{"data-hook" => "admin_login_navigation_bar"}
= render :partial => 'spree/layouts/admin/login_nav'
%nav#admin-menu{"data-hook" => ""}
.container
.sixteen.columns.main-menu-wrapper
%ul.inline-menu.fullwidth-menu{"data-hook" => "admin_tabs"}
= render :partial => 'spree/admin/shared/tabs'
- if content_for?(:sub_menu)
%nav#sub-menu{"data-hook" => ""}
.container
.sixteen.columns
= yield :sub_menu
- if content_for?(:page_title) || content_for?(:page_actions)
#content-header{"data-hook" => ""}
.container
.sixteen.columns
.block-table
- if content_for?(:page_title)
.table-cell
%h1{:class => "page-title"}= yield :page_title
- if content_for?(:page_actions)
.page-actions.table-cell.toolbar{"data-hook" => "toolbar"}
%ul.inline-menu
= yield :page_actions
.container
.row
- content_class = content_for?(:sidebar) ? "with-sidebar" : ""
#content{:class => content_class, "data-hook" => ""}
- if content_for?(:table_filter)
- table_filter_class = content_for?(:sidebar) ? 'twelve columns' : 'sixteen columns'
#table-filter{:class => table_filter_class, "data-hook" => ""}
%fieldset
%legend{:align => "center"}= yield :table_filter_title
= yield :table_filter
- div_class = content_for?(:sidebar) ? 'twelve columns' : 'sixteen columns'
%div{:class => div_class}
= yield
- if content_for?(:sidebar)
%aside#sidebar.four.columns{"data-hook" => ""}
- if content_for?(:sidebar_title)
%h5.sidebar-title
%span= yield :sidebar_title
= yield :sidebar
%div{"data-hook" => "admin_footer_scripts"}
= render 'spree/shared/google_analytics'
%script
= raw "Spree.api_key = \"#{try_spree_current_user.try(:spree_api_key).to_s}\";"
- if content_for?(:main_ng_app_name)
- if content_for?(:main_ng_ctrl_name)
%div{ "ng-app" => yield(:main_ng_app_name).strip.html_safe, "ng-controller" => yield(:main_ng_ctrl_name).strip.html_safe }
= render :partial => 'spree/layouts/admin_body'
- else
%div{ "ng-app" => yield(:main_ng_app_name).strip.html_safe }
= render :partial => 'spree/layouts/admin_body'
- else
= render :partial => 'spree/layouts/admin_body'

View File

@@ -16,7 +16,7 @@
.small-12.medium-6.columns
.new_card{ ng: { show: 'CreditCard.visible', class: '{visible: CreditCard.visible}' } }
%h3= t(:add_a_new_card)
%h3= t(:add_new_credit_card)
= render 'new_card_form'
.authorised_shops{ ng: { controller: 'AuthorisedShopsCtrl', hide: 'CreditCard.visible' } }
%h3

View File

@@ -1,7 +1,8 @@
if ENV['DATADOG_RAILS_APM']
Datadog.configure do |c|
c.use :rails, service_name: 'rails', analytics_enabled: true
c.use :delayed_job, service_name: 'delayed_job', analytics_enabled: true
c.use :dalli, service_name: 'memcached', analytics_enabled: true
c.use :rails, service_name: 'rails'
c.use :delayed_job, service_name: 'delayed_job'
c.use :dalli, service_name: 'memcached'
c.analytics_enabled = true
end
end

View File

@@ -2943,6 +2943,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
email: Email
# TODO: remove 'account_updated' key once we get to Spree 2.0
account_updated: "Account updated!"
email_updated: "The account will be updated once the new email is confirmed."
my_account: "My account"
date: "Date"
time: "Time"

View File

@@ -245,6 +245,7 @@ en_CA:
expired: has expired, please request a new one
back_to_payments_list: "Back to Payments List"
maestro_or_solo_cards: "Maestro/Solo cards"
backordered: "Backordered"
ship: "Ship"
actions:
create_and_add_another: "Create and Add Another"
@@ -2628,6 +2629,8 @@ en_CA:
name_or_sku: "Name or SKU (enter at least first 4 characters of product name)"
resend: Resend
back_to_orders_list: Back to Orders List
return_authorizations: Return Authoriations
cannot_create_returns: Cannot create returns as this order has no shipped units
select_stock: "Select stock"
location: "Location"
count_on_hand: "Count On Hand"

3137
config/locales/en_NZ.yml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -769,26 +769,20 @@ fr:
producer_profile: Profil simple
connect_ofn: Pour apparaître sur la carte et la liste des producteurs
always_free: ' '
producer_description_text: 'Votre profil sera visible sur la carte, et depuis le menu “producteurs”.
Nous vous invitons à renseigner votre profil de la façon la plus complète possible. Un profil complet et avec des images attire plus ! Vous pourrez mettre des liens pour rediriger les visiteurs vers votre site internet ou espace de vente en ligne le cas échéant.
Vous pourrez renseigner votre catalogue produits et le partager avec les circuits courts qui souhaitent vendre vos produits dans leur boutique sur Open Food France.'
producer_description_text: Nous vous invitons à renseigner votre profil de la façon la plus complète possible. Un profil complet et avec des images attire plus ! Vous pourrez mettre des liens pour rediriger les visiteurs vers votre site internet ou espace de vente en ligne le cas échéant. Vous pourrez renseigner votre catalogue produits et le partager avec les circuits courts qui souhaitent vendre vos produits dans leur boutique sur Open Food France.
producer_shop: Boutique Producteur
sell_your_produce: Pour vendre vos produits via Open Food France
producer_shop_description_text: 'Vous pourrez paramétrer votre boutique en ligne pour ladapter à vos besoins : méthodes de paiement et livraison proposées à vos acheteurs, produits à mettre en vente parmi ceux de votre catalogue, rythmes de commande et livraison, etc. '
producer_shop_description_text2: "Vous pourrez renseigner votre catalogue produits et le partager avec dautres circuits courts qui souhaitent vendre vos produits dans leur boutique sur Open Food France.\nATTENTION : \n- Si vous vendez via un autre outil en ligne, et nenvisagez pas dutiliser Open Food France pour organiser vos ventes / commandes, choisissiez le type de profil “profil simple”.\n- Si vous fournissez un circuit court utilisant Open Food France pour vendre, mais ne vendez pas vous-même en direct sur Open Food France, choisissez le type de profil “profil simple”."
sell_your_produce: Pour vendre vos produits
producer_shop_description_text: Vous pourrez paramétrer votre boutique en ligne selon votre fonctionnement, et partager votre catalogue produits avec dautres circuits courts souhaitant les distribuer dans leur boutique.
producer_shop_description_text2: 'ATTENTION : Si vous vendez via un autre outil en ligne, et nenvisagez pas dutiliser Open Food France pour cet usage, choisissiez “profil simple”. De même, si vous fournissez un circuit court utilisant Open Food France pour vendre, mais ne vendez pas vous-même en direct sur Open Food France, choisissez “profil simple”.'
producer_hub: Boutique multi-producteurs
producer_hub_text: Pour vendre vos produits ainsi que ceux dautres producteurs via Open Food France
producer_hub_description_text: "Vous pourrez paramétrer votre boutique en ligne pour ladapter à vos besoins : méthodes de paiement et livraison proposées à vos acheteurs,produits à mettre en vente parmi ceux votre catalogue et ceux des autres producteurs, rythmes de commande et livraison, etc. \nVous pourrez renseigner votre catalogue produits et le partager avec dautres circuits courts qui souhaitent vendre vos produits dans leur boutique sur Open Food France.\nATTENTION : \n- Si vous vendez via un autre outil en ligne, et nenvisagez pas dutiliser Open Food France pour organiser vos ventes / commandes, choisissiez le type de profil “profil simple”.\n- Si vous fournissez un circuit court utilisant Open Food France pour vendre, mais ne vendez pas vous-même en direct sur Open Food France, choisissez le type de profil “profil simple”."
producer_hub_text: Pour vendre vos produits ainsi que ceux dautres producteurs
producer_hub_description_text: 'Vous pourrez paramétrer votre boutique en ligne selon votre fonctionnement, vendre les produits d''autres producteurs, et partager votre catalogue produits avec dautres circuits courts souhaitant les distribuer dans leur boutique. ATTENTION : Si vous vendez via un autre outil en ligne, et nenvisagez pas dutiliser Open Food France pour cet usage, choisissiez “profil simple”. De même, si vous fournissez un circuit court utilisant Open Food France pour vendre, mais ne vendez pas vous-même en direct sur Open Food France, choisissez “profil simple”.'
profile: Profil simple
get_listing: Pour apparaître sur la carte
profile_description_text: 'Votre profil sera visible sur la carte.
Nous vous invitons à renseigner votre profil de la façon la plus complète possible. Un profil complet et avec des images attire plus ! Vous pourrez mettre des liens pour rediriger les visiteurs vers votre site internet ou espace de vente en ligne le cas échéant.'
profile_description_text: Nous vous invitons à renseigner votre profil de la façon la plus complète possible. Un profil complet et avec des images attire plus ! Vous pourrez mettre des liens pour rediriger les visiteurs vers votre site internet ou espace de vente en ligne le cas échéant.
hub_shop: Boutique multi-producteurs
hub_shop_text: Pour vendre des produits de différents fournisseurs via Open Food France
hub_shop_description_text: "Vous pourrez paramétrer votre boutique en ligne pour ladapter à vos besoins : méthodes de paiement et livraison proposées à vos acheteurs, produits à mettre en vente parmi les catalogues de vos fournisseurs, rythmes de commande et livraison, etc. \nATTENTION : Si vous vendez via un autre outil en ligne, et nenvisagez pas dutiliser Open Food France pour organiser vos ventes / commandes, choisissiez le type de profil “profil simple”."
hub_shop_text: Pour vendre des produits de différents fournisseurs
hub_shop_description_text: 'Vous pourrez paramétrer votre boutique en ligne selon votre fonctionnement, et y proposer les produits de multiples producteurs. ATTENTION : Si vous vendez via un autre outil en ligne, et nenvisagez pas dutiliser Open Food France pour cet usage, choisissiez “profil simple”.'
choose_option: Veuilliez choisir l'une des options ci-dessus.
change_now: Changer
enterprise_user_index:
@@ -1449,14 +1443,14 @@ fr:
email_signup_welcome: "Bienvenue sur %{sitename} !"
email_signup_confirmed_email: "Merci d'avoir confirmé votre email."
email_signup_shop_html: "Vous pouvez maintenant vous connecter sur %{link}."
email_signup_text: "> Si vous organisez un circuit court de distribution, ou fournissez des produits à un circuit court, nhésitez pas à nous contacter à info@openfoodfrance.org. Nous sommes là pour vous accompagner dans la création de votre profil et espace de vente / commande en ligne.\n> Si vous achetez via un circuit court utilisant Open Food France, connectez-vous avant de passer commande pour que vos informations personnelles et de facturation soient gardées en mémoire. Cela vous évitera de les ressaisir à chaque commande ! Pour toute question, contactez en direct votre circuit court."
email_signup_text: "Si vous organisez / fournissez un circuit court, nhésitez pas à nous contacter à info@openfoodfrance.org, nous sommes là pour vous accompagner dans la création de votre espace de vente / commande en ligne. Si vous achetez via un circuit court utilisant Open Food France, connectez-vous avant de passer commande pour que vos informations personnelles soient gardées en mémoire, cela vous évitera de les ressaisir à chaque commande ! "
email_signup_help_html: "Des retours à nous faire quant à votre utilisation de la plateforme ? Écrivez-nous à info@openfoodfrance.org."
invite_email:
greeting: "Bonjour !"
invited_to_manage: "Vous avez été invité(e) à gérer %{enterprise} sur %{instance}."
confirm_your_email: "Vous avez reçu ou allez recevoir prochainement un email avec un lien de validation. Vous n'aurez pas accès au profil de l'entreprise %{enterprise} avant d'avoir cliqué sur ce lien."
set_a_password: "Vous serez ensuite invité(e) à choisir un mot de passe avant de pouvoir accéder et gérer le profil de l'entreprise."
mistakenly_sent: "Vous ne savez pas pourquoi vous recevez cet email? Veuillez contacter %{owner_email} pour plus d'informations."
mistakenly_sent: "Vous ne savez pas pourquoi vous recevez cet email ? Veuillez contacter %{owner_email} pour plus d'informations."
producer_mail_greeting: "Cher(ère)"
producer_mail_text_before: "Nous avons reçu toutes les commandes pour la prochaine livraison."
producer_mail_order_text: "Voilà la liste et les quantités des produits commandés vous concernant:"
@@ -1759,7 +1753,7 @@ fr:
country_field_error: "Veuillez saisir une Pays"
contact:
title: "Contact"
who_is_managing_enterprise: "Qui gère %{enterprise}?"
who_is_managing_enterprise: "Qui gère %{enterprise} ?"
contact_field: "Personne référente"
contact_field_placeholder: "Nom du contact principal"
contact_field_required: "Vous devez saisir une personne référente"
@@ -1767,7 +1761,7 @@ fr:
phone_field_placeholder: "ex : 06 24 53 26 53"
type:
title: "Catégorie"
headline: "Dernière étape pour ajouter %{enterprise} !"
headline: "Dites-nous en un peu plus sur %{enterprise}"
question: "Etes-vous un producteur ?"
yes_producer: "Oui, je suis un producteur"
no_producer: "Non, je ne suis pas un producteur"
@@ -2401,9 +2395,9 @@ fr:
choisissez le type de profil “profil simple”.
get_listing: Pour apparaître sur la carte
always_free: ' '
sell_produce_others: Pour vendre des produits de différents fournisseurs via Open Food France
sell_own_produce: Pour vendre vos produits via Open Food France
sell_both: Pour vendre vos produits ainsi que ceux dautres producteurs via Open Food France
sell_produce_others: Pour vendre des produits de différents fournisseurs
sell_own_produce: Pour vendre vos produits
sell_both: Pour vendre vos produits ainsi que ceux dautres producteurs
enterprise_producer:
producer: Producteur
producer_text1: >

View File

@@ -1449,8 +1449,8 @@ fr_BE:
producer_mail_order_text: "Voilà la liste et les quantités des produits commandés vous concernant:"
producer_mail_delivery_instructions: "Modalités de livraison des produits:"
producer_mail_signoff: "Merci et belle fin de journée!"
shopping_oc_closed: La boutique est actuellement fermée
shopping_oc_closed_description: "Veuillez attendre l'ouverture du prochain cycle de vente (ou contactez-nous directement pour voir si nous pouvons accepter une commande tardive)"
shopping_oc_closed: Le comptoir est actuellement fermé
shopping_oc_closed_description: "Veuillez attendre l'ouverture du prochain cycle de vente (ou contactez directement le comptoir pour voir si nous pouvons accepter une commande tardive)."
shopping_oc_last_closed: "Le dernier cycle de vente s'est terminé il y a %{distance_of_time}"
shopping_oc_next_open: "Le prochain cycle de vente ouvrira dans %{distance_of_time}"
shopping_tabs_about: "A propos de %{distributor}"

View File

@@ -246,6 +246,7 @@ fr_CA:
expired: a expiré, veuillez faire une nouvelle demande.
back_to_payments_list: "Retour à la liste des paiements"
maestro_or_solo_cards: "Cartes Maestro/Solo"
backordered: "à volonté"
ship: "Expédier"
actions:
create_and_add_another: "Créer et ajouter nouveau"
@@ -2640,6 +2641,8 @@ fr_CA:
name_or_sku: "Nom ou Ref Produit (entrer au moins les 4 premiers caractères du nom du produit)"
resend: Renvoyer
back_to_orders_list: Retour à la liste des commandes
return_authorizations: Autorisations de retours
cannot_create_returns: Impossible de créer une autorisation de retour car aucun produit n'a été livré pour cette commande.
select_stock: "Sélectionner le stock"
location: "Localisation"
count_on_hand: "Quantité en stock"

3139
config/locales/pt_BR.yml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,320 +1,332 @@
{
"spec/features/admin/orders_spec.rb": 235.76097083091736,
"spec/features/admin/variant_overrides_spec.rb": 94.85978269577026,
"spec/features/admin/bulk_order_management_spec.rb": 151.3781042098999,
"spec/features/consumer/shopping/checkout_spec.rb": 118.2651891708374,
"spec/features/admin/payment_method_spec.rb": 54.268134117126465,
"spec/features/consumer/shopping/variant_overrides_spec.rb": 78.91740727424622,
"spec/features/consumer/shopping/shopping_spec.rb": 112.53912425041199,
"spec/features/consumer/shopping/cart_spec.rb": 27.87003493309021,
"spec/features/admin/order_cycles_spec.rb": 230.97479963302612,
"spec/features/admin/customers_spec.rb": 52.75454330444336,
"spec/features/admin/enterprise_fees_spec.rb": 36.99392628669739,
"spec/features/admin/bulk_product_update_spec.rb": 189.61147689819336,
"spec/features/admin/enterprise_relationships_spec.rb": 43.69444513320923,
"spec/features/admin/shipping_methods_spec.rb": 39.06390905380249,
"spec/features/admin/enterprises_spec.rb": 43.391074657440186,
"spec/features/consumer/shopping/orders_spec.rb": 41.26642346382141,
"spec/models/order_cycle_spec.rb": 58.54216384887695,
"spec/helpers/injection_helper_spec.rb": 38.74247694015503,
"spec/controllers/admin/subscriptions_controller_spec.rb": 40.60595989227295,
"spec/models/spree/order_spec.rb": 45.230292081832886,
"spec/lib/open_food_network/order_cycle_permissions_spec.rb": 26.51349425315857,
"spec/features/consumer/cookies_spec.rb": 26.292959928512573,
"spec/features/admin/tag_rules_spec.rb": 29.404080867767334,
"spec/models/spree/line_item_spec.rb": 26.38530206680298,
"spec/controllers/admin/bulk_line_items_controller_spec.rb": 37.692434310913086,
"spec/models/spree/product_spec.rb": 21.244173288345337,
"spec/controllers/spree/orders_controller_spec.rb": 27.444236278533936,
"spec/models/spree/variant_spec.rb": 18.080999851226807,
"spec/mailers/producer_mailer_spec.rb": 22.64667844772339,
"spec/features/consumer/shopping/embedded_shopfronts_spec.rb": 18.30157232284546,
"spec/controllers/api/orders_controller_spec.rb": 45.88059878349304,
"spec/models/exchange_spec.rb": 24.08130693435669,
"spec/features/consumer/shops_spec.rb": 44.24216866493225,
"spec/features/admin/adjustments_spec.rb": 24.634205102920532,
"spec/features/consumer/authentication_spec.rb": 39.03162908554077,
"spec/features/admin/enterprise_roles_spec.rb": 36.11720085144043,
"spec/controllers/line_items_controller_spec.rb": 23.03535532951355,
"spec/lib/open_food_network/products_cache_spec.rb": 25.271536827087402,
"spec/features/consumer/account_spec.rb": 27.02789568901062,
"spec/controllers/spree/api/products_controller_spec.rb": 27.727026224136353,
"spec/models/spree/ability_spec.rb": 25.817420959472656,
"spec/services/order_syncer_spec.rb": 50.39830207824707,
"spec/features/admin/enterprises/images_spec.rb": 23.51345205307007,
"spec/features/admin/enterprise_groups_spec.rb": 12.499099254608154,
"spec/features/admin/products_spec.rb": 26.72684335708618,
"spec/models/spree/adjustment_spec.rb": 13.502050876617432,
"spec/models/enterprise_spec.rb": 9.4689781665802,
"spec/lib/open_food_network/products_renderer_spec.rb": 6.759949207305908,
"spec/features/consumer/producers_spec.rb": 14.347290515899658,
"spec/lib/open_food_network/address_finder_spec.rb": 10.706343650817871,
"spec/lib/open_food_network/permissions_spec.rb": 9.547073364257812,
"spec/requests/checkout/stripe_connect_spec.rb": 10.927155494689941,
"spec/serializers/order_serializer_spec.rb": 4.6526429653167725,
"spec/features/admin/product_import_spec.rb": 82.43362879753113,
"spec/lib/open_food_network/enterprise_fee_calculator_spec.rb": 8.458034038543701,
"spec/features/consumer/shopping/checkout_auth_spec.rb": 12.009632349014282,
"spec/controllers/api/product_images_controller_spec.rb": 10.716242790222168,
"spec/lib/open_food_network/user_balance_calculator_spec.rb": 7.430835247039795,
"spec/features/consumer/multilingual_spec.rb": 9.649072170257568,
"spec/controllers/spree/users_controller_spec.rb": 5.731461763381958,
"spec/lib/open_food_network/order_cycle_form_applicator_spec.rb": 7.663759708404541,
"spec/lib/open_food_network/proxy_order_syncer_spec.rb": 7.425870656967163,
"spec/models/enterprise_relationship_spec.rb": 7.178626775741577,
"spec/controllers/api/logos_controller_spec.rb": 8.094348430633545,
"spec/models/spree/property_spec.rb": 6.901066303253174,
"spec/models/variant_override_spec.rb": 9.191428899765015,
"spec/services/subscription_estimator_spec.rb": 6.809471368789673,
"spec/lib/open_food_network/orders_and_fulfillments_report_spec.rb": 11.12765908241272,
"spec/features/consumer/groups_spec.rb": 10.6190824508667,
"spec/controllers/spree/api/variants_controller_spec.rb": 6.078902959823608,
"spec/features/consumer/registration_spec.rb": 11.338661909103394,
"spec/controllers/enterprises_controller_spec.rb": 2.6997263431549072,
"spec/controllers/spree/admin/reports_controller_spec.rb": 16.883267879486084,
"spec/lib/open_food_network/packing_report_spec.rb": 6.565235614776611,
"spec/lib/open_food_network/bulk_coop_report_spec.rb": 7.004760503768921,
"spec/services/order_factory_spec.rb": 8.499075889587402,
"spec/controllers/admin/enterprises_controller_spec.rb": 4.129201650619507,
"spec/helpers/enterprises_helper_spec.rb": 3.5127899646759033,
"spec/controllers/admin/schedules_controller_spec.rb": 4.543549060821533,
"spec/features/admin/schedules_spec.rb": 6.639188528060913,
"spec/features/admin/enterprises/index_spec.rb": 5.253607988357544,
"spec/lib/open_food_network/subscription_payment_updater_spec.rb": 2.4682815074920654,
"spec/controllers/spree/admin/orders/customer_details_controller_spec.rb": 4.674808502197266,
"spec/controllers/admin/order_cycles_controller_spec.rb": 2.808058261871338,
"spec/controllers/api/promo_images_controller_spec.rb": 3.05167293548584,
"spec/models/spree/image_spec.rb": 3.5584912300109863,
"spec/lib/open_food_network/group_buy_report_spec.rb": 3.9514505863189697,
"spec/features/admin/variants_spec.rb": 9.481645345687866,
"spec/controllers/admin/variant_overrides_controller_spec.rb": 4.023880243301392,
"spec/models/spree/payment_spec.rb": 4.27884316444397,
"spec/features/consumer/shopping/embedded_groups_spec.rb": 5.992724895477295,
"spec/lib/open_food_network/scope_variant_to_hub_spec.rb": 6.08787727355957,
"spec/features/admin/overview_spec.rb": 4.753745794296265,
"spec/models/enterprise_caching_spec.rb": 3.9775142669677734,
"spec/controllers/spree/admin/products_controller_spec.rb": 3.1087279319763184,
"spec/jobs/subscription_placement_job_spec.rb": 17.82094693183899,
"spec/models/product_import/inventory_reset_strategy_spec.rb": 2.6040756702423096,
"spec/lib/open_food_network/scope_variants_to_search_spec.rb": 2.849317789077759,
"spec/controllers/shop_controller_spec.rb": 3.859396457672119,
"spec/lib/open_food_network/customers_report_spec.rb": 2.9132230281829834,
"spec/controllers/cart_controller_spec.rb": 2.133087158203125,
"spec/jobs/order_cycle_notification_job_spec.rb": 5.136486768722534,
"spec/models/enterprise_fee_spec.rb": 6.337928771972656,
"spec/features/admin/authentication_spec.rb": 3.338393211364746,
"spec/features/consumer/shopping/products_spec.rb": 3.962737560272217,
"spec/serializers/admin/exchange_serializer_spec.rb": 2.8799095153808594,
"spec/features/admin/payments_spec.rb": 3.7063188552856445,
"spec/models/concerns/variant_stock_spec.rb": 4.282667875289917,
"spec/controllers/spree/admin/orders_controller_spec.rb": 7.792564153671265,
"spec/controllers/spree/admin/payments_controller_spec.rb": 3.5697567462921143,
"spec/features/admin/multilingual_spec.rb": 1.964205026626587,
"spec/controllers/admin/subscription_line_items_controller_spec.rb": 2.8258471488952637,
"spec/controllers/checkout_controller_spec.rb": 1.9465281963348389,
"spec/models/producer_property_spec.rb": 2.2676165103912354,
"spec/features/consumer/account/cards_spec.rb": 3.388315439224243,
"spec/controllers/admin/customers_controller_spec.rb": 1.3151507377624512,
"spec/controllers/spree/admin/shipping_methods_controller_spec.rb": 1.3816843032836914,
"spec/controllers/admin/inventory_items_controller_spec.rb": 2.704101324081421,
"spec/features/consumer/account/settings_spec.rb": 3.4794163703918457,
"spec/models/spree/shipping_method_spec.rb": 1.717087745666504,
"spec/requests/checkout/failed_checkout_spec.rb": 2.330630302429199,
"spec/features/consumer/footer_links_spec.rb": 2.529261827468872,
"spec/services/cart_service_spec.rb": 1.407466173171997,
"spec/serializers/admin/enterprise_serializer_spec.rb": 2.7000370025634766,
"spec/models/spree/taxon_spec.rb": 1.5338077545166016,
"spec/mailers/order_mailer_spec.rb": 1.3990452289581299,
"spec/serializers/current_order_serializer_spec.rb": 2.3723340034484863,
"spec/controllers/spree/admin/variants_controller_spec.rb": 4.840111494064331,
"spec/controllers/api/order_cycles_controller_spec.rb": 1.5593302249908447,
"spec/requests/shop_spec.rb": 1.2129430770874023,
"spec/services/order_cycle_form_spec.rb": 0.767514705657959,
"spec/features/admin/content_spec.rb": 1.5474770069122314,
"spec/lib/open_food_network/tag_rule_applicator_spec.rb": 1.4562907218933105,
"spec/controllers/spree/admin/payment_methods_controller_spec.rb": 0.8975794315338135,
"spec/features/admin/users_spec.rb": 3.0521957874298096,
"spec/requests/checkout/paypal_spec.rb": 1.7288799285888672,
"spec/models/spree/product_set_spec.rb": 1.2894904613494873,
"spec/features/admin/enterprise_user_spec.rb": 0.9565138816833496,
"spec/serializers/admin/for_order_cycle/supplied_product_serializer_spec.rb": 0.5980274677276611,
"spec/controllers/spree/admin/adjustments_controller_spec.rb": 0.6785888671875,
"spec/models/spree/price_spec.rb": 0.7076306343078613,
"spec/services/subscriptions_count_spec.rb": 0.8449611663818359,
"spec/helpers/admin/subscriptions_helper_spec.rb": 0.7964563369750977,
"spec/requests/embedded_shopfronts_headers_spec.rb": 0.8313610553741455,
"spec/controllers/admin/manager_invitations_controller_spec.rb": 0.9167764186859131,
"spec/controllers/spree/admin/overview_controller_spec.rb": 0.560481071472168,
"spec/models/order_updater_spec.rb": 0.7670226097106934,
"spec/lib/open_food_network/enterprise_fee_applicator_spec.rb": 0.7502515316009521,
"spec/features/admin/caching_spec.rb": 0.9656000137329102,
"spec/models/spree/user_spec.rb": 0.9020359516143799,
"spec/controllers/spree/admin/search_controller_spec.rb": 0.7993369102478027,
"spec/serializers/admin/for_order_cycle/enterprise_serializer_spec.rb": 1.0361318588256836,
"spec/models/spree/classification_spec.rb": 0.7726085186004639,
"spec/models/spree/calculator/price_sack_spec.rb": 0.602428674697876,
"spec/controllers/admin/stripe_accounts_controller_spec.rb": 0.6723847389221191,
"spec/models/subscription_spec.rb": 0.8647208213806152,
"spec/lib/open_food_network/order_and_distributor_report_spec.rb": 0.8442015647888184,
"spec/lib/open_food_network/xero_invoices_report_spec.rb": 0.13793277740478516,
"spec/services/subscription_validator_spec.rb": 1.617713451385498,
"spec/models/spree/option_value_spec.rb": 0.5321366786956787,
"spec/controllers/spree/api/line_items_controller_spec.rb": 0.5649716854095459,
"spec/controllers/api/customers_controller_spec.rb": 0.3856332302093506,
"spec/features/admin/tax_settings_spec.rb": 0.5059962272644043,
"spec/models/spree/product_property_spec.rb": 0.4123075008392334,
"spec/models/concerns/product_stock_spec.rb": 1.365936279296875,
"spec/controllers/user_confirmations_controller_spec.rb": 0.5572206974029541,
"spec/models/spree/option_type_spec.rb": 0.43832898139953613,
"spec/models/customer_spec.rb": 0.37362074851989746,
"spec/helpers/i18n_helper_spec.rb": 0.40643787384033203,
"spec/models/spree/payment_method_spec.rb": 0.5251181125640869,
"spec/helpers/order_cycles_helper_spec.rb": 0.4389002323150635,
"spec/features/admin/external_services_spec.rb": 0.31794238090515137,
"spec/controllers/spree/credit_cards_controller_spec.rb": 0.3527517318725586,
"spec/features/consumer/external_services_spec.rb": 0.4350574016571045,
"spec/lib/open_food_network/users_and_enterprises_report_spec.rb": 0.359036922454834,
"spec/models/enterprise_group_spec.rb": 0.44833922386169434,
"spec/models/tag_rule/filter_shipping_methods_spec.rb": 0.34696006774902344,
"spec/lib/open_food_network/property_merge_spec.rb": 0.29970407485961914,
"spec/features/admin/image_settings_spec.rb": 0.32785749435424805,
"spec/models/exchange_fee_spec.rb": 0.23130130767822266,
"spec/lib/stripe/account_connector_spec.rb": 0.3126180171966553,
"spec/lib/open_food_network/products_cache_refreshment_spec.rb": 0.29149460792541504,
"spec/models/spree/tax_rate_spec.rb": 0.3151886463165283,
"spec/controllers/groups_controller_spec.rb": 0.28598833084106445,
"spec/models/inventory_item_spec.rb": 0.297809362411499,
"spec/serializers/variant_serializer_spec.rb": 0.25783276557922363,
"spec/lib/open_food_network/enterprise_injection_data_spec.rb": 0.29270124435424805,
"spec/serializers/admin/variant_override_serializer_spec.rb": 0.29378700256347656,
"spec/controllers/spree/paypal_controller_spec.rb": 0.3015480041503906,
"spec/controllers/spree/checkout_controller_spec.rb": 0.3235130310058594,
"spec/controllers/stripe/callbacks_controller_spec.rb": 0.35881519317626953,
"spec/controllers/spree/admin/base_controller_spec.rb": 0.28447699546813965,
"spec/controllers/user_registrations_controller_spec.rb": 0.37039661407470703,
"spec/serializers/api/admin/product_serializer_spec.rb": 0.2211611270904541,
"spec/services/search_orders_spec.rb": 0.25273942947387695,
"spec/serializers/spree/variant_serializer_spec.rb": 0.2560765743255615,
"spec/mailers/enterprise_mailer_spec.rb": 0.22377276420593262,
"spec/jobs/products_cache_integrity_checker_job_spec.rb": 0.38372278213500977,
"spec/serializers/enterprise_serializer_spec.rb": 0.24865961074829102,
"spec/models/stripe_account_spec.rb": 0.2764317989349365,
"spec/controllers/admin/stripe_connect_settings_controller_spec.rb": 0.25455760955810547,
"spec/controllers/api/enterprises_controller_spec.rb": 0.2367243766784668,
"spec/models/tag_rule/filter_payment_methods_spec.rb": 0.2608637809753418,
"spec/services/order_cycle_distributed_variants_spec.rb": 0.027887344360351562,
"spec/controllers/admin/tag_rules_controller_spec.rb": 0.2483692169189453,
"spec/models/adjustment_metadata_spec.rb": 0.1961231231689453,
"spec/controllers/shops_controller_spec.rb": 1.6529083251953125,
"spec/models/column_preference_spec.rb": 0.19749212265014648,
"spec/serializers/admin/index_enterprise_serializer_spec.rb": 0.1634202003479004,
"spec/lib/open_food_network/subscription_summary_spec.rb": 0.18712377548217773,
"spec/serializers/admin/customer_serializer_spec.rb": 0.17607975006103516,
"spec/controllers/admin/column_preferences_controller_spec.rb": 0.1870410442352295,
"spec/models/model_set_spec.rb": 0.19138789176940918,
"spec/models/tag_rule/filter_order_cycles_spec.rb": 0.1799607276916504,
"spec/helpers/spree/orders_helper_spec.rb": 0.1408379077911377,
"spec/models/tag_rule/filter_products_spec.rb": 0.17629504203796387,
"spec/controllers/user_passwords_controller_spec.rb": 0.16375088691711426,
"spec/controllers/stripe/webhooks_controller_spec.rb": 0.15069150924682617,
"spec/models/stock/package_spec.rb": 0.14911603927612305,
"spec/models/tag_rule/discount_order_spec.rb": 0.13631701469421387,
"spec/features/consumer/confirm_invitation_spec.rb": 0.25405168533325195,
"spec/lib/spree/product_filters_spec.rb": 0.11962199211120605,
"spec/lib/open_food_network/option_value_namer_spec.rb": 0.13082218170166016,
"spec/mailers/user_mailer_spec.rb": 0.30326128005981445,
"spec/helpers/checkout_helper_spec.rb": 0.2074277400970459,
"spec/models/product_import/settings_spec.rb": 0.13475465774536133,
"spec/models/spree/credit_card_spec.rb": 0.12078642845153809,
"spec/models/coordinator_fee_spec.rb": 0.12605953216552734,
"spec/controllers/registration_controller_spec.rb": 0.09199261665344238,
"spec/lib/open_food_network/subscription_summarizer_spec.rb": 0.059951066970825195,
"spec/lib/open_food_network/sales_tax_report_spec.rb": 0.10369729995727539,
"spec/jobs/refresh_products_cache_job_spec.rb": 0.27120208740234375,
"spec/models/spree/addresses_spec.rb": 0.1175835132598877,
"spec/lib/open_food_network/i18n_config_spec.rb": 0.0969705581665039,
"spec/models/spree/order/checkout_spec.rb": 1.2646453380584717,
"spec/features/consumer/sitemap_spec.rb": 0.09025812149047852,
"spec/helpers/shared_helper_spec.rb": 0.07801532745361328,
"spec/models/spree/gateway/stripe_connect_spec.rb": 0.07303094863891602,
"spec/helpers/shop_helper_spec.rb": 0.058048248291015625,
"spec/serializers/admin/subscription_customer_serializer_spec.rb": 0.060986995697021484,
"spec/lib/open_food_network/cached_products_renderer_spec.rb": 0.07480335235595703,
"spec/models/spree/calculator/flexi_rate_spec.rb": 0.6015393733978271,
"spec/models/spree/preference_spec.rb": 0.05887198448181152,
"spec/lib/stripe/webhook_handler_spec.rb": 0.059610605239868164,
"spec/lib/open_food_network/order_grouper_spec.rb": 0.05851387977600098,
"spec/controllers/spree/user_sessions_controller_spec.rb": 0.051381826400756836,
"spec/helpers/html_helper_spec.rb": 0.05978536605834961,
"spec/helpers/navigation_helper_spec.rb": 0.06995773315429688,
"spec/models/tag_rule_spec.rb": 0.05184459686279297,
"spec/jobs/welcome_enterprise_job_spec.rb": 0.05195975303649902,
"spec/lib/open_food_network/enterprise_issue_validator_spec.rb": 0.14506173133850098,
"spec/jobs/confirm_order_job_spec.rb": 0.04619622230529785,
"spec/models/spree/preferences/file_configuration_spec.rb": 0.05427718162536621,
"spec/models/product_import/reset_absent_spec.rb": 0.04453468322753906,
"spec/models/product_import/entry_processor_spec.rb": 0.04535818099975586,
"spec/services/embedded_page_service_spec.rb": 0.04078173637390137,
"spec/lib/spree/localized_number_spec.rb": 0.05774712562561035,
"spec/lib/open_food_network/reports/report_spec.rb": 0.04312324523925781,
"spec/controllers/spree/store_controller_spec.rb": 0.032500505447387695,
"spec/models/spree/calculator/flat_percent_item_total_spec.rb": 0.5876741409301758,
"spec/controllers/api/statuses_controller_spec.rb": 0.04073929786682129,
"spec/controllers/base_controller_spec.rb": 0.030263423919677734,
"spec/models/subscription_line_item_spec.rb": 0.03436994552612305,
"spec/models/calculator/flat_percent_per_item_spec.rb": 0.030996322631835938,
"spec/lib/open_food_network/referer_parser_spec.rb": 0.027393817901611328,
"spec/services/reset_order_service_spec.rb": 0.028766632080078125,
"spec/models/spree/calculator/per_item_spec.rb": 0.291332483291626,
"spec/jobs/confirm_signup_job_spec.rb": 0.021788835525512695,
"spec/lib/open_food_network/reports/rule_spec.rb": 0.025704622268676758,
"spec/models/calculator/weight_spec.rb": 1.380509376525879,
"spec/requests/large_request_spec.rb": 0.03156089782714844,
"spec/serializers/credit_card_serializer_spec.rb": 0.023131370544433594,
"spec/models/feature_flags_spec.rb": 0.0632791519165039,
"spec/lib/open_food_network/feature_toggle_spec.rb": 0.02283477783203125,
"spec/jobs/heartbeat_job_spec.rb": 0.020235776901245117,
"spec/models/spree/calculator/flat_rate_spec.rb": 0.018027782440185547,
"spec/helpers/groups_helper_spec.rb": 0.016248464584350586,
"spec/helpers/products_helper_spec.rb": 0.018996000289916992,
"spec/services/mail_configuration_spec.rb": 0.01758885383605957,
"spec/helpers/spree/admin/base_helper_spec.rb": 0.008402109146118164,
"spec/lib/open_food_network/error_logger_spec.rb": 0.007436990737915039,
"spec/models/content_configuration_spec.rb": 0.0073282718658447266,
"spec/lib/open_food_network/reports/row_spec.rb": 0.006602764129638672,
"spec/config/application_spec.rb": 0.006625175476074219,
"spec/controllers/admin/proxy_orders_controller_spec.rb": 12.432438373565674,
"spec/controllers/api/enterprise_fees_controller_spec.rb": 0.1020348072052002,
"spec/controllers/spree/admin/reports/enterprise_fee_summaries_controller_spec.rb": 0.7282826900482178,
"spec/controllers/spree/api/shipments_controller_spec.rb": 14.814026355743408,
"spec/features/admin/reports/enterprise_fee_summaries_spec.rb": 17.826215505599976,
"spec/features/admin/reports_spec.rb": 27.360989332199097,
"spec/features/admin/subscriptions_spec.rb": 74.08096742630005,
"spec/helpers/admin/orders_helper_spec.rb": 0.5890231132507324,
"spec/jobs/subscription_confirm_job_spec.rb": 27.758408069610596,
"spec/lib/open_food_network/lettuce_share_report_spec.rb": 2.872073173522949,
"spec/lib/open_food_network/order_cycle_management_report_spec.rb": 3.6512515544891357,
"spec/lib/open_food_network/products_and_inventory_report_spec.rb": 4.582597970962524,
"spec/mailers/subscription_mailer_spec.rb": 17.476669549942017,
"spec/models/concerns/order_shipment_spec.rb": 1.8977851867675781,
"spec/models/product_import/products_reset_strategy_spec.rb": 2.3993682861328125,
"spec/models/product_importer_spec.rb": 49.001238107681274,
"spec/models/proxy_order_spec.rb": 9.741921663284302,
"spec/models/spree/gateway_tagging_spec.rb": 0.5152750015258789,
"spec/models/spree/stock/availability_validator_spec.rb": 6.4449944496154785,
"spec/serializers/api/cached_enterprise_serializer_spec.rb": 1.5803031921386719,
"spec/serializers/api/shipping_method_serializer_spec.rb": 0.3579277992248535,
"spec/services/advance_order_service_spec.rb": 5.4587037563323975,
"spec/services/bulk_invoice_service_spec.rb": 2.845306634902954,
"spec/services/default_stock_location_spec.rb": 0.11547493934631348,
"spec/services/invoice_renderer_spec.rb": 3.9688003063201904,
"spec/services/order_cycle_distributed_products_spec.rb": 2.3592758178710938,
"spec/services/restart_checkout_spec.rb": 0.3222994804382324,
"spec/services/subscription_form_spec.rb": 1.8038544654846191,
"spec/services/subscription_variants_service_spec.rb": 3.130023717880249,
"spec/services/tax_rate_finder_spec.rb": 2.2943179607391357,
"spec/services/upload_sanitizer_spec.rb": 0.006753444671630859,
"spec/services/variants_stock_levels_spec.rb": 2.1153390407562256,
"spec/validators/date_time_string_validator_spec.rb": 0.051422119140625,
"spec/validators/integer_array_validator_spec.rb": 0.0492095947265625
"spec/features/admin/orders_spec.rb": 237.817884683609,
"spec/features/admin/order_cycles_spec.rb": 94.3379921913147,
"spec/features/admin/bulk_product_update_spec.rb": 78.97872257232666,
"spec/features/admin/bulk_order_management_spec.rb": 128.53619170188904,
"spec/features/consumer/shopping/checkout_spec.rb": 126.58671498298645,
"spec/features/consumer/shopping/shopping_spec.rb": 76.83493185043335,
"spec/features/admin/variant_overrides_spec.rb": 136.1164140701294,
"spec/features/admin/product_import_spec.rb": 111.82432579994202,
"spec/features/consumer/shopping/variant_overrides_spec.rb": 91.0473141670227,
"spec/features/admin/subscriptions_spec.rb": 80.61201500892639,
"spec/models/order_cycle_spec.rb": 51.933889865875244,
"spec/features/admin/payment_method_spec.rb": 64.49885392189026,
"spec/features/admin/customers_spec.rb": 41.059948205947876,
"spec/services/order_syncer_spec.rb": 35.46346163749695,
"spec/models/product_importer_spec.rb": 48.392107009887695,
"spec/controllers/api/orders_controller_spec.rb": 37.38580870628357,
"spec/models/spree/order_spec.rb": 43.49769330024719,
"spec/features/consumer/shops_spec.rb": 40.91608905792236,
"spec/features/admin/enterprise_relationships_spec.rb": 48.79179549217224,
"spec/features/admin/enterprises_spec.rb": 68.66470575332642,
"spec/features/consumer/shopping/orders_spec.rb": 50.41251015663147,
"spec/controllers/admin/subscriptions_controller_spec.rb": 33.12591361999512,
"spec/features/admin/shipping_methods_spec.rb": 45.78349208831787,
"spec/features/consumer/authentication_spec.rb": 80.65127658843994,
"spec/helpers/injection_helper_spec.rb": 34.83948469161987,
"spec/controllers/admin/bulk_line_items_controller_spec.rb": 23.70878767967224,
"spec/features/admin/enterprise_fees_spec.rb": 31.250224351882935,
"spec/features/admin/enterprise_roles_spec.rb": 41.325873374938965,
"spec/features/admin/tag_rules_spec.rb": 61.053430795669556,
"spec/features/consumer/shopping/cart_spec.rb": 27.45794367790222,
"spec/jobs/subscription_confirm_job_spec.rb": 27.508367776870728,
"spec/controllers/spree/orders_controller_spec.rb": 24.71937584877014,
"spec/features/admin/reports_spec.rb": 33.325284481048584,
"spec/features/consumer/account_spec.rb": 20.118611574172974,
"spec/features/admin/products_spec.rb": 36.03796911239624,
"spec/lib/open_food_network/order_cycle_permissions_spec.rb": 24.558523654937744,
"spec/models/spree/line_item_spec.rb": 24.942461490631104,
"spec/features/consumer/cookies_spec.rb": 29.341325521469116,
"spec/models/spree/ability_spec.rb": 11.801489353179932,
"spec/lib/open_food_network/products_cache_spec.rb": 13.28692364692688,
"spec/features/admin/adjustments_spec.rb": 23.726555824279785,
"spec/models/exchange_spec.rb": 18.231592655181885,
"spec/features/admin/enterprises/images_spec.rb": 21.89902114868164,
"spec/controllers/line_items_controller_spec.rb": 11.261710166931152,
"spec/mailers/producer_mailer_spec.rb": 19.540743350982666,
"spec/models/spree/product_spec.rb": 19.957887411117554,
"spec/features/consumer/shopping/embedded_shopfronts_spec.rb": 23.64180088043213,
"spec/models/spree/variant_spec.rb": 16.831849813461304,
"spec/features/admin/reports/enterprise_fee_summaries_spec.rb": 16.088922023773193,
"spec/jobs/subscription_placement_job_spec.rb": 17.93425989151001,
"spec/mailers/subscription_mailer_spec.rb": 19.027340412139893,
"spec/controllers/spree/admin/reports_controller_spec.rb": 21.17331314086914,
"spec/features/consumer/producers_spec.rb": 18.497092247009277,
"spec/models/spree/adjustment_spec.rb": 7.688546895980835,
"spec/features/admin/enterprise_groups_spec.rb": 11.997856616973877,
"spec/controllers/admin/proxy_orders_controller_spec.rb": 10.339219331741333,
"spec/features/consumer/shopping/checkout_auth_spec.rb": 16.628108501434326,
"spec/features/consumer/registration_spec.rb": 31.164623498916626,
"spec/lib/open_food_network/orders_and_fulfillments_report_spec.rb": 9.818962812423706,
"spec/requests/checkout/stripe_connect_spec.rb": 8.772961616516113,
"spec/controllers/api/product_images_controller_spec.rb": 6.45292592048645,
"spec/lib/open_food_network/address_finder_spec.rb": 8.793009996414185,
"spec/features/consumer/groups_spec.rb": 26.977667093276978,
"spec/models/proxy_order_spec.rb": 13.104656219482422,
"spec/features/consumer/multilingual_spec.rb": 17.43264937400818,
"spec/lib/open_food_network/permissions_spec.rb": 13.183045625686646,
"spec/features/admin/variants_spec.rb": 17.20117712020874,
"spec/models/enterprise_spec.rb": 10.5332670211792,
"spec/models/variant_override_spec.rb": 7.334490060806274,
"spec/services/order_factory_spec.rb": 11.875489473342896,
"spec/lib/open_food_network/enterprise_fee_calculator_spec.rb": 12.027559757232666,
"spec/controllers/api/logos_controller_spec.rb": 7.298051834106445,
"spec/controllers/spree/admin/orders_controller_spec.rb": 7.250804662704468,
"spec/lib/open_food_network/order_cycle_form_applicator_spec.rb": 9.185548305511475,
"spec/lib/open_food_network/user_balance_calculator_spec.rb": 9.735471725463867,
"spec/lib/open_food_network/proxy_order_syncer_spec.rb": 11.126964092254639,
"spec/models/enterprise_relationship_spec.rb": 9.923192739486694,
"spec/lib/open_food_network/bulk_coop_report_spec.rb": 6.28821325302124,
"spec/models/spree/property_spec.rb": 6.4871885776519775,
"spec/services/subscription_estimator_spec.rb": 6.207820892333984,
"spec/lib/open_food_network/products_renderer_spec.rb": 6.318859338760376,
"spec/features/admin/schedules_spec.rb": 17.760894298553467,
"spec/lib/open_food_network/packing_report_spec.rb": 7.000155925750732,
"spec/models/spree/stock/availability_validator_spec.rb": 6.332439661026001,
"spec/models/enterprise_fee_spec.rb": 6.138005971908569,
"spec/lib/open_food_network/scope_variant_to_hub_spec.rb": 10.594756841659546,
"spec/features/consumer/shopping/embedded_groups_spec.rb": 18.79310703277588,
"spec/controllers/spree/users_controller_spec.rb": 5.807466983795166,
"spec/services/advance_order_service_spec.rb": 6.725487947463989,
"spec/features/admin/enterprises/index_spec.rb": 15.634530067443848,
"spec/jobs/order_cycle_notification_job_spec.rb": 4.208659410476685,
"spec/controllers/spree/admin/variants_controller_spec.rb": 5.583896160125732,
"spec/features/admin/overview_spec.rb": 5.639538526535034,
"spec/controllers/spree/admin/orders/customer_details_controller_spec.rb": 5.8910181522369385,
"spec/lib/open_food_network/products_and_inventory_report_spec.rb": 5.34000563621521,
"spec/controllers/admin/schedules_controller_spec.rb": 2.7360916137695312,
"spec/models/concerns/variant_stock_spec.rb": 4.917129993438721,
"spec/models/spree/payment_spec.rb": 5.25871467590332,
"spec/controllers/admin/enterprises_controller_spec.rb": 5.274713754653931,
"spec/controllers/admin/variant_overrides_controller_spec.rb": 5.423460245132446,
"spec/models/enterprise_caching_spec.rb": 3.049555778503418,
"spec/services/invoice_renderer_spec.rb": 3.769397258758545,
"spec/features/consumer/shopping/products_spec.rb": 6.6356730461120605,
"spec/lib/open_food_network/group_buy_report_spec.rb": 4.001709938049316,
"spec/controllers/shop_controller_spec.rb": 3.901616334915161,
"spec/features/admin/payments_spec.rb": 3.805184841156006,
"spec/lib/open_food_network/order_cycle_management_report_spec.rb": 3.7799723148345947,
"spec/controllers/spree/admin/payments_controller_spec.rb": 3.4514706134796143,
"spec/models/spree/image_spec.rb": 4.41399621963501,
"spec/helpers/enterprises_helper_spec.rb": 3.328219413757324,
"spec/features/consumer/account/settings_spec.rb": 5.9961183071136475,
"spec/features/consumer/account/cards_spec.rb": 3.517259120941162,
"spec/features/admin/authentication_spec.rb": 10.881295204162598,
"spec/services/subscription_variants_service_spec.rb": 3.4830353260040283,
"spec/controllers/spree/admin/products_controller_spec.rb": 4.002648830413818,
"spec/features/admin/users_spec.rb": 5.449582576751709,
"spec/controllers/api/promo_images_controller_spec.rb": 3.74454927444458,
"spec/lib/open_food_network/customers_report_spec.rb": 3.41019868850708,
"spec/lib/open_food_network/lettuce_share_report_spec.rb": 2.7670164108276367,
"spec/lib/open_food_network/scope_variants_to_search_spec.rb": 2.7599198818206787,
"spec/services/bulk_invoice_service_spec.rb": 2.5634195804595947,
"spec/controllers/admin/subscription_line_items_controller_spec.rb": 2.519078254699707,
"spec/controllers/admin/order_cycles_controller_spec.rb": 3.145948648452759,
"spec/controllers/admin/inventory_items_controller_spec.rb": 2.398263454437256,
"spec/controllers/enterprises_controller_spec.rb": 2.2687149047851562,
"spec/models/product_import/inventory_reset_strategy_spec.rb": 2.328801393508911,
"spec/features/consumer/footer_links_spec.rb": 7.389659404754639,
"spec/lib/open_food_network/subscription_payment_updater_spec.rb": 2.519193649291992,
"spec/models/product_import/products_reset_strategy_spec.rb": 2.208404064178467,
"spec/services/order_cycle_distributed_products_spec.rb": 1.9242751598358154,
"spec/requests/checkout/failed_checkout_spec.rb": 2.4253993034362793,
"spec/services/tax_rate_finder_spec.rb": 1.968726396560669,
"spec/models/producer_property_spec.rb": 1.9552044868469238,
"spec/controllers/cart_controller_spec.rb": 1.8240394592285156,
"spec/services/variants_stock_levels_spec.rb": 1.904362440109253,
"spec/features/admin/multilingual_spec.rb": 4.289350509643555,
"spec/controllers/checkout_controller_spec.rb": 1.6279420852661133,
"spec/models/concerns/order_shipment_spec.rb": 1.7712960243225098,
"spec/services/subscription_form_spec.rb": 1.7455992698669434,
"spec/requests/checkout/paypal_spec.rb": 1.5917167663574219,
"spec/models/spree/shipping_method_spec.rb": 2.04691219329834,
"spec/controllers/shops_controller_spec.rb": 1.0743358135223389,
"spec/services/subscription_validator_spec.rb": 1.422741413116455,
"spec/serializers/api/cached_enterprise_serializer_spec.rb": 1.5118434429168701,
"spec/features/admin/content_spec.rb": 1.3384621143341064,
"spec/models/spree/taxon_spec.rb": 1.4807021617889404,
"spec/lib/open_food_network/tag_rule_applicator_spec.rb": 1.3752143383026123,
"spec/services/cart_service_spec.rb": 1.4081895351409912,
"spec/mailers/order_mailer_spec.rb": 7.018088102340698,
"spec/controllers/spree/admin/shipping_methods_controller_spec.rb": 1.3566155433654785,
"spec/models/calculator/weight_spec.rb": 3.7783122062683105,
"spec/models/concerns/product_stock_spec.rb": 1.3806025981903076,
"spec/controllers/admin/customers_controller_spec.rb": 1.0804333686828613,
"spec/models/spree/product_set_spec.rb": 1.5525598526000977,
"spec/models/spree/order/checkout_spec.rb": 1.19655442237854,
"spec/requests/shop_spec.rb": 1.097696304321289,
"spec/features/admin/caching_spec.rb": 0.731848955154419,
"spec/features/admin/enterprise_user_spec.rb": 0.7907397747039795,
"spec/controllers/admin/manager_invitations_controller_spec.rb": 0.9135403633117676,
"spec/models/spree/user_spec.rb": 0.9081456661224365,
"spec/controllers/spree/admin/payment_methods_controller_spec.rb": 0.7309935092926025,
"spec/models/subscription_spec.rb": 0.8055622577667236,
"spec/services/subscriptions_count_spec.rb": 0.8070430755615234,
"spec/lib/open_food_network/order_and_distributor_report_spec.rb": 1.044970989227295,
"spec/requests/embedded_shopfronts_headers_spec.rb": 0.8394205570220947,
"spec/controllers/spree/admin/search_controller_spec.rb": 0.7693119049072266,
"spec/helpers/admin/subscriptions_helper_spec.rb": 0.7205362319946289,
"spec/models/spree/classification_spec.rb": 0.6712856292724609,
"spec/services/order_cycle_form_spec.rb": 0.7938394546508789,
"spec/models/order_updater_spec.rb": 0.605487585067749,
"spec/lib/open_food_network/enterprise_fee_applicator_spec.rb": 0.909766435623169,
"spec/controllers/spree/admin/reports/enterprise_fee_summaries_controller_spec.rb": 0.396237850189209,
"spec/models/spree/price_spec.rb": 0.8924257755279541,
"spec/controllers/spree/admin/adjustments_controller_spec.rb": 0.5939099788665771,
"spec/controllers/admin/stripe_accounts_controller_spec.rb": 0.4869372844696045,
"spec/models/spree/calculator/price_sack_spec.rb": 0.6309628486633301,
"spec/models/spree/calculator/flexi_rate_spec.rb": 0.58841872215271,
"spec/helpers/admin/orders_helper_spec.rb": 0.5381126403808594,
"spec/models/spree/calculator/flat_percent_item_total_spec.rb": 0.659644603729248,
"spec/controllers/spree/admin/overview_controller_spec.rb": 1.4906401634216309,
"spec/controllers/user_confirmations_controller_spec.rb": 0.4401402473449707,
"spec/models/spree/option_value_spec.rb": 0.5641300678253174,
"spec/models/spree/payment_method_spec.rb": 0.6061296463012695,
"spec/models/spree/gateway_tagging_spec.rb": 0.4723038673400879,
"spec/features/admin/tax_settings_spec.rb": 0.47362518310546875,
"spec/models/enterprise_group_spec.rb": 0.36635661125183105,
"spec/helpers/order_cycles_helper_spec.rb": 0.4308586120605469,
"spec/models/spree/option_type_spec.rb": 0.5037732124328613,
"spec/models/spree/product_property_spec.rb": 0.3868262767791748,
"spec/helpers/i18n_helper_spec.rb": 0.42139244079589844,
"spec/controllers/api/customers_controller_spec.rb": 0.3846399784088135,
"spec/jobs/products_cache_integrity_checker_job_spec.rb": 0.1914665699005127,
"spec/models/customer_spec.rb": 0.38435792922973633,
"spec/controllers/user_registrations_controller_spec.rb": 0.15586233139038086,
"spec/lib/open_food_network/users_and_enterprises_report_spec.rb": 0.3169522285461426,
"spec/controllers/stripe/callbacks_controller_spec.rb": 0.22754812240600586,
"spec/serializers/api/shipping_method_serializer_spec.rb": 0.31409788131713867,
"spec/controllers/spree/credit_cards_controller_spec.rb": 0.30093884468078613,
"spec/models/tag_rule/filter_shipping_methods_spec.rb": 0.2832508087158203,
"spec/features/admin/image_settings_spec.rb": 0.2664794921875,
"spec/controllers/spree/checkout_controller_spec.rb": 0.3376595973968506,
"spec/services/restart_checkout_spec.rb": 0.8919713497161865,
"spec/features/admin/external_services_spec.rb": 0.2553997039794922,
"spec/models/spree/tax_rate_spec.rb": 0.29668140411376953,
"spec/lib/stripe/account_connector_spec.rb": 0.31223392486572266,
"spec/mailers/user_mailer_spec.rb": 0.28792262077331543,
"spec/controllers/spree/paypal_controller_spec.rb": 0.28707265853881836,
"spec/lib/open_food_network/property_merge_spec.rb": 0.2984285354614258,
"spec/models/inventory_item_spec.rb": 0.2676277160644531,
"spec/lib/open_food_network/products_cache_refreshment_spec.rb": 0.5341198444366455,
"spec/models/spree/calculator/per_item_spec.rb": 0.31163692474365234,
"spec/controllers/groups_controller_spec.rb": 0.13434839248657227,
"spec/controllers/spree/admin/base_controller_spec.rb": 0.301377534866333,
"spec/models/stripe_account_spec.rb": 0.4118363857269287,
"spec/jobs/refresh_products_cache_job_spec.rb": 0.36127209663391113,
"spec/models/tag_rule/filter_payment_methods_spec.rb": 0.40189361572265625,
"spec/controllers/admin/stripe_connect_settings_controller_spec.rb": 0.34180450439453125,
"spec/features/consumer/confirm_invitation_spec.rb": 0.3606686592102051,
"spec/services/search_orders_spec.rb": 0.5707180500030518,
"spec/controllers/admin/tag_rules_controller_spec.rb": 0.44332337379455566,
"spec/controllers/api/enterprises_controller_spec.rb": 0.8137326240539551,
"spec/models/exchange_fee_spec.rb": 0.33515214920043945,
"spec/mailers/enterprise_mailer_spec.rb": 0.36087584495544434,
"spec/serializers/api/admin/product_serializer_spec.rb": 0.44899654388427734,
"spec/helpers/checkout_helper_spec.rb": 0.15273785591125488,
"spec/models/column_preference_spec.rb": 0.35555553436279297,
"spec/models/adjustment_metadata_spec.rb": 0.36631131172180176,
"spec/models/model_set_spec.rb": 0.3200507164001465,
"spec/lib/open_food_network/subscription_summary_spec.rb": 0.2988402843475342,
"spec/controllers/admin/column_preferences_controller_spec.rb": 0.3077270984649658,
"spec/models/tag_rule/filter_order_cycles_spec.rb": 0.3134000301361084,
"spec/models/tag_rule/filter_products_spec.rb": 0.23253226280212402,
"spec/controllers/user_passwords_controller_spec.rb": 0.15717339515686035,
"spec/controllers/stripe/webhooks_controller_spec.rb": 0.1401364803314209,
"spec/models/stock/package_spec.rb": 0.25682640075683594,
"spec/lib/open_food_network/enterprise_issue_validator_spec.rb": 0.0387272834777832,
"spec/helpers/spree/orders_helper_spec.rb": 0.12387847900390625,
"spec/lib/open_food_network/xero_invoices_report_spec.rb": 0.13364052772521973,
"spec/models/tag_rule/discount_order_spec.rb": 0.1327047348022461,
"spec/models/product_import/settings_spec.rb": 0.16132211685180664,
"spec/lib/open_food_network/option_value_namer_spec.rb": 0.5149452686309814,
"spec/models/coordinator_fee_spec.rb": 0.12866568565368652,
"spec/models/spree/credit_card_spec.rb": 0.2072758674621582,
"spec/lib/spree/product_filters_spec.rb": 0.12201762199401855,
"spec/models/spree/addresses_spec.rb": 0.11647152900695801,
"spec/services/default_stock_location_spec.rb": 0.09911870956420898,
"spec/lib/open_food_network/sales_tax_report_spec.rb": 0.10174679756164551,
"spec/controllers/api/enterprise_fees_controller_spec.rb": 0.11140251159667969,
"spec/lib/open_food_network/i18n_config_spec.rb": 0.09999489784240723,
"spec/controllers/registration_controller_spec.rb": 0.09182143211364746,
"spec/features/consumer/sitemap_spec.rb": 0.10870242118835449,
"spec/helpers/shared_helper_spec.rb": 0.07873010635375977,
"spec/lib/open_food_network/cached_products_renderer_spec.rb": 0.06981682777404785,
"spec/models/spree/gateway/stripe_connect_spec.rb": 0.05915951728820801,
"spec/helpers/navigation_helper_spec.rb": 0.061690330505371094,
"spec/lib/open_food_network/subscription_summarizer_spec.rb": 0.05331063270568848,
"spec/helpers/html_helper_spec.rb": 0.04561138153076172,
"spec/lib/stripe/webhook_handler_spec.rb": 0.05020856857299805,
"spec/models/spree/preference_spec.rb": 0.05530714988708496,
"spec/lib/open_food_network/order_grouper_spec.rb": 0.04380607604980469,
"spec/helpers/shop_helper_spec.rb": 0.056023359298706055,
"spec/lib/spree/localized_number_spec.rb": 0.04551959037780762,
"spec/models/spree/preferences/file_configuration_spec.rb": 0.04132723808288574,
"spec/jobs/welcome_enterprise_job_spec.rb": 0.04942655563354492,
"spec/models/tag_rule_spec.rb": 0.04657173156738281,
"spec/validators/date_time_string_validator_spec.rb": 0.05379605293273926,
"spec/controllers/spree/user_sessions_controller_spec.rb": 0.04584026336669922,
"spec/validators/integer_array_validator_spec.rb": 0.04658031463623047,
"spec/jobs/confirm_order_job_spec.rb": 0.041007280349731445,
"spec/models/product_import/entry_processor_spec.rb": 0.03451251983642578,
"spec/models/product_import/reset_absent_spec.rb": 0.03505396842956543,
"spec/lib/open_food_network/reports/report_spec.rb": 0.03907656669616699,
"spec/services/embedded_page_service_spec.rb": 0.03762197494506836,
"spec/controllers/api/statuses_controller_spec.rb": 0.036696434020996094,
"spec/models/subscription_line_item_spec.rb": 0.025917768478393555,
"spec/controllers/spree/store_controller_spec.rb": 0.03051137924194336,
"spec/requests/large_request_spec.rb": 0.021759748458862305,
"spec/models/calculator/flat_percent_per_item_spec.rb": 0.02252483367919922,
"spec/controllers/base_controller_spec.rb": 0.025274991989135742,
"spec/services/reset_order_service_spec.rb": 0.024686813354492188,
"spec/services/order_cycle_distributed_variants_spec.rb": 0.02391505241394043,
"spec/lib/open_food_network/referer_parser_spec.rb": 0.020322799682617188,
"spec/lib/open_food_network/reports/rule_spec.rb": 0.021949052810668945,
"spec/lib/open_food_network/feature_toggle_spec.rb": 0.020271778106689453,
"spec/jobs/confirm_signup_job_spec.rb": 0.021286725997924805,
"spec/jobs/heartbeat_job_spec.rb": 0.01560068130493164,
"spec/helpers/products_helper_spec.rb": 0.01751542091369629,
"spec/models/spree/calculator/flat_rate_spec.rb": 0.015111207962036133,
"spec/services/mail_configuration_spec.rb": 0.012917757034301758,
"spec/helpers/groups_helper_spec.rb": 0.018085002899169922,
"spec/helpers/spree/admin/base_helper_spec.rb": 0.008218050003051758,
"spec/lib/open_food_network/error_logger_spec.rb": 0.005335807800292969,
"spec/models/content_configuration_spec.rb": 0.006735563278198242,
"spec/services/upload_sanitizer_spec.rb": 0.0061757564544677734,
"spec/config/application_spec.rb": 0.004937887191772461,
"spec/lib/open_food_network/reports/row_spec.rb": 0.004645824432373047,
"spec/controllers/api/products_controller_spec.rb": 31.840720176696777,
"spec/controllers/api/shipments_controller_spec.rb": 23.73399782180786,
"spec/controllers/api/taxonomies_controller_spec.rb": 0.07463383674621582,
"spec/controllers/api/taxons_controller_spec.rb": 0.9186584949493408,
"spec/controllers/api/variants_controller_spec.rb": 17.02829670906067,
"spec/controllers/spree/admin/users_controller_spec.rb": 0.2153482437133789,
"spec/controllers/spree/api/base_controller_spec.rb": 0.1394824981689453,
"spec/features/admin/reports/packing_report_spec.rb": 5.037803411483765,
"spec/features/consumer/shopping/checkout_paypal_spec.rb": 9.92912220954895,
"spec/helpers/serializer_helper_spec.rb": 0.010895967483520508,
"spec/helpers/spree/admin/orders_helper_spec.rb": 0.05771446228027344,
"spec/models/spree/calculator_spec.rb": 3.1673130989074707,
"spec/models/spree/shipment_spec.rb": 1.092050313949585,
"spec/serializers/api/admin/customer_serializer_spec.rb": 0.1630871295928955,
"spec/serializers/api/admin/enterprise_serializer_spec.rb": 2.3938491344451904,
"spec/serializers/api/admin/exchange_serializer_spec.rb": 3.123688220977783,
"spec/serializers/api/admin/for_order_cycle/enterprise_serializer_spec.rb": 0.9490363597869873,
"spec/serializers/api/admin/for_order_cycle/supplied_product_serializer_spec.rb": 0.6075096130371094,
"spec/serializers/api/admin/index_enterprise_serializer_spec.rb": 0.18369698524475098,
"spec/serializers/api/admin/subscription_customer_serializer_spec.rb": 0.06726932525634766,
"spec/serializers/api/admin/variant_override_serializer_spec.rb": 0.44232988357543945,
"spec/serializers/api/admin/variant_serializer_spec.rb": 1.0454332828521729,
"spec/serializers/api/credit_card_serializer_spec.rb": 0.017533540725708008,
"spec/serializers/api/current_order_serializer_spec.rb": 2.1227188110351562,
"spec/serializers/api/enterprise_serializer_spec.rb": 0.14253616333007812,
"spec/serializers/api/enterprise_shopfront_list_serializer_spec.rb": 0.11119532585144043,
"spec/serializers/api/enterprise_shopfront_serializer_spec.rb": 1.827807903289795,
"spec/serializers/api/group_list_serializer_spec.rb": 0.14617300033569336,
"spec/serializers/api/order_cycle_serializer_spec.rb": 0.09012603759765625,
"spec/serializers/api/order_serializer_spec.rb": 4.509246826171875,
"spec/serializers/api/variant_serializer_spec.rb": 0.2834649085998535,
"spec/services/exchange_variant_bulk_updater_spec.rb": 1.3508999347686768,
"spec/views/spree/admin/orders/edit.html.haml_spec.rb": 2.0251882076263428,
"spec/views/spree/admin/orders/index.html.haml_spec.rb": 0.15261244773864746
}

View File

@@ -23,9 +23,9 @@ module Api
it "gets the jstree-friendly version of a taxonomy" do
api_get :jstree, id: taxonomy.id
json_response["data"].should eq(taxonomy.root.name)
json_response["attr"].should eq("id" => taxonomy.root.id, "name" => taxonomy.root.name)
json_response["state"].should eq("closed")
expect(json_response["data"]).to eq(taxonomy.root.name)
expect(json_response["attr"]).to eq("id" => taxonomy.root.id, "name" => taxonomy.root.name)
expect(json_response["state"]).to eq("closed")
end
end
end

View File

@@ -44,9 +44,9 @@ describe Api::TaxonsController do
api_get :jstree, taxonomy_id: taxonomy.id, id: taxon.id
response = json_response.first
response["data"].should eq(taxon2.name)
response["attr"].should eq("name" => taxon2.name, "id" => taxon2.id)
response["state"].should eq("closed")
expect(response["data"]).to eq(taxon2.name)
expect(response["attr"]).to eq("name" => taxon2.name, "id" => taxon2.id)
expect(response["state"]).to eq("closed")
end
it "cannot create a new taxon if not an admin" do

View File

@@ -64,6 +64,13 @@ feature "Managing users" do
expect(page).to have_content("Account updated")
end
it "should let me edit the user email" do
fill_in "Email", with: "newemail@example.org"
click_button "Update"
expect(page).to have_content("The account will be updated once the new email is confirmed.")
end
end
end

View File

@@ -13,7 +13,7 @@ feature "Authentication", js: true do
fill_in "Email", with: user.email
fill_in "Password", with: user.password
click_login_button
page.should have_content "Find local producers"
expect(page).to have_content "Find local producers"
expect(page).to have_current_path producers_path
end
end
@@ -28,20 +28,20 @@ feature "Authentication", js: true do
open_login_modal
end
scenario "showing login" do
page.should have_login_modal
expect(page).to have_login_modal
end
scenario "failing to login" do
fill_in "Email", with: user.email
click_login_button
page.should have_content "Invalid email or password"
expect(page).to have_content "Invalid email or password"
end
scenario "logging in successfully" do
fill_in "Email", with: user.email
fill_in "Password", with: user.password
click_login_button
page.should be_logged_in_as user
expect(page).to be_logged_in_as user
end
describe "signing up" do
@@ -53,7 +53,7 @@ feature "Authentication", js: true do
fill_in "Email", with: "test@foo.com"
fill_in "Choose a password", with: "short"
click_signup_button
page.should have_content "too short"
expect(page).to have_content "too short"
end
scenario "Failing to sign up because email is already registered" do
@@ -94,16 +94,16 @@ feature "Authentication", js: true do
scenario "failing to reset password" do
fill_in "Your email", with: "notanemail@myemail.com"
click_reset_password_button
page.should have_content "Email address not found"
expect(page).to have_content "Email address not found"
end
scenario "resetting password" do
fill_in "Your email", with: user.email
expect do
click_reset_password_button
page.should have_reset_password
expect(page).to have_reset_password
end.to enqueue_job Delayed::PerformableMethod
Delayed::Job.last.payload_object.method_name.should == :send_reset_password_instructions_without_delay
expect(Delayed::Job.last.payload_object.method_name).to eq(:send_reset_password_instructions_without_delay)
end
end
end
@@ -117,7 +117,7 @@ feature "Authentication", js: true do
scenario "showing login" do
open_off_canvas
open_login_modal
page.should have_login_modal
expect(page).to have_login_modal
end
end
end
@@ -133,7 +133,7 @@ feature "Authentication", js: true do
scenario "Loggin by typing login/ redirects to /#/login" do
visit "/login"
uri = URI.parse(current_url)
(uri.path + "#" + uri.fragment).should == '/#/login'
expect(uri.path + "#" + uri.fragment).to eq('/#/login')
end
end
end

View File

@@ -49,14 +49,14 @@ feature '
toggle_filter 'Vegetables'
page.should_not have_content producer1.name
page.should have_content producer2.name
expect(page).not_to have_content producer1.name
expect(page).to have_content producer2.name
toggle_filter 'Vegetables'
toggle_filter 'Fruit'
page.should have_content producer1.name
page.should_not have_content producer2.name
expect(page).to have_content producer1.name
expect(page).not_to have_content producer2.name
end
describe "filtering by product property" do
@@ -65,23 +65,23 @@ feature '
toggle_filter 'Organic'
page.should have_content producer1.name
page.should_not have_content producer2.name
expect(page).to have_content producer1.name
expect(page).not_to have_content producer2.name
toggle_filter 'Organic'
toggle_filter 'Biodynamic'
page.should_not have_content producer1.name
page.should have_content producer2.name
expect(page).not_to have_content producer1.name
expect(page).to have_content producer2.name
end
end
it "shows all producers with expandable details" do
page.should have_content producer1.name
expect(page).to have_content producer1.name
expand_active_table_node producer1.name
# -- Taxons
page.should have_content 'Fruit'
expect(page).to have_content 'Fruit'
# -- Properties
expect(page).to have_content 'Organic' # Product property
@@ -89,7 +89,7 @@ feature '
end
it "doesn't show invisible producers" do
page.should_not have_content invisible_producer.name
expect(page).not_to have_content invisible_producer.name
end
it "links to places to buy produce" do

View File

@@ -58,7 +58,7 @@ feature "Registration", js: true do
# Filling in Contact Details
fill_in 'enterprise_contact', with: 'Saskia Munroe'
page.should have_field 'enterprise_email_address', with: user.email
expect(page).to have_field 'enterprise_email_address', with: user.email
fill_in 'enterprise_phone', with: '12 3456 7890'
click_button "Continue"
expect(page).to have_content 'Last step to add My Awesome Enterprise!'

View File

@@ -133,7 +133,7 @@ feature "full-page cart", js: true do
end
it "shows the total tax for the order, including product tax and tax on fees" do
page.should have_selector '.tax-total', text: '11.00' # 10 + 1
expect(page).to have_selector '.tax-total', text: '11.00' # 10 + 1
end
end

View File

@@ -37,7 +37,7 @@ feature "As a consumer I want to view products", js: true do
modal_should_be_open_for product
within(".reveal-modal") do
html.should include("<p><b>Formatted</b> product description.</p>")
expect(html).to include("<p><b>Formatted</b> product description.</p>")
end
end
@@ -53,8 +53,8 @@ feature "As a consumer I want to view products", js: true do
modal_should_be_open_for product
within(".reveal-modal") do
html.should include("<p>Safe</p>")
html.should_not include("<script>alert('Dangerous!');</script>")
expect(html).to include("<p>Safe</p>")
expect(html).not_to include("<script>alert('Dangerous!');</script>")
end
end
end

View File

@@ -26,9 +26,9 @@ feature "As a consumer I want to shop with a distributor", js: true do
# Then we should see the distributor and its logo
visit shop_path
page.should have_text distributor.name
expect(page).to have_text distributor.name
find("#tab_about a").click
first("distributor img")['src'].should include distributor.logo.url(:thumb)
expect(first("distributor img")['src']).to include distributor.logo.url(:thumb)
end
it "shows the producers for a distributor" do
@@ -37,7 +37,7 @@ feature "As a consumer I want to shop with a distributor", js: true do
visit shop_path
find("#tab_producers a").click
page.should have_content supplier.name
expect(page).to have_content supplier.name
end
describe "selecting an order cycle" do
@@ -46,7 +46,7 @@ feature "As a consumer I want to shop with a distributor", js: true do
it "selects an order cycle if only one is open" do
exchange1.update_attribute :pickup_time, "turtles"
visit shop_path
page.should have_selector "option[selected]", text: 'turtles'
expect(page).to have_selector "option[selected]", text: 'turtles'
end
describe "with multiple order cycles" do
@@ -59,9 +59,9 @@ feature "As a consumer I want to shop with a distributor", js: true do
it "shows a select with all order cycles, but doesn't show the products by default" do
visit shop_path
page.should have_selector "option", text: 'frogs'
page.should have_selector "option", text: 'turtles'
page.should_not have_selector("input.button.right", visible: true)
expect(page).to have_selector "option", text: 'frogs'
expect(page).to have_selector "option", text: 'turtles'
expect(page).not_to have_selector("input.button.right", visible: true)
end
it "shows products after selecting an order cycle" do
@@ -69,16 +69,16 @@ feature "As a consumer I want to shop with a distributor", js: true do
variant.update_attribute(:display_as, "rabbit")
add_variant_to_order_cycle(exchange1, variant)
visit shop_path
page.should_not have_content product.name
Spree::Order.last.order_cycle.should.nil?
expect(page).not_to have_content product.name
expect(Spree::Order.last.order_cycle).to be_nil
select "frogs", from: "order_cycle_id"
page.should have_selector "products"
page.should have_content "Next order closing in 2 days"
Spree::Order.last.order_cycle.should == oc1
page.should have_content product.name
page.should have_content variant.display_name
page.should have_content variant.display_as
expect(page).to have_selector "products"
expect(page).to have_content "Next order closing in 2 days"
expect(Spree::Order.last.order_cycle).to eq(oc1)
expect(page).to have_content product.name
expect(page).to have_content variant.display_name
expect(page).to have_content variant.display_as
open_product_modal product
modal_should_be_open_for product
@@ -94,26 +94,26 @@ feature "As a consumer I want to shop with a distributor", js: true do
# -- Selecting an order cycle
visit shop_path
select "turtles", from: "order_cycle_id"
page.should have_content with_currency(1020.99)
expect(page).to have_content with_currency(1020.99)
# -- Cart shows correct price
fill_in "variants[#{variant.id}]", with: 1
show_cart
within("li.cart") { page.should have_content with_currency(1020.99) }
within("li.cart") { expect(page).to have_content with_currency(1020.99) }
# -- Changing order cycle
accept_alert do
select "frogs", from: "order_cycle_id"
end
page.should have_content with_currency(19.99)
expect(page).to have_content with_currency(19.99)
# -- Cart should be cleared
# ng-animate means that the old product row is likely to be present, so we ensure
# that we are not filling in the quantity on the outgoing row
page.should_not have_selector "tr.product-cart"
expect(page).not_to have_selector "tr.product-cart"
within('product:not(.ng-leave)') { fill_in "variants[#{variant.id}]", with: 1 }
show_cart
within("li.cart") { page.should have_content with_currency(19.99) }
within("li.cart") { expect(page).to have_content with_currency(19.99) }
end
describe "declining to clear the cart" do
@@ -130,11 +130,11 @@ feature "As a consumer I want to shop with a distributor", js: true do
handle_js_confirm(false) do
select "frogs", from: "order_cycle_id"
show_cart
page.should have_selector "tr.product-cart"
page.should have_selector 'li.cart', text: '1'
expect(page).to have_selector "tr.product-cart"
expect(page).to have_selector 'li.cart', text: '1'
# The order cycle choice should not have changed
page.should have_select 'order_cycle_id', selected: 'turtles'
expect(page).to have_select 'order_cycle_id', selected: 'turtles'
end
end
end
@@ -192,15 +192,15 @@ feature "As a consumer I want to shop with a distributor", js: true do
visit shop_path
# Page should not have product.price (with or without fee)
page.should_not have_price with_currency(10.00)
page.should_not have_price with_currency(33.00)
expect(page).not_to have_price with_currency(10.00)
expect(page).not_to have_price with_currency(33.00)
# Page should have variant prices (with fee)
page.should have_price with_currency(43.00)
page.should have_price with_currency(53.00)
expect(page).to have_price with_currency(43.00)
expect(page).to have_price with_currency(53.00)
# Product price should be listed as the lesser of these
page.should have_price with_currency(43.00)
expect(page).to have_price with_currency(43.00)
end
it "filters search results properly" do
@@ -208,12 +208,12 @@ feature "As a consumer I want to shop with a distributor", js: true do
select "frogs", from: "order_cycle_id"
fill_in "search", with: "74576345634XXXXXX"
page.should have_content "Sorry, no results found"
page.should_not have_content product2.name
expect(page).to have_content "Sorry, no results found"
expect(page).not_to have_content product2.name
fill_in "search", with: "Meer" # For product named "Meercats"
page.should have_content product2.name
page.should_not have_content product.name
expect(page).to have_content product2.name
expect(page).not_to have_content product.name
fill_in "search", with: "Dome" # For product with meta_keywords "Domestic"
expect(page).to have_content product.name
@@ -227,10 +227,10 @@ feature "As a consumer I want to shop with a distributor", js: true do
fill_in "search", with: "Badg" # For variant with display_name "Badgers"
within('div.pad-top') do
page.should have_content product.name
page.should have_content variant2.display_name
page.should_not have_content product2.name
page.should_not have_content variant3.display_name
expect(page).to have_content product.name
expect(page).to have_content variant2.display_name
expect(page).not_to have_content product2.name
expect(page).not_to have_content variant3.display_name
end
end
end
@@ -252,23 +252,23 @@ feature "As a consumer I want to shop with a distributor", js: true do
it "should save group buy data to the cart and display it on shopfront reload" do
# -- Quantity
fill_in "variants[#{variant.id}]", with: 6
page.should have_in_cart product.name
expect(page).to have_in_cart product.name
wait_until { !cart_dirty }
li = Spree::Order.order(:created_at).last.line_items.order(:created_at).last
li.quantity.should == 6
expect(li.quantity).to eq(6)
# -- Max quantity
fill_in "variant_attributes[#{variant.id}][max_quantity]", with: 7
wait_until { !cart_dirty }
li = Spree::Order.order(:created_at).last.line_items.order(:created_at).last
li.max_quantity.should == 7
expect(li.max_quantity).to eq(7)
# -- Reload
visit shop_path
page.should have_field "variants[#{variant.id}]", with: 6
page.should have_field "variant_attributes[#{variant.id}][max_quantity]", with: 7
expect(page).to have_field "variants[#{variant.id}]", with: 6
expect(page).to have_field "variant_attributes[#{variant.id}][max_quantity]", with: 7
end
end
end
@@ -288,16 +288,16 @@ feature "As a consumer I want to shop with a distributor", js: true do
it "lets us add and remove products from our cart" do
fill_in "variants[#{variant.id}]", with: '1'
page.should have_in_cart product.name
expect(page).to have_in_cart product.name
wait_until { !cart_dirty }
li = Spree::Order.order(:created_at).last.line_items.order(:created_at).last
li.quantity.should == 1
expect(li.quantity).to eq(1)
fill_in "variants[#{variant.id}]", with: '0'
within('li.cart') { page.should_not have_content product.name }
within('li.cart') { expect(page).not_to have_content product.name }
wait_until { !cart_dirty }
Spree::LineItem.where(id: li).should be_empty
expect(Spree::LineItem.where(id: li)).to be_empty
end
it "lets us add a quantity greater than on_hand value if product is on_demand" do
@@ -306,7 +306,7 @@ feature "As a consumer I want to shop with a distributor", js: true do
fill_in "variants[#{variant.id}]", with: '10'
page.should have_field "variants[#{variant.id}]", with: '10'
expect(page).to have_field "variants[#{variant.id}]", with: '10'
end
it "alerts us when we enter a quantity greater than the stock available" do
@@ -317,7 +317,7 @@ feature "As a consumer I want to shop with a distributor", js: true do
fill_in "variants[#{variant.id}]", with: '10'
end
page.should have_field "variants[#{variant.id}]", with: '5'
expect(page).to have_field "variants[#{variant.id}]", with: '5'
end
describe "when a product goes out of stock just before it's added to the cart" do
@@ -332,20 +332,20 @@ feature "As a consumer I want to shop with a distributor", js: true do
wait_until { !cart_dirty }
within(".out-of-stock-modal") do
page.should have_content "stock levels for one or more of the products in your cart have reduced"
page.should have_content "#{product.name} - #{variant.unit_to_display} is now out of stock."
expect(page).to have_content "stock levels for one or more of the products in your cart have reduced"
expect(page).to have_content "#{product.name} - #{variant.unit_to_display} is now out of stock."
end
# -- Page updates
# Update amount in cart
page.should have_field "variants[#{variant.id}]", with: '0', disabled: true
page.should have_field "variants[#{variant2.id}]", with: ''
expect(page).to have_field "variants[#{variant.id}]", with: '0', disabled: true
expect(page).to have_field "variants[#{variant2.id}]", with: ''
# Update amount available in product list
# If amount falls to zero, variant should be greyed out and input disabled
page.should have_selector "#variant-#{variant.id}.out-of-stock"
page.should have_selector "#variants_#{variant.id}[ofn-on-hand='0']"
page.should have_selector "#variants_#{variant.id}[disabled='disabled']"
expect(page).to have_selector "#variant-#{variant.id}.out-of-stock"
expect(page).to have_selector "#variants_#{variant.id}[ofn-on-hand='0']"
expect(page).to have_selector "#variants_#{variant.id}[disabled='disabled']"
end
it 'does not show out of stock modal if product is on_demand' do
@@ -374,18 +374,18 @@ feature "As a consumer I want to shop with a distributor", js: true do
wait_until { !cart_dirty }
within(".out-of-stock-modal") do
page.should have_content "stock levels for one or more of the products in your cart have reduced"
page.should have_content "#{product.name} - #{variant.unit_to_display} is now out of stock."
expect(page).to have_content "stock levels for one or more of the products in your cart have reduced"
expect(page).to have_content "#{product.name} - #{variant.unit_to_display} is now out of stock."
end
# -- Page updates
# Update amount in cart
page.should have_field "variant_attributes[#{variant.id}][max_quantity]", with: '0', disabled: true
expect(page).to have_field "variant_attributes[#{variant.id}][max_quantity]", with: '0', disabled: true
# Update amount available in product list
# If amount falls to zero, variant should be greyed out and input disabled
page.should have_selector "#variant-#{variant.id}.out-of-stock"
page.should have_selector "#variants_#{variant.id}_max[disabled='disabled']"
expect(page).to have_selector "#variant-#{variant.id}.out-of-stock"
expect(page).to have_selector "#variants_#{variant.id}_max[disabled='disabled']"
end
end
@@ -400,8 +400,8 @@ feature "As a consumer I want to shop with a distributor", js: true do
wait_until { !cart_dirty }
within(".out-of-stock-modal") do
page.should have_content "stock levels for one or more of the products in your cart have reduced"
page.should have_content "#{product.name} - #{variant.unit_to_display} now only has 1 remaining"
expect(page).to have_content "stock levels for one or more of the products in your cart have reduced"
expect(page).to have_content "#{product.name} - #{variant.unit_to_display} now only has 1 remaining"
end
end
@@ -418,12 +418,12 @@ feature "As a consumer I want to shop with a distributor", js: true do
wait_until { !cart_dirty }
within(".out-of-stock-modal") do
page.should have_content "stock levels for one or more of the products in your cart have reduced"
page.should have_content "#{product.name} - #{variant.unit_to_display} now only has 1 remaining"
expect(page).to have_content "stock levels for one or more of the products in your cart have reduced"
expect(page).to have_content "#{product.name} - #{variant.unit_to_display} now only has 1 remaining"
end
page.should have_field "variants[#{variant.id}]", with: '1'
page.should have_field "variant_attributes[#{variant.id}][max_quantity]", with: '3'
expect(page).to have_field "variants[#{variant.id}]", with: '1'
expect(page).to have_field "variant_attributes[#{variant.id}][max_quantity]", with: '3'
end
end
end
@@ -433,17 +433,17 @@ feature "As a consumer I want to shop with a distributor", js: true do
context "when no order cycles are available" do
it "tells us orders are closed" do
visit shop_path
page.should have_content "Orders are closed"
expect(page).to have_content "Orders are closed"
end
it "shows the last order cycle" do
oc1 = create(:simple_order_cycle, distributors: [distributor], orders_open_at: 17.days.ago, orders_close_at: 10.days.ago)
visit shop_path
page.should have_content "The last cycle closed 10 days ago"
expect(page).to have_content "The last cycle closed 10 days ago"
end
it "shows the next order cycle" do
oc1 = create(:simple_order_cycle, distributors: [distributor], orders_open_at: 10.days.from_now, orders_close_at: 17.days.from_now)
visit shop_path
page.should have_content "The next cycle opens in 10 days"
expect(page).to have_content "The next cycle opens in 10 days"
end
end

View File

@@ -43,26 +43,26 @@ feature "shopping with variant overrides defined", js: true do
describe "viewing products" do
it "shows price and stock from the override" do
page.should have_price with_currency(61.11) # product1_variant1_override.price ($55.55) + 10% fee
page.should_not have_price with_currency(12.22) # product1_variant1.price ($11.11) + 10% fee
expect(page).to have_price with_currency(61.11) # product1_variant1_override.price ($55.55) + 10% fee
expect(page).not_to have_price with_currency(12.22) # product1_variant1.price ($11.11) + 10% fee
# Product should appear but one of the variants is out of stock
page.should_not have_content product1_variant2.options_text
expect(page).not_to have_content product1_variant2.options_text
# Entire product should not appear - no stock
page.should_not have_content product2.name
page.should_not have_content product2_variant1.options_text
expect(page).not_to have_content product2.name
expect(page).not_to have_content product2_variant1.options_text
# On-demand product with VO of no stock should NOT appear
page.should_not have_content product3_variant1.options_text
expect(page).not_to have_content product3_variant1.options_text
end
it "calculates fees correctly" do
page.find("#variant-#{product1_variant1.id} .graph-button").click
page.find(".price_breakdown a").click
page.should have_selector 'li.cost div', text: with_currency(55.55)
page.should have_selector 'li.packing-fee div', text: with_currency(5.56)
page.should have_selector 'li.total div', text: "= #{with_currency(61.11)}"
expect(page).to have_selector 'li.cost div', text: with_currency(55.55)
expect(page).to have_selector 'li.packing-fee div', text: with_currency(5.56)
expect(page).to have_selector 'li.total div', text: "= #{with_currency(61.11)}"
end
it "shows the correct prices when products are in the cart" do
@@ -70,7 +70,7 @@ feature "shopping with variant overrides defined", js: true do
show_cart
wait_until_enabled 'li.cart a.button'
visit shop_path
page.should have_price with_currency(61.11)
expect(page).to have_price with_currency(61.11)
end
# The two specs below reveal an unrelated issue with fee calculation. See:
@@ -79,30 +79,30 @@ feature "shopping with variant overrides defined", js: true do
it "shows the overridden price with fees in the quick cart" do
fill_in "variants[#{product1_variant1.id}]", with: "2"
show_cart
page.should have_selector "#cart-variant-#{product1_variant1.id} .quantity", text: '2'
page.should have_selector "#cart-variant-#{product1_variant1.id} .price", text: with_currency(61.11)
page.should have_selector "#cart-variant-#{product1_variant1.id} .total-price", text: with_currency(122.22)
expect(page).to have_selector "#cart-variant-#{product1_variant1.id} .quantity", text: '2'
expect(page).to have_selector "#cart-variant-#{product1_variant1.id} .price", text: with_currency(61.11)
expect(page).to have_selector "#cart-variant-#{product1_variant1.id} .total-price", text: with_currency(122.22)
end
it "shows the correct prices in the shopping cart" do
fill_in "variants[#{product1_variant1.id}]", with: "2"
add_to_cart
page.should have_selector "tr.line-item.variant-#{product1_variant1.id} .cart-item-price", text: with_currency(61.11)
page.should have_field "order[line_items_attributes][0][quantity]", with: '2'
page.should have_selector "tr.line-item.variant-#{product1_variant1.id} .cart-item-total", text: with_currency(122.22)
expect(page).to have_selector "tr.line-item.variant-#{product1_variant1.id} .cart-item-price", text: with_currency(61.11)
expect(page).to have_field "order[line_items_attributes][0][quantity]", with: '2'
expect(page).to have_selector "tr.line-item.variant-#{product1_variant1.id} .cart-item-total", text: with_currency(122.22)
page.should have_selector "#edit-cart .item-total", text: with_currency(122.22)
page.should have_selector "#edit-cart .grand-total", text: with_currency(122.22)
expect(page).to have_selector "#edit-cart .item-total", text: with_currency(122.22)
expect(page).to have_selector "#edit-cart .grand-total", text: with_currency(122.22)
end
it "shows the correct prices in the checkout" do
fill_in "variants[#{product1_variant1.id}]", with: "2"
click_checkout
page.should have_selector 'form.edit_order .cart-total', text: with_currency(122.22)
page.should have_selector 'form.edit_order .shipping', text: with_currency(0.00)
page.should have_selector 'form.edit_order .total', text: with_currency(122.22)
expect(page).to have_selector 'form.edit_order .cart-total', text: with_currency(122.22)
expect(page).to have_selector 'form.edit_order .shipping', text: with_currency(0.00)
expect(page).to have_selector 'form.edit_order .total', text: with_currency(122.22)
end
end
@@ -114,8 +114,8 @@ feature "shopping with variant overrides defined", js: true do
complete_checkout
o = Spree::Order.complete.last
o.line_items.first.price.should == 55.55
o.total.should == 122.22
expect(o.line_items.first.price).to eq(55.55)
expect(o.total).to eq(122.22)
end
it "subtracts stock from the override" do
@@ -146,7 +146,7 @@ feature "shopping with variant overrides defined", js: true do
expect do
complete_checkout
end.to change { product1_variant1.reload.on_hand }.by(-2)
product1_variant1_override.reload.count_on_hand.should be_nil
expect(product1_variant1_override.reload.count_on_hand).to be_nil
end
it "does not subtract stock from variants where the override has on_demand: true" do
@@ -165,7 +165,7 @@ feature "shopping with variant overrides defined", js: true do
complete_checkout
page.should_not have_content "Out of Stock"
expect(page).not_to have_content "Out of Stock"
end
end

View File

@@ -45,33 +45,14 @@ describe VariantStock do
end
describe '#on_hand=' do
context 'when track_inventory_levels is set' do
before do
allow(Spree::Config)
.to receive(:track_inventory_levels) { true }
end
it 'sets the new level as the stock item\'s count_on_hand' do
variant.on_hand = 3
unique_stock_item = variant.stock_items.first
expect(unique_stock_item.count_on_hand).to eq(3)
end
context 'when the variant has no stock item' do
let(:variant) { build(:variant) }
it 'raises' do
expect { variant.on_hand = 3 }
.to raise_error(StandardError)
end
end
it 'sets the new level as the stock item\'s count_on_hand' do
variant.on_hand = 3
unique_stock_item = variant.stock_items.first
expect(unique_stock_item.count_on_hand).to eq(3)
end
context 'when track_inventory_levels is not set' do
before do
allow(Spree::Config)
.to receive(:track_inventory_levels) { false }
end
context 'when the variant has no stock item' do
let(:variant) { build(:variant) }
it 'raises' do
expect { variant.on_hand = 3 }

View File

@@ -494,11 +494,11 @@ describe Enterprise do
end
it "gets all taxons of all distributed products in open order cycles" do
Spree::Product.stub(:in_distributor).and_return [product1, product2, product3]
allow(Spree::Product).to receive(:in_distributor).and_return [product1, product2, product3]
ex.variants << product1.variants.first
ex.variants << product3.variants.first
distributor.current_distributed_taxons.should match_array [taxon1, taxon3]
expect(distributor.current_distributed_taxons).to match_array [taxon1, taxon3]
end
it "gets all taxons of all supplied products" do

View File

@@ -6,8 +6,8 @@ describe ShopController, type: :controller, performance: true do
let(:order_cycle) { create(:simple_order_cycle, distributors: [d], coordinator_fees: [enterprise_fee]) }
before do
controller.stub(:current_distributor) { d }
controller.stub(:current_order_cycle) { order_cycle }
allow(controller).to receive(:current_distributor) { d }
allow(controller).to receive(:current_order_cycle) { order_cycle }
Spree::Config.currency = 'AUD'
end
@@ -36,7 +36,7 @@ describe ShopController, type: :controller, performance: true do
it "returns products via json" do
results = multi_benchmark(3, cache_key_patterns: cache_key_patterns) do
xhr :get, :products
response.should be_success
expect(response).to be_success
end
end
end

View File

@@ -1,4 +1,6 @@
describe Api::Admin::ForOrderCycle::EnterpriseSerializer do
require "spec_helper"
describe Api::Admin::ForOrderCycle::SuppliedProductSerializer do
let(:coordinator) { create(:distributor_enterprise) }
let(:order_cycle) { double(:order_cycle, coordinator: coordinator) }
let!(:product) { create(:simple_product) }

View File

@@ -0,0 +1,25 @@
require 'spec_helper'
module Api
module Admin
describe SubscriptionLineItemSerializer do
let(:subscription_line_item) { create(:subscription_line_item) }
it "serializes a subscription line item with the product name" do
serializer = described_class.new(subscription_line_item)
expect(serializer.to_json).to match subscription_line_item.variant.product.name
end
context "when the variant of the subscription line item is soft deleted" do
it "serializers the subscription line item with the product name" do
subscription_line_item.variant.update_attribute :deleted_at, Time.zone.now
serializer = described_class.new(subscription_line_item.reload)
expect(serializer.to_json).to match subscription_line_item.variant.product.name
end
end
end
end
end

View File

@@ -59,5 +59,16 @@ describe EmbeddedPageService do
expect(response.headers['X-Frame-Options']).to eq 'DENY'
end
end
context "when the request's referer is malformed" do
let(:request) { ActionController::TestRequest.new('HTTP_HOST' => 'ofn-instance.com', 'HTTP_REFERER' => 'hello')}
before do
service.embed!
end
it "returns a 200 status" do
expect(response.status).to eq 200
end
end
end
end

View File

@@ -91,6 +91,11 @@ RSpec.configure do |config|
# Retry
config.verbose_retry = true
# Force use of expect (over should)
config.expect_with :rspec do |expectations|
expectations.syntax = :expect
end
# DatabaseCleaner
config.before(:suite) { DatabaseCleaner.clean_with :deletion, except: ['spree_countries', 'spree_states'] }
config.before(:each) { DatabaseCleaner.strategy = :transaction }