Skip to content

Commit c1dae8b

Browse files
committed
AC-15208: Attribute Option Label Gets Overwritten When Updating Store Labels
Updated function to reduce the method length for fixing static test failure
1 parent 7086100 commit c1dae8b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public function testUpdateMultistorePreservingOtherStoreLabel()
115115
$store2Label = 'Store 2 Label';
116116
$store1LabelUpdated = 'Store 1 Label Updated';
117117

118-
// First, create an option with multiple store labels
118+
// First, create an option with multiple store labels and add the option
119119
$initialOptionData = [
120120
AttributeOptionInterface::LABEL => $attributeLabel,
121121
AttributeOptionInterface::STORE_LABELS => [
@@ -129,8 +129,6 @@ public function testUpdateMultistorePreservingOtherStoreLabel()
129129
],
130130
],
131131
];
132-
133-
// Add the option first
134132
$newOptionId = $this->webApiCallAttributeOptions(
135133
$attributeCode,
136134
Request::HTTP_METHOD_POST,
@@ -153,7 +151,6 @@ public function testUpdateMultistorePreservingOtherStoreLabel()
153151
],
154152
],
155153
];
156-
157154
$response = $this->webApiCallAttributeOptions(
158155
$attributeCode,
159156
Request::HTTP_METHOD_PUT,
@@ -167,8 +164,6 @@ public function testUpdateMultistorePreservingOtherStoreLabel()
167164
);
168165
$this->assertTrue($response, 'Update should be successful');
169166

170-
// Test store labels preservation by checking labels in different store contexts
171-
// This verifies that the fix for preserving store labels is working correctly
172167
$store1Options = $this->getAttributeOptions($attributeCode, $store1->getCode());
173168
$store2Options = $this->getAttributeOptions($attributeCode, $store2->getCode());
174169

0 commit comments

Comments
 (0)