Merge pull request #8058 from alcaeus/remove-option-value-count-constraint

Remove count constraint on option values collection
This commit is contained in:
Łukasz Chruściel 2017-05-26 11:24:39 +02:00 committed by GitHub
commit 8b860329a9
4 changed files with 20 additions and 28 deletions

View file

@ -18,3 +18,23 @@ Feature: Adding a new product option
And I add it
Then I should be notified that it has been successfully created
And the product option "T-Shirt size" should appear in the registry
@ui
Scenario: Adding a new product option without any option values
Given I want to create a new product option
When I name it "T-Shirt size" in "English (United States)"
And I specify its code as "t_shirt_size"
But I do not add an option value
And I try to add it
Then I should be notified that it has been successfully created
And the product option "T-Shirt size" should appear in the registry
@ui @javascript
Scenario: Adding a new product option with one option value
Given I want to create a new product option
When I name it "T-Shirt size" in "English (United States)"
And I specify its code as "t_shirt_size"
And I add the "S" option value identified by "OV1"
And I try to add it
Then I should be notified that it has been successfully created
And the product option "T-Shirt size" should appear in the registry

View file

@ -38,23 +38,3 @@ Feature: Product option validation
And I try to save my changes
Then I should be notified that name is required
And this product option should still be named "T-Shirt color"
@ui
Scenario: Trying to add a new product option without any option values
Given I want to create a new product option
When I name it "T-Shirt size" in "English (United States)"
And I specify its code as "t_shirt_size"
But I do not add an option value
And I try to add it
Then I should be notified that at least two option values are required
And the product option with name "T-Shirt size" should not be added
@ui @javascript
Scenario: Trying to add a new product option with one option value
Given I want to create a new product option
When I name it "T-Shirt size" in "English (United States)"
And I specify its code as "t_shirt_size"
And I add the "S" option value identified by "OV1"
And I try to add it
Then I should be notified that at least two option values are required
And the product option with name "T-Shirt size" should not be added

View file

@ -31,11 +31,6 @@
</property>
<property name="values">
<constraint name="Valid" />
<constraint name="Count">
<option name="min">2</option>
<option name="minMessage">sylius.option.values.min_count</option>
<option name="groups">sylius</option>
</constraint>
</property>
<property name="translations">
<constraint name="Valid" />

View file

@ -2,9 +2,6 @@
"code": 400,
"message": "Validation Failed",
"errors": {
"errors": [
"Please add at least 2 option values."
],
"children": {
"position": {},
"translations": {},