Skip to content

Commit 200747d

Browse files
committed
MC-34314: page_layout attribute default option cannot be changed
1 parent dff5331 commit 200747d

File tree

1 file changed

+9
-1
lines changed
  • dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier

1 file changed

+9
-1
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/EavTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
use Magento\Eav\Api\AttributeSetRepositoryInterface;
1111
use Magento\Eav\Model\AttributeSetRepository;
12+
use Magento\Framework\App\Config\ScopeConfigInterface;
1213
use Magento\TestFramework\Eav\Model\GetAttributeGroupByName;
1314
use Magento\TestFramework\Eav\Model\ResourceModel\GetEntityIdByAttributeId;
1415

@@ -34,6 +35,9 @@ class EavTest extends AbstractEavTest
3435
*/
3536
private $setRepository;
3637

38+
/** @var ScopeConfigInterface */
39+
private $config;
40+
3741
/**
3842
* @inheritdoc
3943
*/
@@ -43,6 +47,7 @@ protected function setUp(): void
4347
$this->attributeGroupByName = $this->objectManager->get(GetAttributeGroupByName::class);
4448
$this->getEntityIdByAttributeId = $this->objectManager->get(GetEntityIdByAttributeId::class);
4549
$this->setRepository = $this->objectManager->get(AttributeSetRepositoryInterface::class);
50+
$this->config = $this->objectManager->get(ScopeConfigInterface::class);
4651
}
4752

4853
/**
@@ -225,7 +230,10 @@ private function prepareAttributeSet(array $additional): void
225230
*/
226231
public function testModifyMetaNewProductPageLayoutDefault($attributesMeta): void
227232
{
228-
$attributesMeta = array_merge($attributesMeta, ['default' => '1column']);
233+
$defaultLayout = $this->config->getValue('web/default_layouts/default_product_layout');
234+
if ($defaultLayout) {
235+
$attributesMeta = array_merge($attributesMeta, ['default' => $defaultLayout]);
236+
}
229237
$expectedMeta = $this->addMetaNesting(
230238
$attributesMeta,
231239
'design',

0 commit comments

Comments
 (0)