Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Add spec for custom Paypal button style at checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavio Auciello committed Sep 27, 2019
1 parent b9852a7 commit 01cee72
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions spec/features/frontend/paypal_checkout_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 01cee72

Please sign in to comment.