[ProductVariant] Scenarios

This commit is contained in:
Łukasz 2016-11-11 15:44:26 +01:00
parent 3328ea8754
commit 8edeefc8e9
2 changed files with 74 additions and 0 deletions

View file

@ -0,0 +1,47 @@
@managing_product_variants
Feature: Generating product variants
In order to sell different variations of a single product
As an Administrator
I want to generate all possible product variants
Background:
Given the store is available in "English (United States)"
And the store has a "Wyborowa Vodka" configurable product
And this product has option "Taste" with values "Orange" and "Melon"
And I am logged in as an administrator
@ui
Scenario: Generating a product variant for product without variants
Given I want to generate new variants for this product
When I specify that the 1st variant is identified by "WYBOROWA_ORANGE" code and costs "$90"
And I specify that the 2nd variant is identified by "WYBOROWA_MELON" code and costs "$95"
And I generate it
Then I should be notified that it has been successfully generated
And I should see 2 variants in the list
@ui
Scenario: Generating the rest of product variants for product with at least one
Given this product is available in "Melon" taste priced at "$95.00"
And I want to generate new variants for this product
When I specify that the 2nd variant is identified by "WYBOROWA_ORANGE" code and costs "$90"
And I generate it
Then I should be notified that it has been successfully generated
And I should see 2 variants in the list
@ui
Scenario: Generating the rest of product variants for product with at least one
Given this product is available in "Orange" taste priced at "$90.00"
And I want to generate new variants for this product
When I specify that the 2nd variant is identified by "WYBOROWA_MELON" code and costs "$95"
And I generate it
Then I should be notified that it has been successfully generated
And I should see 2 variants in the list
@ui @javascript
Scenario: Generating only a part of product variants
Given I want to generate new variants for this product
When I specify that the 1st variant is identified by "WYBOROWA_ORANGE" code and costs "$90"
And I remove 2nd variant from the list
And I generate it
Then I should be notified that it has been successfully generated
And I should see 1 variants in the list

View file

@ -0,0 +1,27 @@
@managing_product_variants
Feature: Generating product variant generation
In order to avoid making mistakes when generating variants
As an Administrator
I want to be prevented from generating it without specifying required fields
Background:
Given the store is available in "English (United States)"
And the store has a "Wyborowa Vodka" configurable product
And this product has option "Taste" with values "Orange" and "Melon"
And I am logged in as an administrator
@ui
Scenario: Generating a product variant without price
Given I want to generate new variants for this product
When I specify that the 1st variant is identified by "WYBOROWA_ORANGE" code
And I try to generate it
Then I should be notified that price is required for the 1st variant
And I should see 0 variants in the list
@ui
Scenario: Generating a product variant without code
Given I want to generate new variants for this product
When I specify that the 1st variant costs "$90"
And I try to generate it
Then I should be notified that code is required for the 1st variant
And I should see 0 variants in the list