[Api][TaxRate] Remove bulk delete scenarios

This commit is contained in:
Jan Goralski 2023-09-27 13:02:06 +02:00
parent d4eb28ebe9
commit 3f17b009eb
No known key found for this signature in database
GPG key ID: 95D91BA380F31EDD
2 changed files with 1 additions and 36 deletions

View file

@ -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

View file

@ -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
*/