Skip to content

Commit f722d4f

Browse files
committed
Merge branch 'MAGETWO-51714' of github.corp.magento.com:magento-troll/magento2ce into MAGETWO-51814
2 parents 4ac4f7a + 0e3aa6e commit f722d4f

File tree

9 files changed

+31
-16
lines changed

9 files changed

+31
-16
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/PromotedSection.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ public function getProductItem(FixtureInterface $product)
6262
*/
6363
public function getProducts()
6464
{
65+
if (!$this->_rootElement->isVisible($this->productItem)) {
66+
return [];
67+
}
68+
6569
$elements = $this->_rootElement->getElements($this->productItem, Locator::SELECTOR_CSS);
6670
$result = [];
6771

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/Related.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ public function getProductItem(FixtureInterface $product)
3838
*/
3939
public function getProducts()
4040
{
41+
if (!$this->_rootElement->isVisible($this->productItem)) {
42+
return [];
43+
}
44+
4145
$elements = $this->_rootElement->getElements($this->productItem, Locator::SELECTOR_CSS);
4246
$result = [];
4347

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public function processAssert(
4545
$this->openCategory($category);
4646

4747
$breadcrumbs = $this->getBreadcrumbs($category);
48+
\PHPUnit_Framework_Assert::assertNotEmpty(
49+
$breadcrumbs,
50+
'No breadcrumbs on category \''. $category->getName() . '\' page.'
51+
);
4852
$pageBreadcrumbs = $catalogCategoryView->getBreadcrumbs()->getText();
4953
\PHPUnit_Framework_Assert::assertEquals(
5054
$breadcrumbs,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function processAssert(
4040
foreach ($products as $productFixture) {
4141
\PHPUnit_Framework_Assert::assertTrue(
4242
$categoryView->getListProductBlock()->getProductItem($productFixture)->isVisible(),
43-
"Products '{$productFixture->getName()}' not found."
43+
"Products '{$productFixture->getName()}' not found in category '{$category->getName()}'."
4444
);
4545
}
4646
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ public function processAssert(
5151
$checkoutCart->open();
5252
foreach ($promotedProducts as $promotedProduct) {
5353
if (!$checkoutCart->getCrosssellBlock()->getProductItem($promotedProduct)->isVisible()) {
54-
$errors[] = 'Product \'' . $promotedProduct->getName() . '\' is absent in cross-sell section.';
54+
$errors[] = 'Product \'' . $promotedProduct->getName()
55+
. '\' is absent in cross-sell section of a product \'' . $product->getName() . '\'.';
5556
}
5657
}
5758

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public function processAssert(
4646
foreach ($promotedProducts as $promotedProduct) {
4747
\PHPUnit_Framework_Assert::assertTrue(
4848
$catalogProductView->getRelatedProductBlock()->getProductItem($promotedProduct)->isVisible(),
49-
'Product \'' . $promotedProduct->getName() . '\' is absent in related products.'
49+
'Product \'' . $promotedProduct->getName()
50+
. '\' is absent in related products \'' . $product->getName() . '\'.'
5051
);
5152
}
5253
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public function processAssert(
4646
foreach ($promotedProducts as $promotedProduct) {
4747
\PHPUnit_Framework_Assert::assertTrue(
4848
$catalogProductView->getUpsellBlock()->getProductItem($promotedProduct)->isVisible(),
49-
'Product \'' . $promotedProduct->getName() . '\' is absent in up-sells products.'
49+
'Product \'' . $promotedProduct->getName()
50+
. '\' is absent in up-sells products of a product \'' . $product->getName() . '\'.'
5051
);
5152
}
5253
}

dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductSimple.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
<field name="sku" xsi:type="string">product_100_dollar%isolation%</field>
228228
<field name="name" xsi:type="string">product_100_dollar%isolation%</field>
229229
<field name="quantity_and_stock_status" xsi:type="array">
230-
<item name="qty" xsi:type="number">666.0000</item>
230+
<item name="qty" xsi:type="number">777.0000</item>
231231
<item name="is_in_stock" xsi:type="string">In Stock</item>
232232
</field>
233233
<field name="product_has_weight" xsi:type="string">This item has weight</field>
@@ -252,7 +252,7 @@
252252
<field name="name" xsi:type="string">product_40_dollar%isolation%</field>
253253
<field name="type_id" xsi:type="string">simple</field>
254254
<field name="quantity_and_stock_status" xsi:type="array">
255-
<item name="qty" xsi:type="string">666</item>
255+
<item name="qty" xsi:type="string">777</item>
256256
<item name="is_in_stock" xsi:type="string">In Stock</item>
257257
</field>
258258
<field name="product_has_weight" xsi:type="string">This item has weight</field>
@@ -277,7 +277,7 @@
277277
<item name="dataset" xsi:type="string">default</item>
278278
</field>
279279
<field name="quantity_and_stock_status" xsi:type="array">
280-
<item name="qty" xsi:type="string">666</item>
280+
<item name="qty" xsi:type="string">777</item>
281281
<item name="is_in_stock" xsi:type="string">In Stock</item>
282282
</field>
283283
<field name="product_has_weight" xsi:type="string">This item has weight</field>
@@ -300,7 +300,7 @@
300300
<field name="sku" xsi:type="string">simple_product_with_category_%isolation%</field>
301301
<field name="name" xsi:type="string">Simple product with category %isolation%</field>
302302
<field name="quantity_and_stock_status" xsi:type="array">
303-
<item name="qty" xsi:type="string">666</item>
303+
<item name="qty" xsi:type="string">777</item>
304304
<item name="is_in_stock" xsi:type="string">In Stock</item>
305305
</field>
306306
<field name="product_has_weight" xsi:type="string">This item has weight</field>
@@ -349,7 +349,7 @@
349349
<item name="dataset" xsi:type="string">default</item>
350350
</field>
351351
<field name="quantity_and_stock_status" xsi:type="array">
352-
<item name="qty" xsi:type="string">666</item>
352+
<item name="qty" xsi:type="string">777</item>
353353
<item name="is_in_stock" xsi:type="string">In Stock</item>
354354
</field>
355355
<field name="name" xsi:type="string">Simple Product %isolation%</field>
@@ -487,7 +487,7 @@
487487
<item name="dataset" xsi:type="string">None</item>
488488
</field>
489489
<field name="quantity_and_stock_status" xsi:type="array">
490-
<item name="qty" xsi:type="string">666</item>
490+
<item name="qty" xsi:type="string">777</item>
491491
<item name="is_in_stock" xsi:type="string">In Stock</item>
492492
</field>
493493
<field name="product_has_weight" xsi:type="string">This item has weight</field>
@@ -511,7 +511,7 @@
511511
<item name="dataset" xsi:type="string">None</item>
512512
</field>
513513
<field name="quantity_and_stock_status" xsi:type="array">
514-
<item name="qty" xsi:type="string">666</item>
514+
<item name="qty" xsi:type="string">777</item>
515515
<item name="is_in_stock" xsi:type="string">In Stock</item>
516516
</field>
517517
<field name="product_has_weight" xsi:type="string">This item has weight</field>
@@ -535,7 +535,7 @@
535535
<item name="dataset" xsi:type="string">None</item>
536536
</field>
537537
<field name="quantity_and_stock_status" xsi:type="array">
538-
<item name="qty" xsi:type="string">666</item>
538+
<item name="qty" xsi:type="string">777</item>
539539
<item name="is_in_stock" xsi:type="string">In Stock</item>
540540
</field>
541541
<field name="product_has_weight" xsi:type="string">This item has weight</field>
@@ -559,7 +559,7 @@
559559
<item name="dataset" xsi:type="string">taxable_goods</item>
560560
</field>
561561
<field name="quantity_and_stock_status" xsi:type="array">
562-
<item name="qty" xsi:type="string">666</item>
562+
<item name="qty" xsi:type="string">777</item>
563563
<item name="is_in_stock" xsi:type="string">In Stock</item>
564564
</field>
565565
<field name="product_has_weight" xsi:type="string">This item has weight</field>
@@ -973,7 +973,7 @@
973973
<field name="sku" xsi:type="string">simple_product_with_category_%isolation%</field>
974974
<field name="name" xsi:type="string">Simple product with category %isolation%</field>
975975
<field name="quantity_and_stock_status" xsi:type="array">
976-
<item name="qty" xsi:type="string">666</item>
976+
<item name="qty" xsi:type="string">777</item>
977977
<item name="is_in_stock" xsi:type="string">In Stock</item>
978978
</field>
979979
<field name="product_has_weight" xsi:type="string">This item has weight</field>

dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/CatalogProductVirtual.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<field name="name" xsi:type="string">Virtual product %isolation%</field>
2424
<field name="sku" xsi:type="string">sku_virtual_product_%isolation%</field>
2525
<field name="quantity_and_stock_status" xsi:type="array">
26-
<item name="qty" xsi:type="string">666</item>
26+
<item name="qty" xsi:type="string">777</item>
2727
<item name="is_in_stock" xsi:type="string">In Stock</item>
2828
</field>
2929
<field name="product_has_weight" xsi:type="string">This item has no weight</field>
@@ -112,7 +112,7 @@
112112
<field name="name" xsi:type="string">Virtual product %isolation%</field>
113113
<field name="sku" xsi:type="string">sku_virtual_product_%isolation%</field>
114114
<field name="quantity_and_stock_status" xsi:type="array">
115-
<item name="qty" xsi:type="string">666</item>
115+
<item name="qty" xsi:type="string">777</item>
116116
<item name="is_in_stock" xsi:type="string">In Stock</item>
117117
</field>
118118
<field name="price" xsi:type="array">

0 commit comments

Comments
 (0)