Skip to content

Commit

Permalink
magento#31251: [MFTF] Refactoring of Search actions on Storefront.
Browse files Browse the repository at this point in the history
  • Loading branch information
engcom-Foxtrot committed Dec 21, 2020
1 parent 631dc30 commit 784d4fa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchResultToLoad"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/>
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProductNameInCategoryPage">
<argument name="productName" value="{{SimpleProduct.name}}"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,18 @@
</assertEquals>

<!--Verify customer see updated simple product link on magento storefront page and is searchable by sku -->
<amOnPage url="{{StorefrontProductPage.url(simpleProductRegularPrice245InStock.urlKey)}}" stepKey="fillSimpleProductSkuInSearchTextBox"/>
<amOnPage url="{{StorefrontProductPage.url(simpleProductRegularPrice245InStock.urlKey)}}" stepKey="goToMagentoStorefrontPage"/>
<waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/>
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillAttribute">
<argument name="phrase" value="{{simpleProductRegularPrice245InStock.sku}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillSimpleProductSkuInSearchTextBox"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/>
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeSimpleProductNameOnStorefrontPage">
<argument name="productName" value="{{simpleProductRegularPrice245InStock.name}}"/>
</actionGroup>

</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
</actionGroup>
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickFirstRowToOpenDefaultSimpleProduct"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitUntilProductIsOpened"/>
<!-- <click selector="{{AdminProductGridFilterSection.nthRow('1')}}" stepKey="clickFirstRowToOpenDefaultSimpleProduct"/>
<waitForPageLoad stepKey="waitUntilProductIsOpened"/> -->

<!-- Update simple product with regular price(in stock) -->
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{simpleProductRegularPrice32501InStock.name}}" stepKey="fillSimpleProductName"/>
Expand Down Expand Up @@ -78,8 +76,6 @@
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFiltersButton"/>
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickFirstRowToVerifyUpdatedSimpleProductVisibleInGrid"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitUntilSimpleProductPageIsOpened"/>
<!-- <click selector="{{AdminProductGridFilterSection.nthRow('1')}}" stepKey="clickFirstRowToVerifyUpdatedSimpleProductVisibleInGrid"/>
<waitForPageLoad stepKey="waitUntilSimpleProductPageIsOpened"/> -->

<!-- Verify customer see updated simple product in the product form page -->
<seeInField selector="{{AdminProductFormSection.productName}}" userInput="{{simpleProductRegularPrice32501InStock.name}}" stepKey="seeSimpleProductName"/>
Expand Down Expand Up @@ -109,6 +105,7 @@
<!-- Verify customer see updated simple product (from the above step) on the storefront page -->
<amOnPage url="{{StorefrontProductPage.url(simpleProductRegularPrice32501InStock.urlKey)}}" stepKey="goToProductPage"/>
<waitForPageLoad stepKey="waitForStorefrontProductPageLoad"/>

<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{simpleProductRegularPrice32501InStock.name}}" stepKey="seeSimpleProductNameOnStoreFrontPage"/>
<see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="{{simpleProductRegularPrice32501InStock.price}}" stepKey="seeSimpleProductPriceOnStoreFrontPage"/>
<actionGroup ref="StorefrontAssertProductSkuOnProductPageActionGroup" stepKey="seeProductSku">
Expand All @@ -128,7 +125,7 @@
<!--Verify customer don't see updated simple product link on magento storefront page and is searchable by sku -->
<amOnPage url="{{StorefrontProductPage.url(simpleProductRegularPrice32501InStock.urlKey)}}" stepKey="goToMagentoStorefrontPage"/>
<waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/>
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillSimpleProductSkuInSearchTextBo">
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillSimpleProductSkuInSearchTextBox">
<argument name="phrase" value="{{simpleProductRegularPrice32501InStock.sku}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<!-- Verify customer don't see updated virtual product link on storefront page and is searchable by sku -->
<amOnPage url="{{StorefrontProductPage.url(updateVirtualProductRegularPrice.urlKey)}}" stepKey="goToProductPage"/>
<waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/>
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillVirtualProductSkuOnStorefrontPagee">
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillVirtualProductSkuOnStorefrontPage">
<argument name="phrase" value="{{updateVirtualProductRegularPrice.sku}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
Expand Down

0 comments on commit 784d4fa

Please sign in to comment.