mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[Behat] Adjust features
This commit is contained in:
parent
9ea2a5ccca
commit
ecda935732
37 changed files with 64 additions and 46 deletions
|
|
@ -9,6 +9,7 @@ default:
|
|||
|
||||
- sylius.behat.context.transform.channel
|
||||
- sylius.behat.context.transform.currency
|
||||
- sylius.behat.context.transform.locale
|
||||
- sylius.behat.context.transform.shared_storage
|
||||
|
||||
- sylius.behat.context.setup.channel
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ default:
|
|||
contexts_as_services:
|
||||
- sylius.behat.context.hook.doctrine_orm
|
||||
|
||||
- sylius.behat.context.transform.locale
|
||||
- sylius.behat.context.transform.shared_storage
|
||||
|
||||
- sylius.behat.context.setup.locale
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ default:
|
|||
- sylius.behat.context.hook.doctrine_orm
|
||||
|
||||
- sylius.behat.context.setup.channel
|
||||
- sylius.behat.context.setup.locale
|
||||
- sylius.behat.context.setup.payment
|
||||
- sylius.behat.context.setup.security
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ default:
|
|||
- sylius.behat.context.transform.product_option
|
||||
- sylius.behat.context.transform.shared_storage
|
||||
|
||||
- sylius.behat.context.setup.channel
|
||||
- sylius.behat.context.setup.locale
|
||||
- sylius.behat.context.setup.product_option
|
||||
- sylius.behat.context.setup.security
|
||||
|
||||
|
|
|
|||
|
|
@ -8,15 +8,17 @@ default:
|
|||
- sylius.behat.context.hook.doctrine_orm
|
||||
|
||||
- sylius.behat.context.transform.addressing
|
||||
- sylius.behat.context.transform.currency
|
||||
- sylius.behat.context.transform.customer
|
||||
- sylius.behat.context.transform.locale
|
||||
- sylius.behat.context.transform.payment
|
||||
- sylius.behat.context.transform.product
|
||||
- sylius.behat.context.transform.shared_storage
|
||||
- sylius.behat.context.transform.shipping_method
|
||||
- sylius.behat.context.transform.locale
|
||||
|
||||
- sylius.behat.context.setup.channel
|
||||
- sylius.behat.context.setup.currency
|
||||
- sylius.behat.context.setup.locale
|
||||
- sylius.behat.context.setup.order
|
||||
- sylius.behat.context.setup.payment
|
||||
- sylius.behat.context.setup.product
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ default:
|
|||
- sylius.behat.context.transform.locale
|
||||
- sylius.behat.context.transform.taxon
|
||||
|
||||
- sylius.behat.context.setup.channel
|
||||
- sylius.behat.context.setup.locale
|
||||
- sylius.behat.context.setup.security
|
||||
- sylius.behat.context.setup.taxonomy
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@ Feature: Browsing currencies
|
|||
I want to browse currencies
|
||||
|
||||
Background:
|
||||
Given the store has currency "Euro", "British Pound Sterling" and "US Dollar"
|
||||
Given the store has currency "Euro", "British Pound Sterling"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Browsing currencies in store
|
||||
Given I browse currencies of the store
|
||||
Then I should see 3 currencies in the list
|
||||
Then I should see 2 currencies in the list
|
||||
And I should see the currency "British Pound Sterling" in the list
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Adding a new payment method
|
|||
I want to add a new payment method to the registry
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Adding a new checkbox product attribute
|
|||
I want to add a new checkbox product attribute
|
||||
|
||||
Background:
|
||||
Given the store has locale "English (United States)"
|
||||
Given the store is available in "English (United States)"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Adding a new integer product attribute
|
|||
I want to add a new integer product attribute
|
||||
|
||||
Background:
|
||||
Given the store has locale "English (United States)"
|
||||
Given the store is available in "English (United States)"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Adding a new percent product attribute
|
|||
I want to add a new percent product attribute
|
||||
|
||||
Background:
|
||||
Given the store has locale "English (United States)"
|
||||
Given the store is available in "English (United States)"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Adding a new text product attribute
|
|||
I want to add a new text product attribute
|
||||
|
||||
Background:
|
||||
Given the store has locale "English (United States)"
|
||||
Given the store is available in "English (United States)"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Adding a new textarea product attribute
|
|||
I want to add a new textarea product attribute
|
||||
|
||||
Background:
|
||||
Given the store has locale "English (United States)"
|
||||
Given the store is available in "English (United States)"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Text product attribute edition
|
|||
I want to be able to edit a text product attribute
|
||||
|
||||
Background:
|
||||
Given the store has locale "English (United States)"
|
||||
Given the store is available in "English (United States)"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Product attribute unique code validation
|
|||
I want to be prevented from adding a new product attribute with taken code
|
||||
|
||||
Background:
|
||||
Given the store has locale "English (United States)"
|
||||
Given the store is available in "English (United States)"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Text product attribute validation
|
|||
I want to be prevented from adding it without specify required fields
|
||||
|
||||
Background:
|
||||
Given the store has locale "English (United States)"
|
||||
Given the store is available in "English (United States)"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Adding a new product option
|
|||
I want to be able to add a new product option to the registry
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui @javascript
|
||||
|
|
|
|||
|
|
@ -4,12 +4,10 @@ Feature: Browsing product options
|
|||
As an Administrator
|
||||
I want to be able to browse product options
|
||||
|
||||
Background:
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Browsing defined product options
|
||||
Given the store has a product option "T-Shirt size" with a code "t_shirt_size"
|
||||
Given I am logged in as an administrator
|
||||
And the store has a product option "T-Shirt size" with a code "t_shirt_size"
|
||||
And the store has a product option "T-Shirt color" with a code "t_shirt_color"
|
||||
When I browse product options
|
||||
Then I should see 2 product options in the list
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ Feature: Editing product options
|
|||
I want to be able to edit a product option
|
||||
|
||||
Background:
|
||||
Given the store has a product option "T-Shirt size" with a code "t_shirt_size"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store has a product option "T-Shirt size" with a code "t_shirt_size"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Managing option values of a product option
|
|||
I want to be able to edit a product option and its option values
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store has a product option "T-Shirt size" with a code "t_shirt_size"
|
||||
And this product option has the "S" option value with code "OV1"
|
||||
And this product option has also the "M" option value with code "OV2"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Product option unique code validation
|
|||
I want to be prevented from adding two product options with the same code
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store has a product option "T-Shirt size" with a code "t_shirt_size"
|
||||
And I am logged in as an administrator
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Product option validation
|
|||
I want to be prevented from adding it without specifying required fields
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store has a product option "T-Shirt color" with a code "t_shirt_color"
|
||||
And I am logged in as an administrator
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ Feature: Adding a new shipping method
|
|||
I want to add a new shipping method to the registry
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store has a base currency "Euro"
|
||||
And there is a zone "EU" containing all members of the European Union
|
||||
And I am logged in as an administrator
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ Feature: Browsing shipping methods
|
|||
I want to be able to browse list of them
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store has a base currency "Euro"
|
||||
And there is a zone "EU" containing all members of the European Union
|
||||
And the store allows shipping with "UPS Carrier" and "FedEx Carrier"
|
||||
And I am logged in as an administrator
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ Feature: Deleting a shipping method
|
|||
I want to be able to delete a shipping method
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store has a base currency "Euro"
|
||||
And there is a zone "EU" containing all members of the European Union
|
||||
And the store allows shipping with "UPS Ground"
|
||||
And I am logged in as an administrator
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ Feature: Editing shipping method
|
|||
I want to be able to edit a shipping method
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store has a base currency "Euro"
|
||||
And there is a zone "EU" containing all members of the European Union
|
||||
And the store allows shipping with "UPS Carrier" identified by "UPS_CARRIER"
|
||||
And I am logged in as an administrator
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ Feature: Shipping method flat rate per shipment calculator validation
|
|||
I want to be prevented from adding it without specifying amount
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store has a base currency "Euro"
|
||||
And there is a zone "EU" containing all members of the European Union
|
||||
Given I am logged in as an administrator
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ Feature: Shipping method flat rate per unit calculator validation
|
|||
I want to be prevented from adding it without specifying amount
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store has a base currency "Euro"
|
||||
And there is a zone "EU" containing all members of the European Union
|
||||
Given I am logged in as an administrator
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ Feature: Shipping method unique code validation
|
|||
I want to be prevented from adding two shipping methods with same code
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store has a base currency "Euro"
|
||||
And there is a zone "EU" containing all members of the European Union
|
||||
And the store allows shipping with "UPS Ground" identified by "UPS"
|
||||
And I am logged in as an administrator
|
||||
|
||||
|
|
@ -14,7 +16,7 @@ Feature: Shipping method unique code validation
|
|||
Given I want to create a new shipping method
|
||||
When I specify its code as "UPS"
|
||||
And I name it "FedEx Carrier" in "English (United States)"
|
||||
And I define it for the "France" zone
|
||||
And I define it for the "European Union" zone
|
||||
And I choose "Flat rate per shipment" calculator
|
||||
And I specify its amount as 50
|
||||
And I try to add it
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ Feature: Shipping method validation
|
|||
I want to be prevented from adding it without specifying required fields
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store has a base currency "Euro"
|
||||
And there is a zone "EU" containing all members of the European Union
|
||||
Given I am logged in as an administrator
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,9 @@ Feature: Toggling a shipping method
|
|||
I want to be able to switch state of shipping method between enable and disable
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store has a base currency "Euro"
|
||||
And there is a zone "EU" containing all members of the European Union
|
||||
And the store allows shipping with "UPS Carrier" identified by "UPS_CARRIER"
|
||||
And I am logged in as an administrator
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Adding a new taxon
|
|||
I want to add a new taxon to the registry
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ Feature: Deleting a taxon
|
|||
I want to be able to delete a taxon
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
And I am logged in as an administrator
|
||||
Given I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
Scenario: Deleted taxon should disappear from the registry
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ Feature: Editing a taxon
|
|||
I want to be able to edit a taxon
|
||||
|
||||
Background:
|
||||
Given the store classifies its products as "T-Shirts" and "Accessories"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store classifies its products as "T-Shirts" and "Accessories"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Taxon unique code validation
|
|||
I want to be prevented from adding two taxons with same code
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And the store classifies its products as "T-Shirts"
|
||||
And I am logged in as an administrator
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Feature: Taxon validation
|
|||
I want to be prevented from adding it without specifying required fields
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "France"
|
||||
Given the store is available in "English (United States)"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui
|
||||
|
|
|
|||
|
|
@ -355,25 +355,25 @@ final class ManagingChannelsContext implements Context
|
|||
}
|
||||
|
||||
/**
|
||||
* @When I make it available in :language
|
||||
* @When I make it available in :locale
|
||||
*/
|
||||
public function iMakeItAvailableIn($language)
|
||||
public function iMakeItAvailableIn($locale)
|
||||
{
|
||||
$currentPage = $this->currentPageResolver->getCurrentPageWithForm($this->createPage, $this->updatePage);
|
||||
|
||||
$currentPage->chooseLocale($language);
|
||||
$currentPage->chooseLocale($locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then the channel :channel should be available in :language
|
||||
* @Then the channel :channel should be available in :locale
|
||||
*/
|
||||
public function theChannelShouldBeAvailableIn(ChannelInterface $channel, $language)
|
||||
public function theChannelShouldBeAvailableIn(ChannelInterface $channel, $locale)
|
||||
{
|
||||
$this->updatePage->open(['id' => $channel->getId()]);
|
||||
|
||||
Assert::true(
|
||||
$this->updatePage->isLocaleChosen($language),
|
||||
sprintf('Language %s should be selected but it is not', $language)
|
||||
$this->updatePage->isLocaleChosen($locale),
|
||||
sprintf('Language %s should be selected but it is not', $locale)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue