Skip to content

Commit 48162ef

Browse files
committed
Refactoring-AdminCreateAndEditVirtualProductSettingsTest
1 parent f550f19 commit 48162ef

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndEditVirtualProductSettingsTest.xml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,15 @@
128128
</actionGroup>
129129

130130
<!-- Edit Content to the product -->
131-
<scrollTo selector="{{AdminProductContentSection.sectionHeader}}" x="0" y="-100" stepKey="scrollToContentTab"/>
132-
<click selector="{{AdminProductContentSection.sectionHeader}}" stepKey="openContentTab"/>
133-
<fillField selector="{{AdminProductContentSection.descriptionTextArea}}" userInput="EDIT ~ {{ApiProductDescription.value}} ~ EDIT" stepKey="editLongDescription"/>
134-
<fillField selector="{{AdminProductContentSection.shortDescriptionTextArea}}" userInput="EDIT ~ {{ApiProductShortDescription.value}} ~ EDIT" stepKey="editShortDescription"/>
131+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="scrollToContentTab"/>
132+
<actionGroup ref="AdminOpenContentSectionOnProductPageActionGroup" stepKey="openContentTab"/>
133+
<actionGroup ref="AdminFillInProductDescriptionActionGroup" stepKey="editLongDescription">
134+
<argument name="description" value="EDIT ~ {{ApiProductDescription.value}} ~ EDIT"/>
135+
</actionGroup>
136+
<actionGroup ref="AdminFillInProductShortDescriptionActionGroup" stepKey="editShortDescription">
137+
<argument name="shortDescription" value="EDIT ~ {{ApiProductShortDescription.value}} ~ EDIT"/>
138+
</actionGroup>
139+
135140

136141
<!-- Edit product Search Engine Optimization settings -->
137142
<actionGroup ref="AdminChangeProductSEOSettingsActionGroup" stepKey="editProductSEOSettings">
@@ -170,13 +175,23 @@
170175
</actionGroup>
171176

172177
<!-- Assert three related products at the storefront -->
173-
<seeElement selector="{{StorefrontProductRelatedProductsSection.relatedProductName($$createThirdRelatedProduct.name$$)}}" stepKey="seeFirstRelatedProduct"/>
174-
<seeElement selector="{{StorefrontProductRelatedProductsSection.relatedProductName($$createSecondRelatedProduct.name$$)}}" stepKey="seeSecondRelatedProduct"/>
175-
<seeElement selector="{{StorefrontProductRelatedProductsSection.relatedProductName($$createThirdRelatedProduct.name$$)}}" stepKey="seeThirdRelatedProduct"/>
178+
<actionGroup ref="StorefrontAssertRelatedProductOnProductPageActionGroup" stepKey="seeFirstRelatedProduct">
179+
<argument name="productName" value="$$createThirdRelatedProduct.name$$"/>
180+
</actionGroup>
181+
<actionGroup ref="StorefrontAssertRelatedProductOnProductPageActionGroup" stepKey="seeSecondRelatedProduct">
182+
<argument name="productName" value="$$createSecondRelatedProduct.name$$"/>
183+
</actionGroup>
184+
<actionGroup ref="StorefrontAssertRelatedProductOnProductPageActionGroup" stepKey="seeThirdRelatedProduct">
185+
<argument name="productName" value="$$createThirdRelatedProduct.name$$"/>
186+
</actionGroup>
176187

177188
<!-- Assert product content -->
178-
<see selector="{{StorefrontProductInfoMainSection.productDescription}}" userInput="EDIT ~ {{ApiProductDescription.value}} ~ EDIT" stepKey="seeEditedLongDescriptionStorefront"/>
179-
<see selector="{{StorefrontProductInfoMainSection.productShortDescription}}" userInput="EDIT ~ {{ApiProductShortDescription.value}} ~ EDIT" stepKey="seeEditedShortDescriptionStorefront"/>
189+
<actionGroup ref="AssertStorefrontProductDescriptionActionGroup" stepKey="seeEditedLongDescriptionStorefront">
190+
<argument name="productDescription" value="EDIT ~ {{ApiProductDescription.value}} ~ EDIT"/>
191+
</actionGroup>
192+
<actionGroup ref="AssertStorefrontShortProductDescriptionActionGroup" stepKey="seeEditedShortDescriptionStorefront">
193+
<argument name="productShortDescription" value="EDIT ~ {{ApiProductShortDescription.value}} ~ EDIT"/>
194+
</actionGroup>
180195

181196
<!-- Assert product design settings "right bar is present at product page with 2 columns" -->
182197
<seeElement selector="{{StorefrontProductPageDesignSection.layoutTwoColumnsRight}}" stepKey="seeNewDesignChanges"/>

0 commit comments

Comments
 (0)