Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Update testing.

Matthew Kennedy93ddd9fa1dba
diff --git a/frontend/spec/features/checkout_spec.rb b/frontend/spec/features/checkout_spec.rb
index 08ba2c06da..9f844e92b3 100644
--- a/frontend/spec/features/checkout_spec.rb
+++ b/frontend/spec/features/checkout_spec.rb
@@ -233,7 +233,7 @@ describe 'Checkout', type: :feature, inaccessible: true, js: true do
end
context 'when several payment methods are available', js: true do
- let!(:current_store) { create(:store, default: true) }
+ let!(:store) { create(:store, default: true) }
before do
order = OrderWalkthrough.up_to(:payment)
@@ -635,7 +635,6 @@ describe 'Checkout', type: :feature, inaccessible: true, js: true do
zone.members << create(:zone_member, zoneable: australia)
end
-
create(:shipping_method,
name: 'Default',
display_on: 'both',
@@ -688,7 +687,6 @@ describe 'Checkout', type: :feature, inaccessible: true, js: true do
end
context 'user has store credits', js: true do
-
shared_examples 'could not use store credit' do
it 'page has no data for Store Credits' do
expect(page).not_to have_selector('[data-hook="checkout_payment_store_credit_available"]')
@@ -696,7 +694,6 @@ describe 'Checkout', type: :feature, inaccessible: true, js: true do
end
end
-
let(:bogus) { create(:credit_card_payment_method) }
let(:store_credit_payment_method) { create(:store_credit_payment_method) }
let(:user) { create(:user) }
diff --git a/frontend/spec/support/shared_contexts/checkout_setup.rb b/frontend/spec/support/shared_contexts/checkout_setup.rb
index 599bccb340..a46c162282 100644
--- a/frontend/spec/support/shared_contexts/checkout_setup.rb
+++ b/frontend/spec/support/shared_contexts/checkout_setup.rb
@@ -4,8 +4,8 @@ shared_context 'checkout setup' do
let!(:shipping_method) { create(:shipping_method) }
let!(:stock_location) { create(:stock_location) }
let!(:mug) { create(:product, name: 'RoR Mug') }
- let!(:credit_card_payment) { create(:credit_card_payment_method) }
- let!(:check_payment) { create(:check_payment_method) }
+ let!(:credit_card_payment) { create(:credit_card_payment_method, stores: [store]) }
+ let!(:check_payment) { create(:check_payment_method, stores: [store]) }
let!(:unsupported_payment) { create(:check_payment_method, stores: [create(:store)]) }
let!(:zone) { create(:zone) }
let!(:store) { create(:store) }