FLUX-SE / SyliusEUVatPlugin

This Sylius Plugin allow you to add European VAT Number to the addresses and manage European VAT number rule
MIT License
16 stars 8 forks source link

Improve feature files #27

Open gabiudrescu opened 4 years ago

gabiudrescu commented 4 years ago

Although technically correct, the feature files are a bit confusing:

    @ui
    Scenario: Address an order with a country different from the VAT country number
        Given I have product "PHP T-Shirt" in the cart
        And I am at the checkout addressing step
        And I specify the shipping address as "Ankh Morpork", "Frost Alley", "90210", "United States" for "Jon Snow"
        And I specify the billing address as "Ankh Morpork", "Frost Alley", "90210", "United States" for "Eddard Stark"
        And I specify the shipping vat number as "FR01234567891"
        And I specify the billing vat number as "FR01234567891"
        And I try to complete the addressing step
        Then I should be notified that the vat number in shipping details is not corresponding with the selected country
        And I should be notified that the vat number in billing details is not corresponding with the selected country

this one is using the same address as the one below, but both are invalid:

    @ui
    Scenario: Address an order with a country different from the VAT country number
        Given I have product "PHP T-Shirt" in the cart
        And I am at the checkout addressing step
        And I specify the shipping address as "Ankh Morpork", "Frost Alley", "90210", "France" for "Jon Snow"
        And I specify the billing address as "Ankh Morpork", "Frost Alley", "90210", "France" for "Eddard Stark"
        And I specify the shipping vat number as "FR01234567891"
        And I specify the billing vat number as "FR01234567891"
        And I try to complete the addressing step
        And I should be notified that the vat number in shipping details is not valid
        And I should be notified that the vat number in billing details is not valid

there is no feature for valid scenario and no feature with full checkout process.

nor how it looks in admin or myAccount.

to my personal taste, I would use here valid France addresses (and why, not maybe even French hero names :grinning: )

Prometee commented 4 years ago

This was my first try with Behat and I already put a task to enhance it don't worry, I just need some time to rewrite them.

gabiudrescu commented 4 years ago

I have analysed the solution you provide with this plugin and I though it would be useful for you (and others) to address questions / improvements in issues, in a more official way.

hope it helps.

if we decide to work with your plugin, are you open to PRs to implement such feedback?

Prometee commented 4 years ago

Yes of course !