Мне нужно написать контрольный пример для того, чтобы проверить процесс оформления заказа с помощью песочницы PayPal. Кто-нибудь может подсказать мне это?
Я попытался добавить простые шаги, такие как перенаправление через JavaScript и т. Д.
And I am redirected to "/checkout.php"
Then I should get the following fields autofilled with value
"""
{ " preferred_payment_type ": "PayPal"}
"""
And I press button ".proceed"
And I should be redirected by javascript
Then print current URL
Then I should see "Pay with PayPal"
When I fill in the following:
| login_email | some_email@abc.com |
| login_password | p$$wd |
And I press "submit"
Then I should see "Dummy Test Store"
Мой тест успешно выполняется до этого шага
And I should be redirected by javascript
опубликуйте сообщение об ошибке и перенаправьте меня обратно на главную страницу
And I should be redirected by javascript # \Features\Context\CheckoutContext::iFollowTheRedirectionByJavascript()
Then print current URL # Behat\MinkExtension\Context\MinkContext::printCurrentUrl()
│ http://localhost/finish.php?error=2
Then I should see "Pay with PayPal" # Behat\MinkExtension\Context\MinkContext::assertPageContainsText()
The text "Pay with PayPal" was not found anywhere in the text of the current page. (Behat\Mink\Exception\ResponseTextException)
Означает, что я не могу перенаправить ссылку в песочницу PayPal