Skip to content

Commit c55bf60

Browse files
committed
MC-21811: Canonical_url displays the backend domain instead of relative
- fixed existing productView test to match with the new canonical url meta tag setting
1 parent 0081368 commit c55bf60

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,8 @@ public function testQueryAllFieldsSimpleProduct()
292292
'Filter category',
293293
$responseObject->getData('products/items/0/categories/1/name')
294294
);
295-
$storeManager = ObjectManager::getInstance()->get(\Magento\Store\Model\StoreManagerInterface::class);
296-
self::assertEquals(
297-
$storeManager->getStore()->getBaseUrl() . 'simple-product.html',
298-
$responseObject->getData('products/items/0/canonical_url')
299-
);
295+
//canonical_url will be null unless the admin setting catalog/seo/product_canonical_tag is turned ON
296+
self::assertNull($responseObject->getData('products/items/0/canonical_url'));
300297
}
301298

302299
/**

0 commit comments

Comments
 (0)