キュウリ試験に問題があります。 Paylane経由での支払い後(何とかPaylaneのシナリオにのみ問題があります; Paypal、Stripe、Payuはうまく動作します)、「ありがとうございました」ページでは、Capybaraのように見えます(店に戻るために)ブラウザで強調表示されますが、何もしない。また、次のステップに進み、店舗ページにあるかどうかを確認して、ボタンをクリックしたことがうまくいったと思うかどうかを確認します(私は思います)。誰かが私を助けることができますか?カピバラがボタンをきちんとクリックしたようですが、次のページに進まない
@lp @purchase @paylane @javascript
Feature: Purchase a product from a Landing Page via Paylane
As a Sneakpick user
I can access Landing Pages of product
So I can successfully purchase it via Paylane
Scenario: Purchase product via Paylane # features/purchases/landing_page/paylane.feature:7
Given I visit the Landing Page # features/step_definitions/basic_steps.rb:5
Then I want to order 1 product # features/step_definitions/purchase_steps.rb:92
And product is available via Paylane # features/step_definitions/purchase_steps.rb:1
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. You can simply remove the handler name or pass render :handlers => [:erb] instead. (called from _app_views_paylane_pay_html_erb___1015711955565910954_70249561011280 at /home/szczepan/1000i/Git/sneakpick/app/views/paylane/pay.html.erb:2)
Then I go to payment # features/step_definitions/purchase_steps.rb:53
And I pay via Paylane # features/step_definitions/paylane_steps.rb:1
expected to find text "Product" in "Payment - Sneakpick.co Thank You! Your order has been processed. We've sent you a confirmation emailwith your order details. « Back to product powered by sneakpick" (RSpec::Expectations::ExpectationNotMetError)
./features/step_definitions/purchase_steps.rb:77:in `/^I am on Landing page$/'
./features/step_definitions/paylane_steps.rb:2:in `/^I pay via Paylane$/'
features/purchases/landing_page/paylane.feature:12:in `And I pay via Paylane'
And my Paylane order should be made # features/step_definitions/paylane_steps.rb:76
Scenario: Purchase product via Paylane # features/purchases/landing_page/paylane.feature:15
Given I visit the Landing Page # features/step_definitions/basic_steps.rb:5
Then I want to order 1 product # features/step_definitions/purchase_steps.rb:92
And product is available via Paylane # features/step_definitions/purchase_steps.rb:1
DEPRECATION WARNING: Passing a template handler in the template name is deprecated. You can simply remove the handler name or pass render :handlers => [:erb] instead. (called from _app_views_paylane_pay_html_erb___1015711955565910954_70249561011280 at /home/szczepan/1000i/Git/sneakpick/app/views/paylane/pay.html.erb:2)
Then I go to payment # features/step_definitions/purchase_steps.rb:53
And I pay via Paylane not with card successfully # features/step_definitions/paylane_steps.rb:13
And my Paylane order should be made # features/step_definitions/paylane_steps.rb:76
ああ、2番目のものはうまくいきますが、最初は1つではなく、同じボタンをクリックします。ここ は、手順は次のとおりです。
And /^I pay via Paylane$/ do
steps %(
And I check if Paylane form is filled with correct data
And I fill in the card data
And I send form
And I accept confirmation alert
And I am on Thank You page
And I click 'Back to product' button
And I am on Landing page
)
end
And /^I pay via Paylane not with card successfully$/ do
steps %(
And I choose last available payment
And I send form
And I accept confirmation alert
And I click 'SUCCESS' button
And I am on Thank You page
And I click 'Back to product' button
And I am on Landing page
)
end
そして "Iボタンをクリックします(+。)" のステップ:
And /^I click '(.+)' button$/ do |button|
click_on(button)
end
ボタンは、 "製品に戻る" というテキストが含まれています。
助けていただけたら幸いです!
問題を引き起こしていたクリックする前に睡眠を追加してくれました。しかし、これは一時的な解決策のように扱っています。キュウリのトラブルがありますか? – sbulat