mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[Api][TaxRate] Remove bulk delete scenarios
This commit is contained in:
parent
d4eb28ebe9
commit
3f17b009eb
2 changed files with 1 additions and 36 deletions
|
|
@ -11,7 +11,7 @@ Feature: Deleting multiple tax rates
|
|||
And the store has "High VAT" tax rate of 40% for "Food" for the rest of the world
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui @javascript @api
|
||||
@ui @javascript @no-api
|
||||
Scenario: Deleting multiple tax rates at once
|
||||
When I browse tax rates
|
||||
And I check the "Low VAT" tax rate
|
||||
|
|
|
|||
|
|
@ -178,30 +178,6 @@ class ManagingTaxRatesContext implements Context
|
|||
$this->client->index(Resources::TAX_RATES);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I check the :taxRate tax rate
|
||||
* @When I check also the :taxRate tax rate
|
||||
*/
|
||||
public function iCheckTheTaxRate(TaxRateInterface $taxRate): void
|
||||
{
|
||||
$taxRatesToDelete = [];
|
||||
if ($this->sharedStorage->has('tax_rates_to_delete')) {
|
||||
$taxRatesToDelete = $this->sharedStorage->get('tax_rates_to_delete');
|
||||
}
|
||||
$taxRatesToDelete[] = $taxRate->getCode();
|
||||
$this->sharedStorage->set('tax_rates_to_delete', $taxRatesToDelete);
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I delete them
|
||||
*/
|
||||
public function iDeleteThem(): void
|
||||
{
|
||||
foreach ($this->sharedStorage->get('tax_rates_to_delete') as $id) {
|
||||
$this->client->delete(Resources::TAX_RATES, (string) $id)->getContent();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @When I remove its name
|
||||
*/
|
||||
|
|
@ -334,17 +310,6 @@ class ManagingTaxRatesContext implements Context
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then I should be notified that they have been successfully deleted
|
||||
*/
|
||||
public function iShouldBeNotifiedThatTheyHaveBeenSuccessfullyDeleted(): void
|
||||
{
|
||||
Assert::true(
|
||||
$this->responseChecker->isDeletionSuccessful($this->client->getLastResponse()),
|
||||
'Tax rate could not be deleted',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then I should see a single tax rate in the list
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue