mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
[Behat] Prevent items manipulation after checkout
This commit is contained in:
parent
e486674742
commit
4aed3c2a4b
2 changed files with 13 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ Feature: Preventing cart from being modified after checkout
|
|||
And I proceeded with "Free" shipping method and "Cash on Delivery" payment
|
||||
And I confirmed my order
|
||||
When I try to add product "AK-47" to the cart
|
||||
Then I should be informed that cart items are no longer available
|
||||
Then I should be informed that I cannot change the cart items after the checkout is completed
|
||||
|
||||
@api @no-ui
|
||||
Scenario: Preventing from removing product after checkout
|
||||
|
|
|
|||
|
|
@ -613,6 +613,18 @@ final class CartContext implements Context
|
|||
Assert::same($this->responseChecker->getResponseContent($response)['hydra:description'], 'Not Found');
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then I should be informed that I cannot change the cart items after the checkout is completed
|
||||
*/
|
||||
public function iShouldBeInformedThatICannotChangeTheCartItemsAfterTheCheckoutIsCompleted(): void
|
||||
{
|
||||
Assert::same(
|
||||
$this->responseChecker->getError($this->shopClient->getLastResponse()),
|
||||
'Cannot change cart items after the checkout is completed."',
|
||||
);
|
||||
Assert::same($this->shopClient->getLastResponse()->getStatusCode(), 422);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^the administrator should see "([^"]+)" product with quantity (\d+) in the (?:customer|visitor) cart$/
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue