mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Merge pull request #6109 from GSadee/remove-deleting-order
[Order][Admin] Remove possibility to delete an order
This commit is contained in:
commit
b96a957df8
5 changed files with 2 additions and 29 deletions
|
|
@ -14,10 +14,9 @@ Feature: Deleting an order
|
|||
And the customer chose "Free" shipping method to "United States" with "Cash on Delivery" payment
|
||||
And I am logged in as an administrator
|
||||
|
||||
@domain @ui
|
||||
@domain
|
||||
Scenario: Deleted order should disappear from the registry
|
||||
When I delete the order "#00000022"
|
||||
Then I should be notified that it has been successfully deleted
|
||||
And this order should not exist in the registry
|
||||
|
||||
@domain
|
||||
|
|
|
|||
|
|
@ -436,30 +436,6 @@ final class ManagingOrdersContext implements Context
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I delete the order :order
|
||||
*/
|
||||
public function iDeleteOrder(OrderInterface $order)
|
||||
{
|
||||
$this->sharedStorage->set('order', $order);
|
||||
|
||||
$this->showPage->open(['id' => $order->getId()]);
|
||||
$this->showPage->deleteOrder();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^(this order) should not exist in the registry$/
|
||||
*/
|
||||
public function orderShouldNotExistInTheRegistry(OrderInterface $order)
|
||||
{
|
||||
$this->indexPage->open();
|
||||
|
||||
Assert::false(
|
||||
$this->indexPage->isSingleResourceOnPage(['number' => $order->getNumber()]),
|
||||
sprintf('Order with number %s exists but should not.', $order->getNumber())
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then I should be notified that the order's payment has been successfully completed
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ default:
|
|||
- sylius.behat.context.setup.shipping
|
||||
- sylius.behat.context.setup.order
|
||||
|
||||
- sylius.behat.context.domain.notification
|
||||
- sylius.behat.context.domain.security
|
||||
|
||||
- sylius.behat.context.domain.managing_orders
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ sylius_admin_order:
|
|||
alias: sylius.order
|
||||
section: admin
|
||||
templates: SyliusAdminBundle:Crud
|
||||
except: ['create', 'update', 'show']
|
||||
only: ['index']
|
||||
grid: sylius_admin_order
|
||||
permission: true
|
||||
vars:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{% import '@SyliusUi/Macro/buttons.html.twig' as buttons %}
|
||||
|
||||
{{ buttons.delete(path('sylius_admin_order_delete', {'id': order.id})) }}
|
||||
{% if sm_can(order, 'cancel', 'sylius_order') %}
|
||||
<form action="{{ path('sylius_admin_order_cancel', {'id': order.id} ) }}" method="post">
|
||||
<input type="hidden" name="_method" value="PUT">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue