Skip to content

Commit c79adc5

Browse files
committed
AC-2904-v1:: Saving product with non-default store scope causes untouched attributes to become store scoped if loaded using ProductRepository
1 parent 6e10b07 commit c79adc5

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

dev/tests/api-functional/testsuite/Magento/Catalog/Api/ProductRepositoryMultiWebsiteTest.php

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -188,26 +188,17 @@ public function testProductDefaultValuesWithTwoWebsites(): void
188188
/** @var ScopeOverriddenValue $scopeOverriddenValue */
189189
$scopeOverriddenValue = $this->objectManager->get(ScopeOverriddenValue::class);
190190
$storeId = $store->load('fixture_third_store', 'code')->getId();
191-
$this->assertFalse($scopeOverriddenValue->containsValue(
192-
ProductInterface::class,
193-
$product,
194-
'visibility',
195-
$storeId
196-
));
197-
198-
$this->assertFalse($scopeOverriddenValue->containsValue(
199-
ProductInterface::class,
200-
$product,
201-
'tax_class_id',
202-
$storeId
203-
));
204191

205-
$this->assertFalse($scopeOverriddenValue->containsValue(
192+
$attributeCodeList = ['visibility', 'tax_class_id', 'status', 'short_description', 'description',
193+
'url_key', 'meta_title', 'meta_keywords', 'meta_description'];
194+
foreach($attributeCodeList as $attributeCode){
195+
$this->assertFalse($scopeOverriddenValue->containsValue(
206196
ProductInterface::class,
207197
$product,
208-
'status',
198+
$attributeCode,
209199
$storeId
210-
));
200+
));
201+
}
211202
}
212203

213204
/**

0 commit comments

Comments
 (0)