Skip to content

Commit c84c6da

Browse files
committed
PB-261: Add Missing Integration P0-P1 Tests For Products
- replace use of EE data fixture
1 parent 76e9e1c commit c84c6da

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

dev/tests/integration/testsuite/Magento/PageBuilder/Model/Catalog/ProductTotalsTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ protected function setUp()
3737
* @magentoDataFixture Magento/PageBuilder/_files/product_totals/configurable_products.php
3838
* @magentoDataFixture Magento/PageBuilder/_files/product_totals/bundle_product.php
3939
* @magentoDataFixture Magento/GroupedProduct/_files/product_grouped_with_simple_out_of_stock.php
40-
* @magentoDataFixture Magento/GiftCard/_files/gift_card.php
4140
* @param array condition
4241
* @param int $expectedTotals
4342
* @dataProvider productDataProvider
@@ -88,7 +87,7 @@ public function productDataProvider()
8887
'attribute' => 'category_ids',
8988
'value' => '3'
9089
]
91-
], [12, 3, 1, 1]
90+
], [13, 3, 1, 1]
9291
],
9392
[ // #2 sku with no matches
9493
['1' => [

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,23 @@ function (Product $product) {
263263
$categoryLinkManagement,
264264
$productRepository
265265
);
266+
267+
// Create a gift card product
268+
createTestProduct(
269+
'Simple Gift Card',
270+
'gift-card',
271+
function (Product $product) {
272+
$product->setPrice(10);
273+
$product->setTypeId(\Magento\GiftCard\Model\Catalog\Product\Type\Giftcard::TYPE_GIFTCARD);
274+
$product->setStockData(['use_config_manage_stock' => 0]);
275+
$product->setCanSaveCustomOptions(true);
276+
$product->setHasOptions(true);
277+
$product->setAllowOpenAmount(1);
278+
$product->setGiftcardType(\Magento\GiftCard\Model\Giftcard::TYPE_VIRTUAL);
279+
return $product;
280+
},
281+
$objectManager,
282+
$defaultAttributeSet,
283+
$categoryLinkManagement,
284+
$productRepository
285+
);

0 commit comments

Comments
 (0)