mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
[Admin] Tax rate additional edition scenarios
This commit is contained in:
parent
1d346712aa
commit
d69f5dd6be
3 changed files with 37 additions and 0 deletions
|
|
@ -38,3 +38,21 @@ Feature: Editing tax rate
|
|||
And I save my changes
|
||||
Then I should be notified about successful edition
|
||||
And this tax rate amount should be 16%
|
||||
|
||||
@ui
|
||||
Scenario: Changing related tax category
|
||||
Given the store has a tax category "Food and Beverage" also
|
||||
And I want to modify a tax rate "European Union Sales Tax"
|
||||
And I change it to be applicable for the "Food and Beverage" tax category
|
||||
And I save my changes
|
||||
Then I should be notified about successful edition
|
||||
And this tax rate should be applicable for the "Food and Beverage" tax category
|
||||
|
||||
@ui
|
||||
Scenario: Changing related zone
|
||||
Given there is a zone "The Rest of the World" containing all other countries
|
||||
And I want to modify a tax rate "European Union Sales Tax"
|
||||
And I change its zone to "The Rest of the World"
|
||||
And I save my changes
|
||||
Then I should be notified about successful edition
|
||||
And this tax rate should be applicable in "The Rest of the World" zone
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ final class TaxationContext implements Context
|
|||
/**
|
||||
* @Given the store has a tax category :name with a code :code
|
||||
* @Given the store has a tax category :name
|
||||
* @Given the store has a tax category :name also
|
||||
*/
|
||||
public function theStoreHasTaxCategoryWithCode($name, $code = null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ final class ManagingTaxRateContext implements Context
|
|||
|
||||
/**
|
||||
* @When I define it for the :zoneName zone
|
||||
* @When I change its zone to :zoneName
|
||||
*/
|
||||
public function iDefineItForTheZone($zoneName)
|
||||
{
|
||||
|
|
@ -100,6 +101,7 @@ final class ManagingTaxRateContext implements Context
|
|||
|
||||
/**
|
||||
* @When I make it applicable for the :taxCategoryName tax category
|
||||
* @When I change it to be applicable for the :taxCategoryName tax category
|
||||
*/
|
||||
public function iMakeItApplicableForTheTaxCategory($taxCategoryName)
|
||||
{
|
||||
|
|
@ -284,6 +286,22 @@ final class ManagingTaxRateContext implements Context
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^(this tax rate) should be applicable for the "([^"]+)" tax category$/
|
||||
*/
|
||||
public function thisTaxRateShouldBeApplicableForTaxCategory(TaxRateInterface $taxRate, $taxCategory)
|
||||
{
|
||||
$this->assertFieldValue($taxRate, 'category', $taxCategory);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then /^(this tax rate) should be applicable in "([^"]+)" zone$/
|
||||
*/
|
||||
public function thisTaxRateShouldBeApplicableInZone(TaxRateInterface $taxRate, $zone)
|
||||
{
|
||||
$this->assertFieldValue($taxRate, 'zone', $zone);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param TaxRateInterface $taxRate
|
||||
* @param string $element
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue