solidus_backend 1.1.4 → 1.2.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of solidus_backend might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/images/solidus-style-guide-logo.png +0 -0
- data/app/assets/javascripts/spree/backend/admin.js.erb +1 -7
- data/app/assets/javascripts/spree/backend/checkouts/edit.js +2 -2
- data/app/assets/javascripts/spree/backend/navigation.coffee +10 -0
- data/app/assets/javascripts/spree/backend/option_type_autocomplete.js.erb +6 -6
- data/app/assets/javascripts/spree/backend/option_value_picker.js +6 -6
- data/app/assets/javascripts/spree/backend/product_picker.js +6 -6
- data/app/assets/javascripts/spree/backend/shipments.js.erb +17 -3
- data/app/assets/javascripts/spree/backend/stock_movement.js.coffee +2 -2
- data/app/assets/javascripts/spree/backend/style_guide.coffee +2 -0
- data/app/assets/javascripts/spree/backend/taxon_autocomplete.js.erb +6 -6
- data/app/assets/javascripts/spree/backend/taxonomy.js.coffee +82 -109
- data/app/assets/javascripts/spree/backend/taxons.js.coffee +4 -5
- data/app/assets/javascripts/spree/backend/user_picker.js +8 -8
- data/app/assets/javascripts/spree/backend/variant_autocomplete.js.coffee.erb +3 -3
- data/app/assets/javascripts/spree/backend.js +3 -6
- data/app/assets/stylesheets/spree/backend/components/_messages.scss +1 -4
- data/app/assets/stylesheets/spree/backend/components/_navigation.scss +99 -115
- data/app/assets/stylesheets/spree/backend/components/_progress.scss +1 -1
- data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +6 -0
- data/app/assets/stylesheets/spree/backend/globals/_variables.scss +18 -0
- data/app/assets/stylesheets/spree/backend/globals/mixins/_caret.scss +35 -0
- data/app/assets/stylesheets/spree/backend/plugins/_powertip.scss +1 -0
- data/app/assets/stylesheets/spree/backend/sections/_style_guide.scss +132 -0
- data/app/assets/stylesheets/spree/backend/sections/_taxonomies.scss +60 -0
- data/app/assets/stylesheets/spree/backend/shared/_forms.scss +2 -0
- data/app/assets/stylesheets/spree/backend/shared/_layout.scss +36 -4
- data/app/assets/stylesheets/spree/backend/shared/_typography.scss +3 -6
- data/app/assets/stylesheets/spree/backend/spree_admin.scss +4 -1
- data/app/assets/stylesheets/spree/backend.css +1 -1
- data/app/controllers/spree/admin/orders_controller.rb +6 -6
- data/app/controllers/spree/admin/payment_methods_controller.rb +1 -1
- data/app/controllers/spree/admin/payments_controller.rb +1 -1
- data/app/controllers/spree/admin/products_controller.rb +0 -1
- data/app/controllers/spree/admin/reports_controller.rb +2 -2
- data/app/controllers/spree/admin/search_controller.rb +9 -7
- data/app/controllers/spree/admin/stock_transfers_controller.rb +6 -14
- data/app/controllers/spree/admin/style_guide_controller.rb +33 -0
- data/app/helpers/spree/admin/adjustments_helper.rb +2 -6
- data/app/helpers/spree/admin/base_helper.rb +7 -6
- data/app/helpers/spree/admin/navigation_helper.rb +12 -5
- data/app/helpers/spree/admin/orders_helper.rb +1 -1
- data/app/helpers/spree/admin/products_helper.rb +2 -4
- data/app/helpers/spree/admin/stock_movements_helper.rb +3 -3
- data/app/views/spree/admin/adjustments/_adjustments_table.html.erb +2 -2
- data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/_return_item_selection.html.erb +1 -1
- data/app/views/spree/admin/customer_returns/edit.html.erb +1 -1
- data/app/views/spree/admin/images/edit.html.erb +1 -3
- data/app/views/spree/admin/images/index.html.erb +0 -2
- data/app/views/spree/admin/option_types/edit.html.erb +2 -4
- data/app/views/spree/admin/option_types/index.html.erb +0 -2
- data/app/views/spree/admin/option_types/new.html.erb +0 -2
- data/app/views/spree/admin/orders/_shipment_manifest.html.erb +1 -1
- data/app/views/spree/admin/orders/index.html.erb +1 -1
- data/app/views/spree/admin/product_properties/index.html.erb +0 -1
- data/app/views/spree/admin/products/edit.html.erb +0 -2
- data/app/views/spree/admin/products/index.html.erb +2 -4
- data/app/views/spree/admin/products/new.html.erb +0 -2
- data/app/views/spree/admin/promotion_categories/edit.html.erb +0 -2
- data/app/views/spree/admin/promotion_categories/index.html.erb +0 -2
- data/app/views/spree/admin/promotion_categories/new.html.erb +0 -2
- data/app/views/spree/admin/promotions/actions/_create_adjustment.html.erb +2 -28
- data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +2 -26
- data/app/views/spree/admin/promotions/actions/_promotion_calculators_with_custom_fields.html.erb +28 -0
- data/app/views/spree/admin/promotions/edit.html.erb +0 -2
- data/app/views/spree/admin/promotions/index.html.erb +0 -2
- data/app/views/spree/admin/promotions/new.html.erb +0 -2
- data/app/views/spree/admin/properties/edit.html.erb +0 -2
- data/app/views/spree/admin/properties/index.html.erb +2 -4
- data/app/views/spree/admin/properties/new.html.erb +0 -2
- data/app/views/spree/admin/properties/new.js.erb +1 -1
- data/app/views/spree/admin/prototypes/edit.html.erb +0 -2
- data/app/views/spree/admin/prototypes/index.html.erb +0 -2
- data/app/views/spree/admin/prototypes/new.html.erb +0 -2
- data/app/views/spree/admin/reimbursements/edit.html.erb +2 -2
- data/app/views/spree/admin/reimbursements/show.html.erb +9 -9
- data/app/views/spree/admin/return_authorizations/_form.html.erb +16 -16
- data/app/views/spree/admin/search/users.rabl +1 -1
- data/app/views/spree/admin/shared/_head.html.erb +11 -0
- data/app/views/spree/admin/shared/_header.html.erb +4 -8
- data/app/views/spree/admin/shared/_menu.html.erb +4 -8
- data/app/views/spree/admin/shared/_navigation.html.erb +9 -0
- data/app/views/spree/admin/shared/_navigation_footer.html.erb +3 -0
- data/app/views/spree/admin/shared/_product_sub_menu.html.erb +20 -22
- data/app/views/spree/admin/shared/_promotion_sub_menu.html.erb +8 -10
- data/app/views/spree/admin/shared/_stock_sub_menu.html.erb +8 -10
- data/app/views/spree/admin/shared/_tabs.html.erb +9 -3
- data/app/views/spree/admin/shipping_methods/_form.html.erb +2 -2
- data/app/views/spree/admin/stock_items/index.html.erb +1 -2
- data/app/views/spree/admin/stock_transfers/edit.html.erb +0 -1
- data/app/views/spree/admin/stock_transfers/index.html.erb +0 -3
- data/app/views/spree/admin/stock_transfers/new.html.erb +0 -2
- data/app/views/spree/admin/stock_transfers/receive.html.erb +0 -2
- data/app/views/spree/admin/stock_transfers/show.html.erb +0 -2
- data/app/views/spree/admin/stock_transfers/tracking_info.html.erb +0 -2
- data/app/views/spree/admin/style_guide/index.html.erb +5 -0
- data/app/views/spree/admin/style_guide/topics/forms/_building_forms.html.erb +79 -0
- data/app/views/spree/admin/style_guide/topics/forms/_validation.html.erb +14 -0
- data/app/views/spree/admin/style_guide/topics/messaging/_flashes.html.erb +13 -0
- data/app/views/spree/admin/style_guide/topics/messaging/_loading.html.erb +20 -0
- data/app/views/spree/admin/style_guide/topics/messaging/_tooltips.html.erb +16 -0
- data/app/views/spree/admin/style_guide/topics/tables/_building_tables.html.erb +44 -0
- data/app/views/spree/admin/style_guide/topics/tables/_pagination.html.erb +11 -0
- data/app/views/spree/admin/style_guide/topics/typography/_colors.html.erb +64 -0
- data/app/views/spree/admin/style_guide/topics/typography/_fonts.html.erb +19 -0
- data/app/views/spree/admin/style_guide/topics/typography/_icons.html.erb +13 -0
- data/app/views/spree/admin/style_guide/topics/typography/_lists.html.erb +25 -0
- data/app/views/spree/admin/style_guide/topics/typography/_tags.html.erb +25 -0
- data/app/views/spree/admin/taxonomies/_js_head.html.erb +0 -0
- data/app/views/spree/admin/taxonomies/edit.erb +5 -6
- data/app/views/spree/admin/taxonomies/index.html.erb +0 -2
- data/app/views/spree/admin/taxonomies/new.html.erb +0 -2
- data/app/views/spree/admin/taxons/_form.html.erb +1 -1
- data/app/views/spree/admin/taxons/_list_template.html.erb +17 -0
- data/app/views/spree/admin/taxons/index.html.erb +0 -3
- data/app/views/spree/admin/users/orders.html.erb +1 -1
- data/app/views/spree/admin/variants/edit.html.erb +0 -2
- data/app/views/spree/admin/variants/index.html.erb +0 -2
- data/app/views/spree/layouts/admin.html.erb +3 -4
- data/app/views/spree/layouts/admin_style_guide.html.erb +58 -0
- data/config/routes.rb +4 -2
- data/lib/spree/backend/engine.rb +0 -1
- data/lib/spree/backend.rb +0 -3
- data/solidus_backend.gemspec +5 -7
- data/spec/controllers/spree/admin/missing_products_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/orders_controller_spec.rb +14 -14
- data/spec/controllers/spree/admin/payment_methods_controller_spec.rb +2 -4
- data/spec/controllers/spree/admin/payments_controller_spec.rb +2 -2
- data/spec/controllers/spree/admin/products_controller_spec.rb +3 -3
- data/spec/controllers/spree/admin/reports_controller_spec.rb +4 -4
- data/spec/controllers/spree/admin/return_authorizations_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/shipping_methods_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/stock_locations_controller_spec.rb +1 -1
- data/spec/controllers/spree/admin/stock_transfers_controller_spec.rb +13 -11
- data/spec/features/admin/configuration/general_settings_spec.rb +10 -7
- data/spec/features/admin/configuration/payment_methods_spec.rb +1 -1
- data/spec/features/admin/configuration/shipping_methods_spec.rb +1 -1
- data/spec/features/admin/configuration/states_spec.rb +1 -1
- data/spec/features/admin/configuration/tax_rates_spec.rb +6 -7
- data/spec/features/admin/configuration/taxonomies_spec.rb +3 -3
- data/spec/features/admin/homepage_spec.rb +6 -6
- data/spec/features/admin/orders/cancelling_and_resuming_spec.rb +4 -8
- data/spec/features/admin/orders/customer_details_spec.rb +9 -8
- data/spec/features/admin/orders/line_items_spec.rb +1 -1
- data/spec/features/admin/orders/listing_spec.rb +2 -2
- data/spec/features/admin/orders/log_entries_spec.rb +3 -3
- data/spec/features/admin/orders/new_order_spec.rb +3 -15
- data/spec/features/admin/orders/order_details_spec.rb +17 -20
- data/spec/features/admin/orders/payments_spec.rb +10 -10
- data/spec/features/admin/orders/shipments_spec.rb +2 -2
- data/spec/features/admin/products/edit/images_spec.rb +5 -3
- data/spec/features/admin/products/edit/products_spec.rb +11 -11
- data/spec/features/admin/products/edit/taxons_spec.rb +14 -38
- data/spec/features/admin/products/edit/variants_spec.rb +3 -3
- data/spec/features/admin/products/option_types_spec.rb +22 -21
- data/spec/features/admin/products/products_spec.rb +15 -12
- data/spec/features/admin/products/properties_spec.rb +3 -3
- data/spec/features/admin/products/prototypes_spec.rb +4 -4
- data/spec/features/admin/products/stock_management_spec.rb +5 -5
- data/spec/features/admin/products/variant_spec.rb +8 -8
- data/spec/features/admin/promotion_adjustments_spec.rb +6 -13
- data/spec/features/admin/promotions/option_value_rule_spec.rb +0 -20
- data/spec/features/admin/reports_spec.rb +2 -2
- data/spec/features/admin/stock_transfer_spec.rb +3 -3
- data/spec/features/admin/store_credits_spec.rb +2 -2
- data/spec/features/admin/users_spec.rb +6 -6
- data/spec/helpers/admin/navigation_helper_spec.rb +5 -0
- data/spec/helpers/admin/reimbursements_helper_spec.rb +1 -1
- data/spec/helpers/admin/store_credit_events_helper_spec.rb +1 -1
- data/spec/spec_helper.rb +3 -1
- data/spec/support/feature/base_feature_helper.rb +10 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_0_eeeeee_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_55_ffffff_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_100_f6f6f6_1x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_25_0073ea_1x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-bg_highlight-soft_50_dddddd_1x100.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_0073ea_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_454545_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_666666_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_ff0084_256x240.png +0 -0
- data/vendor/assets/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
- data/vendor/assets/javascripts/jquery.powertip.js +792 -423
- data/vendor/assets/javascripts/jquery.sticky-kit.min.js +10 -0
- data/vendor/assets/javascripts/prism.js +7 -0
- data/vendor/assets/stylesheets/prism.css +139 -0
- metadata +44 -51
- data/app/assets/stylesheets/spree/backend/plugins/_jstree.scss +0 -135
- data/app/views/spree/admin/shared/_sub_menu.html.erb +0 -9
- data/spec/features/admin/promotions/user_rule_spec.rb +0 -25
- data/vendor/assets/javascripts/equalize.js +0 -41
- data/vendor/assets/javascripts/jquery.jstree/jquery.jstree.js +0 -4540
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/bg.jpg +0 -0
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/d.png +0 -0
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/dot_for_ie.gif +0 -0
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/style.scss +0 -61
- data/vendor/assets/javascripts/jquery.jstree/themes/apple/throbber.gif +0 -0
- data/vendor/assets/javascripts/jquery.vAlign.js +0 -11
- data/vendor/assets/javascripts/modernizr.js +0 -4
- data/vendor/assets/javascripts/responsive-tables.js +0 -42
- data/vendor/assets/stylesheets/responsive-tables.css +0 -21
@@ -36,26 +36,6 @@ feature 'Promotion with option value rule' do
|
|
36
36
|
expect(first_rule.preferred_eligible_values).to eq Hash[product.id => [option_value.id]]
|
37
37
|
end
|
38
38
|
|
39
|
-
context "with an attempted XSS" do
|
40
|
-
let(:xss_string) { %(<script>throw("XSS")</script>) }
|
41
|
-
before do
|
42
|
-
option_value.update!(name: xss_string)
|
43
|
-
end
|
44
|
-
scenario "adding an option value rule", js: true do
|
45
|
-
select2 "Option Value(s)", from: "Add rule of type"
|
46
|
-
within("#rules_container") { click_button "Add" }
|
47
|
-
|
48
|
-
within("#rules_container .promotion-block") do
|
49
|
-
click_button "Add"
|
50
|
-
end
|
51
|
-
|
52
|
-
within('.promo-rule-option-value') do
|
53
|
-
targetted_select2_search product.name, from: '.js-promo-rule-option-value-product-select'
|
54
|
-
targetted_select2_search option_value.name, from: '.js-promo-rule-option-value-option-values-select'
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
|
59
39
|
context "with an existing option value rule" do
|
60
40
|
given(:variant1) { create :variant }
|
61
41
|
given(:variant2) { create :variant }
|
@@ -20,12 +20,12 @@ describe "Reports", :type => :feature do
|
|
20
20
|
before do
|
21
21
|
order = create(:order)
|
22
22
|
order.update_columns({:adjustment_total => 100})
|
23
|
-
order.completed_at = Time.
|
23
|
+
order.completed_at = Time.current
|
24
24
|
order.save!
|
25
25
|
|
26
26
|
order = create(:order)
|
27
27
|
order.update_columns({:adjustment_total => 200})
|
28
|
-
order.completed_at = Time.
|
28
|
+
order.completed_at = Time.current
|
29
29
|
order.save!
|
30
30
|
|
31
31
|
#incomplete order
|
@@ -20,7 +20,7 @@ describe 'Stock Transfers', :type => :feature, :js => true do
|
|
20
20
|
fill_in 'stock_transfer_description', with: description
|
21
21
|
click_button 'Continue'
|
22
22
|
|
23
|
-
expect(page.
|
23
|
+
expect(page).to have_field('stock_transfer_description', with: description)
|
24
24
|
|
25
25
|
select "NY", from: 'stock_transfer[destination_location_id]'
|
26
26
|
within "form.edit_stock_transfer" do
|
@@ -77,7 +77,7 @@ describe 'Stock Transfers', :type => :feature, :js => true do
|
|
77
77
|
visit spree.tracking_info_admin_stock_transfer_path(stock_transfer)
|
78
78
|
click_link 'ship'
|
79
79
|
|
80
|
-
|
80
|
+
find('#confirm-ship-link', visible: false).click
|
81
81
|
expect(current_path).to eq spree.admin_stock_transfers_path
|
82
82
|
expect(stock_transfer.reload.shipped_at).to_not be_nil
|
83
83
|
end
|
@@ -95,7 +95,7 @@ describe 'Stock Transfers', :type => :feature, :js => true do
|
|
95
95
|
|
96
96
|
click_link 'ship'
|
97
97
|
|
98
|
-
|
98
|
+
find('#confirm-ship-link', visible: false).click
|
99
99
|
expect(current_path).to eq spree.tracking_info_admin_stock_transfer_path(stock_transfer)
|
100
100
|
expect(stock_transfer.reload.shipped_at).to be_nil
|
101
101
|
end
|
@@ -24,7 +24,7 @@ describe "Store credits admin" do
|
|
24
24
|
expect(page.current_path).to eq spree.admin_user_store_credits_path(store_credit.user)
|
25
25
|
|
26
26
|
store_credit_table = page.find(".twelve.columns > table")
|
27
|
-
expect(store_credit_table.
|
27
|
+
expect(store_credit_table).to have_css('tr', count: 1)
|
28
28
|
expect(store_credit_table).to have_content(Spree::Money.new(store_credit.amount).to_s)
|
29
29
|
expect(store_credit_table).to have_content(Spree::Money.new(store_credit.amount_used).to_s)
|
30
30
|
expect(store_credit_table).to have_content(store_credit.category_name)
|
@@ -49,7 +49,7 @@ describe "Store credits admin" do
|
|
49
49
|
|
50
50
|
expect(page.current_path).to eq spree.admin_user_store_credits_path(store_credit.user)
|
51
51
|
store_credit_table = page.find(".twelve.columns > table")
|
52
|
-
expect(store_credit_table.
|
52
|
+
expect(store_credit_table).to have_css('tr', count: 2)
|
53
53
|
expect(Spree::StoreCredit.count).to eq 2
|
54
54
|
end
|
55
55
|
end
|
@@ -3,8 +3,8 @@ require 'spec_helper'
|
|
3
3
|
describe 'Users', :type => :feature do
|
4
4
|
stub_authorization!
|
5
5
|
let!(:country) { create(:country) }
|
6
|
-
let!(:user_a) { create(:
|
7
|
-
let!(:user_b) { create(:
|
6
|
+
let!(:user_a) { create(:user_with_addresses, email: 'a@example.com') }
|
7
|
+
let!(:user_b) { create(:user_with_addresses, email: 'b@example.com') }
|
8
8
|
|
9
9
|
let(:order) { create(:completed_order_with_totals, user: user_a, number: "R123") }
|
10
10
|
|
@@ -108,7 +108,7 @@ describe 'Users', :type => :feature do
|
|
108
108
|
|
109
109
|
expect(user_a.reload.email).to eq 'a@example.com99'
|
110
110
|
expect(page).to have_text 'Account updated'
|
111
|
-
expect(
|
111
|
+
expect(page).to have_field('user_email', with: 'a@example.com99')
|
112
112
|
end
|
113
113
|
|
114
114
|
it 'can edit the user password' do
|
@@ -126,7 +126,7 @@ describe 'Users', :type => :feature do
|
|
126
126
|
check 'user_spree_role_admin'
|
127
127
|
click_button 'Update'
|
128
128
|
expect(page).to have_text 'Account updated'
|
129
|
-
expect(find_field('user_spree_role_admin')
|
129
|
+
expect(find_field('user_spree_role_admin')).to be_checked
|
130
130
|
end
|
131
131
|
|
132
132
|
it 'can edit user shipping address' do
|
@@ -135,7 +135,7 @@ describe 'Users', :type => :feature do
|
|
135
135
|
within("#admin_user_edit_addresses") do
|
136
136
|
fill_in "user_ship_address_attributes_address1", with: "1313 Mockingbird Ln"
|
137
137
|
click_button 'Update'
|
138
|
-
expect(
|
138
|
+
expect(page).to have_field('user_ship_address_attributes_address1', with: "1313 Mockingbird Ln")
|
139
139
|
end
|
140
140
|
|
141
141
|
expect(user_a.reload.ship_address.address1).to eq "1313 Mockingbird Ln"
|
@@ -147,7 +147,7 @@ describe 'Users', :type => :feature do
|
|
147
147
|
within("#admin_user_edit_addresses") do
|
148
148
|
fill_in "user_bill_address_attributes_address1", with: "1313 Mockingbird Ln"
|
149
149
|
click_button 'Update'
|
150
|
-
expect(
|
150
|
+
expect(page).to have_field('user_bill_address_attributes_address1', with: "1313 Mockingbird Ln")
|
151
151
|
end
|
152
152
|
|
153
153
|
expect(user_a.reload.bill_address.address1).to eq "1313 Mockingbird Ln"
|
@@ -27,7 +27,7 @@ describe Spree::Admin::ReimbursementsHelper, type: :helper do
|
|
27
27
|
let(:status) { 'noop' }
|
28
28
|
|
29
29
|
it 'should raise an error' do
|
30
|
-
expect{ subject }.to raise_error(RuntimeError)
|
30
|
+
expect{ subject }.to raise_error(RuntimeError, "unknown reimbursement status: noop")
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
@@ -88,7 +88,7 @@ describe Spree::Admin::StoreCreditEventsHelper, type: :helper do
|
|
88
88
|
let(:originator) { create(:store_credit_update_reason) }
|
89
89
|
|
90
90
|
it "raises an error" do
|
91
|
-
expect { subject }.to raise_error(RuntimeError)
|
91
|
+
expect { subject }.to raise_error(RuntimeError, "Unexpected originator type Spree::StoreCreditUpdateReason")
|
92
92
|
end
|
93
93
|
end
|
94
94
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -64,7 +64,6 @@ RSpec.configure do |config|
|
|
64
64
|
config.use_transactional_fixtures = false
|
65
65
|
|
66
66
|
config.before :suite do
|
67
|
-
Capybara.match = :prefer_exact
|
68
67
|
DatabaseCleaner.clean_with :truncation
|
69
68
|
end
|
70
69
|
|
@@ -73,6 +72,7 @@ RSpec.configure do |config|
|
|
73
72
|
reset_spree_preferences
|
74
73
|
WebMock.disable!
|
75
74
|
if RSpec.current_example.metadata[:js]
|
75
|
+
page.driver.browser.url_blacklist = ['http://fonts.googleapis.com']
|
76
76
|
DatabaseCleaner.strategy = :truncation
|
77
77
|
else
|
78
78
|
DatabaseCleaner.strategy = :transaction
|
@@ -87,6 +87,8 @@ RSpec.configure do |config|
|
|
87
87
|
DatabaseCleaner.clean
|
88
88
|
end
|
89
89
|
|
90
|
+
config.include BaseFeatureHelper, :type => :feature
|
91
|
+
|
90
92
|
config.after(:each, :type => :feature) do |example|
|
91
93
|
missing_translations = page.body.scan(/translation missing: #{I18n.locale}\.(.*?)[\s<\"&]/)
|
92
94
|
if missing_translations.any?
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module BaseFeatureHelper
|
2
|
+
def click_nav(nav_text, subnav_text=nil)
|
3
|
+
primary_nav = find(".admin-nav-menu>ul>li>a", text: %r{#{nav_text}}i)
|
4
|
+
if subnav_text
|
5
|
+
primary_nav.find('+ul>li>a', text: %r{#{subnav_text}}i).click
|
6
|
+
else
|
7
|
+
primary_nav.click
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|