Merge branch '1.12' into 1.13

* 1.12:
  Fix being unable to add two product attributes at once
  Add a Behat scenario reproducing being unable to add two product attributes at once
This commit is contained in:
TheMilek 2023-05-04 13:22:54 +02:00
commit e995e95d44
No known key found for this signature in database
GPG key ID: 2E44205E7374692F
2 changed files with 26 additions and 1 deletions

View file

@ -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"

View file

@ -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');