Skip to content

Commit 9105b39

Browse files
committed
MC-29130: Storefront: View configurable product on storefront
1 parent a560b19 commit 9105b39

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

dev/tests/integration/testsuite/Magento/Swatches/Block/Product/Renderer/Configurable/ProductPageViewTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,12 +396,16 @@ private function checkResultIsNotEmpty(array $result): void
396396
*/
397397
private function checkOptions(array $actualDataItem, array $expectedItem): void
398398
{
399-
foreach ($expectedItem['options'] as $expectedItemKey => $expectedOption) {
399+
foreach ($expectedItem['options'] as $expectedOption) {
400400
$expectedSkus = array_values($expectedOption['skus']);
401401
$expectedIds = array_values($this->productResource->getProductsIdsBySkus($expectedSkus));
402402
foreach ($actualDataItem['options'] as $option) {
403403
if ($option['label'] === $expectedOption['label']) {
404-
$this->assertEquals($expectedIds, $option['products'], 'Wrong product linked as option');
404+
$this->assertEquals(
405+
sort($expectedIds),
406+
sort($option['products']),
407+
'Wrong product linked as option'
408+
);
405409
}
406410
}
407411
}

0 commit comments

Comments
 (0)