Skip to content

Commit

Permalink
ENGCOM-7789: [MFTF] Use action group for QuickSearch #29002
Browse files Browse the repository at this point in the history
 - Merge Pull Request #29002 from Usik2203/magento2:mftf-search-use-action-group
 - Merged commits:
   1. b717f1b
  • Loading branch information
magento-engcom-team committed Jul 13, 2020
2 parents 0516c8b + b717f1b commit 1de60e9
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@
<amOnPage url="{{StorefrontProductPage.url($$createDynamicBundleProduct.name$$)}}" stepKey="amOnBundleProductPage"/>
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
<!-- Search for the product by sku -->
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createDynamicBundleProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
<waitForPageLoad stepKey="waitForSearchButton"/>
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
<waitForPageLoad stepKey="waitForSearchResults"/>
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchByCreatedTerm">
<argument name="query" value="$$createDynamicBundleProduct.sku$$"/>
</actionGroup>
<!-- Should not see any search results -->
<dontSee userInput="$$createDynamicBundleProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@
<amOnPage url="{{StorefrontProductPage.url($$createFixedBundleProduct.name$$)}}" stepKey="amOnBundleProductPage"/>
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
<!-- Search for the product by sku -->
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createFixedBundleProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
<waitForPageLoad stepKey="waitForSearchButton"/>
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
<waitForPageLoad stepKey="waitForSearchResults"/>
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchByCreatedTerm">
<argument name="query" value="$$createFixedBundleProduct.sku$$"/>
</actionGroup>
<!-- Should not see any search results -->
<dontSee userInput="$$createFixedBundleProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@
<amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.name$$)}}" stepKey="amOnSimpleProductPage"/>
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
<!-- Search for the product by sku -->
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createSimpleProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
<waitForPageLoad stepKey="waitForSearchButton"/>
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
<waitForPageLoad stepKey="waitForSearchResults"/>
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchByCreatedTerm">
<argument name="query" value="$$createSimpleProduct.sku$$"/>
</actionGroup>
<!-- Should not see any search results -->
<dontSee userInput="$$createSimpleProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@
<amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.name$$)}}" stepKey="amOnSimpleProductPage"/>
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
<!-- Search for the product by sku -->
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createSimpleProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
<waitForPageLoad stepKey="waitForSearchButton"/>
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
<waitForPageLoad stepKey="waitForSearchResults"/>
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchByCreatedTerm">
<argument name="query" value="$$createSimpleProduct.sku$$"/>
</actionGroup>
<!-- Should not see any search results -->
<dontSee userInput="$$createSimpleProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@
<amOnPage url="{{StorefrontProductPage.url($$createVirtualProduct.name$$)}}" stepKey="amOnVirtualProductPage"/>
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
<!-- Search for the product by sku -->
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createVirtualProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
<waitForPageLoad stepKey="waitForSearchButton"/>
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
<waitForPageLoad stepKey="waitForSearchResults"/>
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchByCreatedTerm">
<argument name="query" value="$$createVirtualProduct.sku$$"/>
</actionGroup>
<!-- Should not see any search results -->
<dontSee userInput="$$createVirtualProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@
<amOnPage url="{{StorefrontProductPage.url($$createConfigurableProduct.name$$)}}" stepKey="amOnConfigurableProductPage"/>
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
<!-- Search for the product by sku -->
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createConfigurableProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
<waitForPageLoad stepKey="waitForSearchButton"/>
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
<waitForPageLoad stepKey="waitForSearchResults"/>
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchBarByProductSku">
<argument name="query" value="$$createConfigurableProduct.sku$$"/>
</actionGroup>
<!-- Should not see any search results -->
<dontSee userInput="$$createConfigurableProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@
<amOnPage url="{{StorefrontProductPage.url($$createDownloadableProduct.name$$)}}" stepKey="amOnDownloadableProductPage"/>
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
<!-- Search for the product by sku -->
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createDownloadableProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
<waitForPageLoad stepKey="waitForSearchButton"/>
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
<waitForPageLoad stepKey="waitForSearchResults"/>
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchByCreatedTerm">
<argument name="query" value="$$createDownloadableProduct.sku$$"/>
</actionGroup>
<!-- Should not see any search results -->
<dontSee userInput="$$createDownloadableProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@
<amOnPage url="{{StorefrontProductPage.url($$createGroupedProduct.name$$)}}" stepKey="amOnGroupedProductPage"/>
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoops"/>
<!--Search for the product by sku-->
<fillField selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="$$createGroupedProduct.sku$$" stepKey="fillSearchBarByProductSku"/>
<waitForPageLoad stepKey="waitForSearchButton"/>
<click selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="clickSearchButton"/>
<waitForPageLoad stepKey="waitForSearchResults"/>
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchByCreatedTerm">
<argument name="query" value="$$createGroupedProduct.sku$$"/>
</actionGroup>
<!-- Should not see any search results -->
<dontSee userInput="$$createGroupedProduct.sku$$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
<see selector="{{StorefrontCatalogSearchMainSection.message}}" userInput="Your search returned no results." stepKey="seeCantFindProductOneMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
<fillField stepKey="fillSearchField" selector="{{StorefrontQuickSearchSection.searchPhrase}}" userInput="{{query}}"/>
<waitForElementVisible selector="{{StorefrontQuickSearchSection.searchButton}}" stepKey="waitForSubmitButton"/>
<click stepKey="clickSearchButton" selector="{{StorefrontQuickSearchSection.searchButton}}"/>
<waitForPageLoad stepKey="waitForSearchResults"/>
</actionGroup>
</actionGroups>

0 comments on commit 1de60e9

Please sign in to comment.