Skip to content

Commit 22ddb20

Browse files
committed
Allow country code EL for greek vat numbers (#10)
1 parent c4603d8 commit 22ddb20

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

features/checkout/filling_invoicing_information/filling_invoicing_information_as_european_company.feature

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Feature: Filling invoicing information as an european company
88
Given the store operates on a single channel in "Italy"
99
And channel "Italy" billing data is "Merchant S.p.A.", "Via Roma 12", "12345" "Milano", "Italy" with "06549840962" tax ID
1010
And the store operates in "Germany"
11+
And the store operates in "Greece"
1112
And this channel operates in the "Germany" country
13+
And this channel operates in the "Greece" country
1214
And the store ships everywhere for free
1315
And the store has a product "PHP T-Shirt" priced at "$19.99"
1416
And I have product "PHP T-Shirt" in the cart
@@ -21,3 +23,11 @@ Feature: Filling invoicing information as an european company
2123
And I specify a valid billing VAT number for a german company
2224
And I complete the addressing step
2325
Then I should be on the checkout shipping step
26+
27+
@ui
28+
Scenario: Filling invoicing information as a greek company
29+
When I specify the email as "jon.snow@example.com"
30+
And I specify the billing address for the company "GoT GmbH" - "Jon Snow" - "EO Kalampakas Grevenon", "422 00", "Kalampaka" - "Greece"
31+
And I specify a valid billing VAT number for a greek company
32+
And I complete the addressing step
33+
Then I should be on the checkout shipping step

tests/Application/config/validator/Address.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
</constraint>
148148
<constraint name="Sandwich\ViesBundle\Validator\Constraint\VatNumber">
149149
<option name="message">webgriffe_sylius_italian_invoiceable_order.address.european_vat_number.valid</option>
150-
<option name="format">GR</option>
150+
<option name="format">EL</option>
151151
<option name="groups">
152152
<value>company-GR</value>
153153
</option>

tests/Behat/Context/Ui/Shop/Checkout/CheckoutAddressingContext.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,14 @@ public function iSpecifyAValidBillingVatNumberForAGermanCompany(): void
280280
$this->addressPage->specifyBillingVatNumber('DE812871812');
281281
}
282282

283+
/**
284+
* @When /^I specify a valid billing VAT number for a greek company$/
285+
*/
286+
public function iSpecifyAValidBillingVatNumberForAGreekCompany(): void
287+
{
288+
$this->addressPage->specifyBillingVatNumber('EL094229666');
289+
}
290+
283291
/**
284292
* @Given /^I do not specify the billing recipient type in the billing address$/
285293
*/

0 commit comments

Comments
 (0)