diff --git a/spec/features/frontend/paypal_checkout_spec.rb b/spec/features/frontend/paypal_checkout_spec.rb index f2b569d1..2e5fe8cf 100644 --- a/spec/features/frontend/paypal_checkout_spec.rb +++ b/spec/features/frontend/paypal_checkout_spec.rb @@ -32,6 +32,26 @@ expect(page).to have_content("Your order has been processed successfully") end end + + context 'using custom paypal button style', vcr: { cassette_name: 'paypal/cart_checkout_with_style', match_requests_on: [:method, :uri] } do + before do + store.braintree_configuration.tap do |conf| + conf.set_preference(:paypal_button_color, 'blue') + conf.save! + end + end + + it 'should have correct locale preference' do + pend_if_paypal_slow do + expect_any_instance_of(Spree::Order).to receive(:restart_checkout_flow) + move_through_paypal_popup + + within(find('#paypal-button iframe')) do + expect(page).to have_selector('[class="paypal-button-color-blue]') + end + end + end + end end context "goes through regular checkout using paypal payment method" do