Skip to content
Open
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
5 changes: 5 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ jobs:
wget https://github.com/wkhtmltopdf/packaging/releases/download/${{ matrix.wkhtmltopdf }}/wkhtmltox_${{ matrix.wkhtmltopdf }}.jammy_amd64.deb
sudo dpkg -i wkhtmltox_${{ matrix.wkhtmltopdf }}.jammy_amd64.deb

-
name: Ensure wkhtmltopdf is executable
if: matrix.wkhtmltopdf != false
run: chmod +x /usr/local/bin/wkhtmltopdf

-
name: Output PHP version for Symfony CLI
run: php -v | head -n 1 | awk '{ print $2 }' > .php-version
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ tests/Application/node_modules/

/tests/TestApplication/.env.local
/tests/TestApplication/.env.*.local
/var/

phpspec.yml

Expand Down
2 changes: 1 addition & 1 deletion features/refunding_single_order_unit.feature
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Feature: Refunding a single order unit
@ui
Scenario: Not being able to refund unit from an order that is unpaid
When I am viewing the summary of the order "#00000022"
Then I should see disabled refunds button
Then I should not see refunds button

@application
Scenario: Not being able to refund unit from an order that is unpaid
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{% set order = hookable_metadata.context.resource %}
{% set path = path('sylius_refund_order_refunds_list', {'orderNumber': order.number,}) %}

<a class="dropdown-item {% if not can_refund_order(order.number) %}disabled{% endif %}" href="{{ path }}" {{ sylius_test_html_attribute('refunds') }}>
{{ ux_icon('tabler:repeat', {'class': 'icon dropdown-item-icon'}) }}
{{ 'sylius_refund.ui.refunds'|trans }}
</a>
{% if can_refund_order(order.number) %}
{% set path = path('sylius_refund_order_refunds_list', {'orderNumber': order.number,}) %}

<a class="dropdown-item" href="{{ path }}" {{ sylius_test_html_attribute('refunds') }}>
{{ ux_icon('tabler:repeat', {'class': 'icon dropdown-item-icon'}) }}
{{ 'sylius_refund.ui.refunds'|trans }}
</a>
{% endif %}
4 changes: 1 addition & 3 deletions tests/Behat/Context/Ui/ManagingOrdersContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ public function shouldBeNotifiedThatTheOrderShouldBePaid(): void
);
}

/**
* @Then I should not see refunds button
*/
#[Then('I should not see refunds button')]
public function iShouldNotSeeRefundsButton(): void
{
Assert::false($this->showPage->hasRefundsButton());
Expand Down
2 changes: 1 addition & 1 deletion tests/Behat/Page/Admin/Order/ShowPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function hasDownloadCreditMemoButton(int $index): bool

public function hasRefundsButton(): bool
{
return $this->getDocument()->hasButton('Refunds');
return $this->getDocument()->has('css', '[data-test-refunds]');
}

public function hasDisabledRefundsButton(): bool
Expand Down
6 changes: 6 additions & 0 deletions tests/TestApplication/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ imports:
twig:
paths:
'%kernel.project_dir%/../../../tests/TestApplication/templates': ~

knp_snappy:
pdf:
enabled: true
binary: '%env(resolve:WKHTMLTOPDF_PATH)%'
options: []
Loading