Skip to content

Commit 8cef68e

Browse files
committed
PB-229: Story Bug for PB-107: Incorrect Number of Products
1 parent c3c280e commit 8cef68e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

dev/tests/integration/testsuite/Magento/PageBuilder/Controller/Adminhtml/Form/Element/ProductTotalsTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function productDataProvider()
6767
]
6868
], 0, 0
6969
],
70-
[ // category with 4 products, 1 disabled
70+
[ // category with 4 products, 1 disabled, 1 not visible
7171
['1' => [
7272
'aggregator' => 'all',
7373
'new_child' => '',
@@ -80,7 +80,7 @@ public function productDataProvider()
8080
'attribute' => 'category_ids',
8181
'value' => '3'
8282
]
83-
], 4, 1
83+
], 2, 1
8484
],
8585
[ // sku with no matches
8686
['1' => [
@@ -97,7 +97,7 @@ public function productDataProvider()
9797
]
9898
], 0, 0
9999
],
100-
[ // sku with 2 matches, 1 disabled
100+
[ // sku with 2 matches, 1 disabled, 1 not visible
101101
['1' => [
102102
'aggregator' => 'all',
103103
'new_child' => '',
@@ -110,7 +110,7 @@ public function productDataProvider()
110110
'attribute' => 'sku',
111111
'value' => 'simple-3, simple-4'
112112
]
113-
], 2, 1
113+
], 0, 1
114114
],
115115
[ // condition with no matches
116116
['1' => [
@@ -140,7 +140,7 @@ public function productDataProvider()
140140
'attribute' => 'price',
141141
'value' => '20'
142142
]
143-
], 3, 1
143+
], 1, 1
144144
],
145145
];
146146
}

dev/tests/integration/testsuite/Magento/PageBuilder/_files/product_totals/products.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
->setSku('simple')
8080
->setPrice(10)
8181
->setWeight(18)
82-
->setStockData(['use_config_manage_stock' => 0])
82+
->setQuantityAndStockStatus(['qty' => 10, 'is_in_stock' => 1])
8383
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
8484
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
8585
->save();
@@ -99,7 +99,7 @@
9999
->setSku('12345') // SKU intentionally contains digits only
100100
->setPrice(45.67)
101101
->setWeight(56)
102-
->setStockData(['use_config_manage_stock' => 0])
102+
->setQuantityAndStockStatus(['qty' => 10, 'is_in_stock' => 1])
103103
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
104104
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
105105
->save();
@@ -119,7 +119,7 @@
119119
->setSku('simple-3')
120120
->setPrice(15)
121121
->setWeight(2)
122-
->setStockData(['use_config_manage_stock' => 0])
122+
->setQuantityAndStockStatus(['qty' => 10, 'is_in_stock' => 1])
123123
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_NOT_VISIBLE)
124124
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
125125
->save();
@@ -140,7 +140,7 @@
140140
->setSku('simple-4')
141141
->setPrice(10)
142142
->setWeight(18)
143-
->setStockData(['use_config_manage_stock' => 0])
143+
->setQuantityAndStockStatus(['qty' => 10, 'is_in_stock' => 1])
144144
->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
145145
->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_DISABLED)
146146
->save();

0 commit comments

Comments
 (0)