Skip to content

Commit 0570335

Browse files
author
Stanislav Idolov
committed
MAGETWO-59626: Error saving configurable product after disabling child products
1 parent 3b6a896 commit 0570335

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Adminhtml/Product/Edit/Section/BlockGallery.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,26 @@
1111
use Magento\Ui\Test\Block\Adminhtml\Section;
1212

1313
/**
14-
* Class for product gallery block
14+
* Class for product gallery block.
1515
*/
1616
class BlockGallery extends Section
1717
{
1818
/**
19+
* Selector for image loader container.
20+
*
1921
* @var string
2022
*/
2123
private $imageLoader = '.image.image-placeholder .file-row';
2224

2325
/**
24-
* Upload product images
26+
* Selector for image upload input.
27+
*
28+
* @var string
29+
*/
30+
private $imageUploadInput = '[name="image"]';
31+
32+
/**
33+
* Upload product images.
2534
*
2635
* @param array $data
2736
* @param SimpleElement|null $element
@@ -31,7 +40,7 @@ class BlockGallery extends Section
3140
public function setFieldsData(array $data, SimpleElement $element = null)
3241
{
3342
foreach ($data['image']['value'] as $imageData) {
34-
$uploadElement = $element->find('[name="image"]', Locator::SELECTOR_CSS, 'upload');
43+
$uploadElement = $element->find($this->imageUploadInput, Locator::SELECTOR_CSS, 'upload');
3544
$uploadElement->setValue($imageData['file']);
3645
$this->waitForElementNotVisible($this->imageLoader);
3746
}

dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertCanSaveProduct.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
namespace Magento\Catalog\Test\Constraint;
88

99
/**
10-
* Assert that can save already exist product
10+
* Assert that can save already exist product.
1111
*/
1212
class AssertCanSaveProduct extends \Magento\Mtf\Constraint\AbstractConstraint
1313
{
1414
/**
15-
* Assert that can save already exist product
15+
* Assert that can save already existing product.
1616
*
1717
* @param \Magento\Mtf\Fixture\FixtureInterface $product
1818
* @param \Magento\Catalog\Test\Page\Adminhtml\CatalogProductEdit $catalogProductEdit
@@ -30,12 +30,12 @@ public function processAssert(
3030

3131
\PHPUnit_Framework_Assert::assertNotEmpty(
3232
$catalogProductEdit->getMessagesBlock()->getSuccessMessage(),
33-
'Cant save existing product.'
33+
'Can\'t save existing product.'
3434
);
3535
}
3636

3737
/**
38-
* Returns a string representation of the object
38+
* Returns a string representation of the object.
3939
*
4040
* @return string
4141
*/

0 commit comments

Comments
 (0)