Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Behat] Move scenario from Plus #387

Merged
merged 1 commit into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions features/validating_refunding_zero_items.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@refunds
Feature: Validating refunding zero items
In order not to make mistake during refunding
As an Administrator
I want not to be able to refund when none of items has been selected

Background:
Given the store operates on a single channel in "United States"
And the store has a product "Mr. Meeseeks T-Shirt" priced at "$10.00"
And the store allows shipping with "Galaxy Post"
And the store allows paying with "Space money"
And there is a customer "rick.sanchez@wubba-lubba-dub-dub.com" that placed an order "#00000022"
And the customer bought 2 "Mr. Meeseeks T-Shirt" products
And the customer chose "Galaxy Post" shipping method to "United States" with "Space money" payment
And I am logged in as an administrator

@ui @email
Scenario: Being unable to refund zero items
Given the order "#00000022" is already paid
When I want to refund some units of order "#00000022"
And I refund zero items
Then I should be notified that at least one unit should be selected to refund
And the customer "rick.sanchez@wubba-lubba-dub-dub.com" should not receive an email that some units have been refunded
1 change: 1 addition & 0 deletions tests/Behat/Context/Ui/RefundingContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ public function theSelectedRefundPaymentMethodShouldBe(string $paymentMethod): v

/**
* @Then email to :email with credit memo should not be sent
* @Then the customer :email should not receive an email that some units have been refunded
*/
public function emailToWithCreditMemoShouldNotBeSent(string $email): void
{
Expand Down