Skip to content

Commit 55ef36d

Browse files
Indrani sonawaneIndrani sonawane
authored andcommitted
Fixed WEB API test failures
1 parent 8f9f10a commit 55ef36d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/BundleProductViewTest.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@
88
namespace Magento\GraphQl\Bundle;
99

1010
use Magento\Bundle\Model\Product\OptionList;
11+
use Magento\Bundle\Test\Fixture\Option as BundleOptionFixture;
12+
use Magento\Bundle\Test\Fixture\Product as BundleProductFixture;
1113
use Magento\Catalog\Api\Data\ProductInterface;
1214
use Magento\Catalog\Api\ProductRepositoryInterface;
15+
use Magento\Catalog\Test\Fixture\Product as ProductFixture;
1316
use Magento\Framework\App\Config\ScopeConfigInterface;
17+
use Magento\TestFramework\Fixture\DataFixture;
1418
use Magento\TestFramework\ObjectManager;
1519
use Magento\TestFramework\TestCase\GraphQlAbstract;
1620
use Magento\Store\Model\StoreManagerInterface;
1721
use Magento\Catalog\Model\Product\Attribute\Source\Status as ProductStatus;
22+
use Magento\TestFramework\Fixture\DataFixtureStorage;
23+
use Magento\TestFramework\Fixture\DataFixtureStorageManager;
1824

1925
/**
2026
* Test querying Bundle products
@@ -506,6 +512,22 @@ public function testBundleProductWithDisabledProductOption()
506512
/**
507513
* @magentoApiDataFixture Magento/Bundle/_files/bundle_product_with_sku_as_next_entity_id.php
508514
*/
515+
#[
516+
DataFixture(ProductFixture::class, ['price' => 10], 'p1'),
517+
DataFixture(ProductFixture::class, ['price' => 20], 'p2'),
518+
DataFixture(BundleOptionFixture::class, ['product_links' => ['$p1$']], 'opt1'),
519+
DataFixture(BundleOptionFixture::class, ['product_links' => ['$p2$']], 'opt2'),
520+
DataFixture(
521+
BundleProductFixture::class,
522+
['id' => 3, 'sku' => '4bundle-product','_options' => ['$opt1$', '$opt2$']],
523+
'4bundle-product'
524+
),
525+
DataFixture(
526+
BundleProductFixture::class,
527+
['id' => 4, 'sku' => '5bundle-product','_options' => ['$opt1$', '$opt2$']],
528+
'5bundle-product'
529+
),
530+
]
509531
public function testBundleProductHavingSKUAsNextBundleProductId()
510532
{
511533

0 commit comments

Comments
 (0)