Skip to content

Commit 6cc7c19

Browse files
committed
AC-14681: CNS WebApi Failed tests for 2.4.9-alpha1 for OpenSearch
Changed other test using old fixture to use new one
1 parent 3e4bd1f commit 6cc7c19

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductCanonicalUrlTest.php

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77

88
namespace Magento\GraphQl\Catalog;
99

10-
use Magento\Catalog\Model\Indexer\Category\Product;
11-
use Magento\Catalog\Model\Indexer\Product\Category;
12-
use Magento\CatalogSearch\Model\Indexer\Fulltext as IndexerSearch;
13-
use Magento\Indexer\Model\Indexer;
1410
use Magento\Indexer\Test\Fixture\Indexer as IndexerFixture;
1511
use Magento\TestFramework\Fixture\Config;
1612
use Magento\TestFramework\Helper\Bootstrap;
@@ -74,13 +70,15 @@ public function testProductWithCanonicalLinksMetaTagSettingsEnabled()
7470
$this->assertEquals($productSku, $response['products']['items'][0]['sku']);
7571
}
7672

77-
/**
78-
* @magentoApiDataFixture Magento/Catalog/_files/product_simple.php
79-
* @magentoConfigFixture default_store catalog/seo/product_canonical_tag 0
80-
*/
73+
#[
74+
Config('catalog/seo/product_canonical_tag', 0),
75+
DataFixture(ProductFixture::class, as: 'product'),
76+
DataFixture(IndexerFixture::class)
77+
]
8178
public function testProductWithCanonicalLinksMetaTagSettingsDisabled()
8279
{
83-
$productSku = 'simple';
80+
$product = DataFixtureStorageManager::getStorage()->get('product');
81+
$productSku = $product->getSku();
8482
$query
8583
= <<<QUERY
8684
{
@@ -98,6 +96,6 @@ public function testProductWithCanonicalLinksMetaTagSettingsDisabled()
9896
$this->assertNull(
9997
$response['products']['items'][0]['canonical_url']
10098
);
101-
$this->assertEquals('simple', $response['products']['items'][0]['sku']);
99+
$this->assertEquals($productSku, $response['products']['items'][0]['sku']);
102100
}
103-
}
101+
}

0 commit comments

Comments
 (0)