spree-contrib / better_spree_paypal_express

A better Spree PayPal Express Extension.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
110 stars 269 forks source link

Specs not passing #37

Closed momolog closed 11 years ago

momolog commented 11 years ago

I cloned the repository, set up the dummy rails app and ran the specs all as laid out in the README. The specs do not run through, however.

Ruby version 2.0.0p247

Here is the output of bundle exec rspec spec:

I, [2013-10-24T11:29:56.680834 #92681]  INFO -- : Action: SetExpressCheckout
I, [2013-10-24T11:29:56.680916 #92681]  INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/
I, [2013-10-24T11:29:58.055786 #92681]  INFO -- : Response[200]: OK, Duration: 1.375s
I, [2013-10-24T11:30:24.487061 #92681]  INFO -- : Action: DoExpressCheckoutPayment
I, [2013-10-24T11:30:24.487130 #92681]  INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/
I, [2013-10-24T11:30:26.971268 #92681]  INFO -- : Response[200]: OK, Duration: 2.484s
.
An error occurred in an after hook
  NoMethodError: undefined method `compute_amount' for nil:NilClass
  occurred at /Users/aljoscha/.rvm/gems/ruby-2.0.0-p247/bundler/gems/spree-0ecc44d745c5/core/app/models/spree/adjustment.rb:78:in `update!'

FI, [2013-10-24T11:30:37.718875 #92681]  INFO -- : Action: SetExpressCheckout
I, [2013-10-24T11:30:37.718950 #92681]  INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/
I, [2013-10-24T11:30:38.407675 #92681]  INFO -- : Response[200]: OK, Duration: 0.689s
.
An error occurred in an after hook
  NoMethodError: undefined method `compute_amount' for nil:NilClass
  occurred at /Users/aljoscha/.rvm/gems/ruby-2.0.0-p247/bundler/gems/spree-0ecc44d745c5/core/app/models/spree/adjustment.rb:78:in `update!'

FI, [2013-10-24T11:30:52.362963 #92681]  INFO -- : Action: SetExpressCheckout
I, [2013-10-24T11:30:52.363042 #92681]  INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/
I, [2013-10-24T11:30:53.311739 #92681]  INFO -- : Response[200]: OK, Duration: 0.949s
.I, [2013-10-24T11:30:58.912981 #92681]  INFO -- : Action: SetExpressCheckout
I, [2013-10-24T11:30:58.913094 #92681]  INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/
I, [2013-10-24T11:30:59.617104 #92681]  INFO -- : Response[200]: OK, Duration: 0.704s
I, [2013-10-24T11:31:19.856531 #92681]  INFO -- : Action: DoExpressCheckoutPayment
I, [2013-10-24T11:31:19.856606 #92681]  INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/
I, [2013-10-24T11:31:21.971583 #92681]  INFO -- : Response[200]: OK, Duration: 2.115s
I, [2013-10-24T11:31:28.730983 #92681]  INFO -- : Action: RefundTransaction
I, [2013-10-24T11:31:28.731042 #92681]  INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/
I, [2013-10-24T11:31:31.681058 #92681]  INFO -- : Response[200]: OK, Duration: 2.950s
.I, [2013-10-24T11:31:37.953228 #92681]  INFO -- : Action: SetExpressCheckout
I, [2013-10-24T11:31:37.953306 #92681]  INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/
I, [2013-10-24T11:31:38.917046 #92681]  INFO -- : Response[200]: OK, Duration: 0.964s
I, [2013-10-24T11:31:52.463800 #92681]  INFO -- : Action: DoExpressCheckoutPayment
I, [2013-10-24T11:31:52.463868 #92681]  INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/
I, [2013-10-24T11:31:55.933687 #92681]  INFO -- : Response[200]: OK, Duration: 3.470s
I, [2013-10-24T11:31:59.859025 #92681]  INFO -- : Action: RefundTransaction
I, [2013-10-24T11:31:59.859092 #92681]  INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/
I, [2013-10-24T11:32:01.677916 #92681]  INFO -- : Response[200]: OK, Duration: 1.819s
.I, [2013-10-24T11:32:06.745024 #92681]  INFO -- : Action: SetExpressCheckout
I, [2013-10-24T11:32:06.745096 #92681]  INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/
I, [2013-10-24T11:32:07.361806 #92681]  INFO -- : Response[200]: OK, Duration: 0.617s
I, [2013-10-24T11:32:20.678161 #92681]  INFO -- : Action: DoExpressCheckoutPayment
I, [2013-10-24T11:32:20.678251 #92681]  INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/
I, [2013-10-24T11:32:23.176994 #92681]  INFO -- : Response[200]: OK, Duration: 2.499s
I, [2013-10-24T11:32:26.635893 #92681]  INFO -- : Action: RefundTransaction
I, [2013-10-24T11:32:26.635954 #92681]  INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/
I, [2013-10-24T11:32:27.405915 #92681]  INFO -- : Response[200]: OK, Duration: 0.770s
...

Failures:

  1) PayPal includes adjustments in PayPal summary
     Failure/Error: within("#guest_checkout") do
     Capybara::ElementNotFound:
       Unable to find css "#guest_checkout"
     # ./spec/features/paypal_spec.rb:75:in `block (2 levels) in <top (required)>'

  2) PayPal can process an order with $0 item total
     Failure/Error: within("#guest_checkout") do
     Capybara::ElementNotFound:
       Unable to find css "#guest_checkout"
     # ./spec/features/paypal_spec.rb:139:in `block (3 levels) in <top (required)>'

Finished in 2 minutes 58.3 seconds
10 examples, 2 failures

Failed examples:

rspec ./spec/features/paypal_spec.rb:61 # PayPal includes adjustments in PayPal summary
rspec ./spec/features/paypal_spec.rb:131 # PayPal can process an order with $0 item total

What am I missing?

radar commented 11 years ago

What SHA is this?

On Thu, Oct 24, 2013 at 8:35 PM, momolog notifications@github.com wrote:

I cloned the repository, set up the dummy rails app and ran the specs all as laid out in the README. The specs do not run through, however. Ruby version 2.0.0p247 Here is the output of bundle exec rspec spec: I, [2013-10-24T11:29:56.680834 #92681] INFO -- : Action: SetExpressCheckout I, [2013-10-24T11:29:56.680916 #92681] INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/ I, [2013-10-24T11:29:58.055786 #92681] INFO -- : Response[200]: OK, Duration: 1.375s I, [2013-10-24T11:30:24.487061 #92681] INFO -- : Action: DoExpressCheckoutPayment I, [2013-10-24T11:30:24.487130 #92681] INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/ I, [2013-10-24T11:30:26.971268 #92681] INFO -- : Response[200]: OK, Duration: 2.484s . An error occurred in an after hook NoMethodError: undefined method compute_amount' for nil:NilClass occurred at /Users/aljoscha/.rvm/gems/ruby-2.0.0-p247/bundler/gems/spree-0ecc44d745c5/core/app/models/spree/adjustment.rb:78:inupdate!' FI, [2013-10-24T11:30:37.718875 #92681] INFO -- : Action: SetExpressCheckout I, [2013-10-24T11:30:37.718950 #92681] INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/ I, [2013-10-24T11:30:38.407675 #92681] INFO -- : Response[200]: OK, Duration: 0.689s . An error occurred in an after hook NoMethodError: undefined method compute_amount' for nil:NilClass occurred at /Users/aljoscha/.rvm/gems/ruby-2.0.0-p247/bundler/gems/spree-0ecc44d745c5/core/app/models/spree/adjustment.rb:78:inupdate!' FI, [2013-10-24T11:30:52.362963 #92681] INFO -- : Action: SetExpressCheckout I, [2013-10-24T11:30:52.363042 #92681] INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/ I, [2013-10-24T11:30:53.311739 #92681] INFO -- : Response[200]: OK, Duration: 0.949s .I, [2013-10-24T11:30:58.912981 #92681] INFO -- : Action: SetExpressCheckout I, [2013-10-24T11:30:58.913094 #92681] INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/ I, [2013-10-24T11:30:59.617104 #92681] INFO -- : Response[200]: OK, Duration: 0.704s I, [2013-10-24T11:31:19.856531 #92681] INFO -- : Action: DoExpressCheckoutPayment I, [2013-10-24T11:31:19.856606 #92681] INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/ I, [2013-10-24T11:31:21.971583 #92681] INFO -- : Response[200]: OK, Duration: 2.115s I, [2013-10-24T11:31:28.730983 #92681] INFO -- : Action: RefundTransaction I, [2013-10-24T11:31:28.731042 #92681] INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/ I, [2013-10-24T11:31:31.681058 #92681] INFO -- : Response[200]: OK, Duration: 2.950s .I, [2013-10-24T11:31:37.953228 #92681] INFO -- : Action: SetExpressCheckout I, [2013-10-24T11:31:37.953306 #92681] INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/ I, [2013-10-24T11:31:38.917046 #92681] INFO -- : Response[200]: OK, Duration: 0.964s I, [2013-10-24T11:31:52.463800 #92681] INFO -- : Action: DoExpressCheckoutPayment I, [2013-10-24T11:31:52.463868 #92681] INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/ I, [2013-10-24T11:31:55.933687 #92681] INFO -- : Response[200]: OK, Duration: 3.470s I, [2013-10-24T11:31:59.859025 #92681] INFO -- : Action: RefundTransaction I, [2013-10-24T11:31:59.859092 #92681] INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/ I, [2013-10-24T11:32:01.677916 #92681] INFO -- : Response[200]: OK, Duration: 1.819s .I, [2013-10-24T11:32:06.745024 #92681] INFO -- : Action: SetExpressCheckout I, [2013-10-24T11:32:06.745096 #92681] INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/ I, [2013-10-24T11:32:07.361806 #92681] INFO -- : Response[200]: OK, Duration: 0.617s I, [2013-10-24T11:32:20.678161 #92681] INFO -- : Action: DoExpressCheckoutPayment I, [2013-10-24T11:32:20.678251 #92681] INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/ I, [2013-10-24T11:32:23.176994 #92681] INFO -- : Response[200]: OK, Duration: 2.499s I, [2013-10-24T11:32:26.635893 #92681] INFO -- : Action: RefundTransaction I, [2013-10-24T11:32:26.635954 #92681] INFO -- : Request[post]: https://api-3t.sandbox.paypal.com/2.0/ I, [2013-10-24T11:32:27.405915 #92681] INFO -- : Response[200]: OK, Duration: 0.770s ... Failures: 1) PayPal includes adjustments in PayPal summary Failure/Error: within("#guest_checkout") do Capybara::ElementNotFound: Unable to find css "#guest_checkout"

./spec/features/paypal_spec.rb:75:in `block (2 levels) in <top (required)>'

  2) PayPal can process an order with $0 item total
     Failure/Error: within("#guest_checkout") do
     Capybara::ElementNotFound:
       Unable to find css "#guest_checkout"
     # ./spec/features/paypal_spec.rb:139:in`block (3 levels) in <top (required)>'
Finished in 2 minutes 58.3 seconds
10 examples, 2 failures
Failed examples:
rspec ./spec/features/paypal_spec.rb:61 # PayPal includes adjustments in PayPal summary
rspec ./spec/features/paypal_spec.rb:131 # PayPal can process an order with $0 item total

What am I missing?

Reply to this email directly or view it on GitHub: https://github.com/radar/better_spree_paypal_express/issues/37

momolog commented 11 years ago

508da73be979c917a959781724cda7fb670c2375

radar commented 11 years ago

Aha, this is the master branch. It's currently broken due to changes from spree/spree#3567 which are still being finalized. Once that's done, then I'll fix up the build here.

2-1-stable and 2-0-stable should work without issue, assuming that you've got the latest phantomJS installed.

momolog commented 11 years ago

I see, so the stable branches are the only ones to expect the specs to pass on, right? Sorry for the confusion, I got it. Thanks.