-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
162 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@refunds | ||
Feature: Being unable to refund a free order | ||
In order to give back money to the customer only if it is possible | ||
As an Administrator | ||
I want not to be able to generate a refund for a free order | ||
|
||
Background: | ||
Given the store operates on a single green channel in "United States" | ||
And the store has a free product "Witcher Sword" | ||
And the store ships everywhere for free for all channels | ||
And the store allows paying with "Space money" | ||
And there is a customer "Lucifer Morningstar" that placed an order "#0000001" | ||
And the customer bought 3 "Witcher Sword" products | ||
And the customer "Lucifer Morningstar" addressed it to "Seaside Fwy", "90802" "Los Angeles" in the "United States" with identical billing address | ||
And the customer chose "Free" shipping method | ||
And this order is already paid | ||
And I am logged in as an administrator | ||
|
||
@ui | ||
Scenario: Being unable to refund a free order | ||
When I view the summary of the order "#0000001" | ||
Then I should not see refunds button | ||
|
||
@ui | ||
Scenario: Being unable to open refund page when order is free | ||
When I try to refund some units of order "#0000001" | ||
Then I should be redirected to the order "#0000001" show page | ||
And I should be notified that I cannot refund a free order |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
{% set original_payment_method = order.payments.first().method %} | ||
{% if order.payments.first() %} | ||
{% set original_payment_method = order.payments.first().method %} | ||
|
||
<div class="ui hidden divider"></div> | ||
<div class="ui hidden divider"></div> | ||
|
||
<div class="ui stackable grid"> | ||
<div class="two column row"> | ||
<div class="ui form column"> | ||
<div class="field"> | ||
<label for="payment-methods">{{ 'sylius.ui.payment_method'|trans }}</label> | ||
<select id="payment-methods" name="sylius_refund_payment_method" class="ui fluid selection dropdown"> | ||
{% for payment_method in payment_methods %} | ||
<option value="{{ payment_method.id }}" {{ (payment_method.code == original_payment_method.code) ? 'selected="selected"' : '' }}> | ||
{{ payment_method.name }} | ||
</option> | ||
{% endfor %} | ||
</select> | ||
<small>{{ 'sylius.ui.original_payment_method'|trans }}: <strong>{{ original_payment_method }}</strong></small> | ||
<div class="ui stackable grid"> | ||
<div class="two column row"> | ||
<div class="ui form column"> | ||
<div class="field"> | ||
<label for="payment-methods">{{ 'sylius.ui.payment_method'|trans }}</label> | ||
<select id="payment-methods" name="sylius_refund_payment_method" class="ui fluid selection dropdown"> | ||
{% for payment_method in payment_methods %} | ||
<option value="{{ payment_method.id }}" {{ (payment_method.code == original_payment_method.code) ? 'selected="selected"' : '' }}> | ||
{{ payment_method.name }} | ||
</option> | ||
{% endfor %} | ||
</select> | ||
<small>{{ 'sylius.ui.original_payment_method'|trans }}: <strong>{{ original_payment_method }}</strong></small> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="ui form column"> | ||
<div class="field"> | ||
<label for="sylius-refund-comment">{{ 'sylius.ui.comment'|trans }}</label> | ||
<textarea rows="3" name="sylius_refund_comment" id="sylius-refund-comment"></textarea> | ||
<div class="ui form column"> | ||
<div class="field"> | ||
<label for="sylius-refund-comment">{{ 'sylius.ui.comment'|trans }}</label> | ||
<textarea rows="3" name="sylius_refund_comment" id="sylius-refund-comment"></textarea> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters