mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
bug #15006 Fix adding more than one product attribute at once (jakubtobiasz)
This PR was merged into the 1.12 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.12 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | fixes #14521 | License | MIT Commits -------e4d8d790b2Add a Behat scenario reproducing being unable to add two product attributes at once1e7a0be7a5Fix being unable to add two product attributes at once
This commit is contained in:
commit
e4c4365549
2 changed files with 26 additions and 1 deletions
|
|
@ -0,0 +1,25 @@
|
|||
@managing_products
|
||||
Feature: Adding a new integer product attribute
|
||||
In order to manage the product attributes easily
|
||||
As an Administrator
|
||||
I want to be able to add many product attributes at once
|
||||
|
||||
Background:
|
||||
Given the store operates on a single channel in "United States"
|
||||
And the store has a non-translatable text product attribute "Author"
|
||||
And the store has a non-translatable text product attribute "ISBN"
|
||||
And I am logged in as an administrator
|
||||
|
||||
@ui @javascript @no-api
|
||||
Scenario: Adding two text attributes to a product
|
||||
When I want to create a new simple product
|
||||
And I specify its code as "HARRY_POTTER_1"
|
||||
And I name it "Harry Potter and the Sorcerer's Stone" in "English (United States)"
|
||||
And I set its price to "$10.99" for "United States" channel
|
||||
And I set its non-translatable "Author" attribute to "J.K. Rowling"
|
||||
And I set its non-translatable "ISBN" attribute to "978-1338878929"
|
||||
And I add it
|
||||
Then I should be notified that it has been successfully created
|
||||
And the product "Harry Potter and the Sorcerer's Stone" should appear in the store
|
||||
And non-translatable attribute "Author" of product "Harry Potter and the Sorcerer's Stone" should be "J.K. Rowling"
|
||||
And non-translatable attribute "ISBN" of product "Harry Potter and the Sorcerer's Stone" should be "978-1338878929"
|
||||
|
|
@ -128,7 +128,7 @@ const setAttributeChoiceListener = function setAttributeChoiceListener() {
|
|||
|
||||
$('#sylius_product_attribute_choice').val('');
|
||||
|
||||
addAttributesNumber($.grep(attributeFormElements, a => $(a).hasClass('attribute')).length);
|
||||
addAttributesNumber(attributeFormElements.find('.attribute').length);
|
||||
modifySelectorOnAttributesListElementDelete();
|
||||
|
||||
$('form').removeClass('loading');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue