私のsupport/paths.rbファイルでは、私のcase句の1つは次のとおりです。
when /the checkout page/ then '/store/checkout'
ただし、一部のフローでは、チェックアウトページへのリダイレクトによってURLにいくつかのパラメーターが追加されるため、リダイレクトは「/ store / checkout」ではなく、(たとえば)「/ store / checkout?email_confirmation=1」になります。
問題は、これにより、以下の3行目など、一部のアサーションがCucumberで失敗することです。
Given I am on the checkout page
When I proceed with a blank email address
Then I should be on the checkout page
And I should see "You must provide an email address."
手順3は次の場合に失敗します。
Then I should be on the checkout page # features/step_definitions/web_steps.rb:185
expected: "/store/checkout",
got: "/store/checkout?email_confirmation=1" (using ==)
'?'の後のパラメータをCucumberに無視させるにはどうすればよいですか?リダイレクトされたURLで?
Then I should be on the checkout page