Skip to content

Commit 9f7c4e6

Browse files
committed
Refactoring NewProductsListWidgetConfigurableProductTest
1 parent e22f98a commit 9f7c4e6

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/NewProductsListWidgetConfigurableProductTest.xml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,23 @@
8282
<argument name="productId" value="$$createConfigProduct.id$$"/>
8383
</actionGroup>
8484
<waitForPageLoad stepKey="waitForEditPage"/>
85-
<fillField selector="{{AdminProductFormSection.setProductAsNewFrom}}" userInput="01/1/2000" stepKey="fillProductNewFrom"/>
86-
<fillField selector="{{AdminProductFormSection.setProductAsNewTo}}" userInput="01/1/2099" stepKey="fillProductNewTo"/>
85+
<actionGroup ref="AdminSetProductAsNewDateActionGroup" stepKey="fillProductNewFrom">
86+
<argument name="fromDate" value="01/1/2000"/>
87+
<argument name="toDate" value="01/1/2099"/>
88+
</actionGroup>
89+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductNewTo"/>
8790
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveProduct"/>
8891

8992
<!-- If PageCache is enabled, Cache clearing happens here, via merge -->
9093

9194
<!-- Check for product on the CMS page with the New Products widget -->
92-
<amOnPage url="{{_newDefaultCmsPage.identifier}}" stepKey="amOnCmsPage"/>
93-
<waitForPageLoad stepKey="waitForCmsPage"/>
94-
<see selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" userInput="$$createConfigProduct.name$$" stepKey="seeProductName"/>
95+
<actionGroup ref="StorefrontGoToCMSPageActionGroup" stepKey="amOnCmsPage">
96+
<argument name="identifier" value="{{_newDefaultCmsPage.identifier}}"/>
97+
</actionGroup>
98+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForCmsPage"/>
99+
<actionGroup ref="AssertStorefrontProductIsShownOnCmsPageActionGroup" stepKey="seeProductName">
100+
<argument name="cmsTitle" value="{{_newDefaultCmsPage.title}}"/>
101+
<argument name="productName" value="$$createConfigProduct.name$$"/>
102+
</actionGroup>
95103
</test>
96104
</tests>

0 commit comments

Comments
 (0)