Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MFTF] using StorefrontOpenHomePageActionGroup for navigation to Home Page #27526

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@
<magentoCron stepKey="runCronReindex" groups="index"/>

<!--Go to category page-->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToHomePage"/>
<waitForPageLoad stepKey="waitForHomePageToload"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleSubCategory.name)}}" stepKey="cartClickCategory"/>

<!--Check in grid view-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<deleteData createDataKey="createSimpleProductTwo" stepKey="createSimpleProductTwo"/>
</after>
<!-- 1. Go to storefront home page -->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefrontPage"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
<!-- 2. Fill quick search bar with test values unique for dynamic bundle product and click search -->
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchDynamic">
<argument name="phrase" value="Dynamic"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/>

<!--Go to category page-->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToHomePage"/>
<waitForPageLoad stepKey="waitForHomePageToload"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="cartClickCategory"/>

<!--Click add to cart-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@
<seeOptionIsSelected selector="{{AdminProductAttributesSection.attributeDropdownByCode($createMultiSelectProductAttribute.attribute_code$)}}" userInput="$addThirdOptionToAttribute.option[store_labels][0][label]$" stepKey="assertThirdOptionIsSelected"/>

<!-- Search for the product on Storefront -->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToHomePage"/>
<waitForPageLoad stepKey="waitForHomePageLoad"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
<actionGroup ref="StorefrontCheckQuickSearchActionGroup" stepKey="searchProductOnStorefront">
<argument name="phrase" value="$createSimpleProduct.name$"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="clickOkOnModalDialog1"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout1"/>
<!--Go to storefront and verify created subcategory on frontend-->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefrontPage"/>
<waitForPageLoad stepKey="waitForPageAdminSystemStoreLoad2"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
<actionGroup ref="CheckCategoryOnStorefrontActionGroup" stepKey="checkCreatedSubcategory1OnFrontend">
<argument name="categoryEntity" value="SimpleSubCategory"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@
<magentoCLI command="cache:flush" stepKey="flushCache"/>

<!-- Verify customer see created virtual product with tier price(from above step) on storefront page and is searchable by sku -->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefront"/>
<waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="{{virtualProductBigQty.sku}}" stepKey="fillVirtualProductName"/>
<waitForPageLoad stepKey="waitForSearchTextBox"/>
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextBoxButton"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@
<argument name="parentCategory" value="$simpleSubCategoryTwo.name$"/>
</actionGroup>
<!--Verify that navigation menu categories level is correct-->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStorefrontPage1"/>
<waitForPageLoad stepKey="waitForPageToLoadAfterHomePageOpened1"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage1"/>
<seeElement selector="{{StorefrontNavigationSection.topCategory($simpleSubCategoryTwo.name$)}}" stepKey="verifyThatTopCategoryIsSubCategoryTwo"/>
<moveMouseOver selector="{{StorefrontNavigationSection.topCategory($simpleSubCategoryTwo.name$)}}" stepKey="mouseOverSubCategoryTwo"/>
<waitForAjaxLoad stepKey="waitForAjaxOnMouseOverSubCategoryTwo"/>
Expand Down Expand Up @@ -97,8 +96,7 @@
<argument name="parentCategory" value="Default Category"/>
</actionGroup>
<!--Verify that navigation menu categories level is correct-->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStorefrontPage2"/>
<waitForPageLoad stepKey="waitForPageToLoadAfterHomePageOpened2"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage2"/>
<seeElement selector="{{StorefrontNavigationSection.topCategory($simpleSubCategoryOne.name$)}}" stepKey="verifyThatSubCategoryOneIsTopCategory"/>
<seeElement selector="{{StorefrontNavigationSection.topCategory($simpleSubCategoryTwo.name$)}}" stepKey="verifyThatSubCategoryTwoIsTopCategory"/>
<moveMouseOver selector="{{StorefrontNavigationSection.topCategory($simpleSubCategoryOne.name$)}}" stepKey="mouseOverTopSubCategoryOne"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>

<!-- Open frontend -->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="onFrontend"/>
<waitForPageLoad stepKey="waitForStorefrontPageLoad"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="onFrontend"/>

<!-- Open <Cat2> from navigation menu -->
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createSecondCategory.name$$)}}" stepKey="openCat2"/>
Expand Down Expand Up @@ -192,8 +191,7 @@
<magentoCLI command="cron:run" stepKey="runCron2"/>

<!-- Open frontend -->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="onFrontendPage"/>
<waitForPageLoad stepKey="waitForFrontPageLoad"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="onFrontendPage"/>

<!-- Open <Cat2> from navigation menu -->
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createSecondCategory.name$$)}}" stepKey="openSecondCategory"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<executeJS function="return '$createSimpleProductSecond.name$'.toLowerCase();" stepKey="simpleProductSecondNameLower" />

<!-- Make assertions on frontend -->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefrontPage"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($createCategory.name$)}}" stepKey="onCategoryPage"/>
<seeInCurrentUrl url="{$categoryNameLower}.html" stepKey="checkCategryUrlKey"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@
<click selector="{{AdminCategoryModalSection.ok}}" stepKey="acceptModal1"/>
<waitForElementVisible selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="waitForPageReloadAfterDeleteDefaultCategory"/>
<!-- Verify categories 1 and 3 their products. -->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage"/>
<waitForPageLoad stepKey="homeWaitForPageLoad"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>

<!-- @TODO: Uncomment commented below code after MQE-903 is fixed -->
<!--<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategoryC.name$$)}}" stepKey="browseClickCategoryC"/>-->
Expand Down Expand Up @@ -132,8 +131,7 @@
<argument name="categoryEntity" value="$$createCategoryB$$"/>
</actionGroup>
<!-- Verify categories 1 and 3 are absent -->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage1"/>
<waitForPageLoad stepKey="waitHomePageLoadAfterDeletingCategories"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage1"/>
<dontSee selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategoryB.name$$)}}" stepKey="browseClickCategoryB"/>
<dontSee selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategoryC.name$$)}}" stepKey="browseClickCategoryC"/>
<!-- Verify products 1-3 are available on storefront -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@

<!-- Step 1: User browses catalog -->
<comment userInput="Start of browsing catalog" stepKey="startOfBrowsingCatalog"/>
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage"/>
<waitForPageLoad stepKey="homeWaitForPageLoad"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
<waitForElementVisible selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeWaitForWelcomeMessage"/>
<see userInput="Default welcome msg!" selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeCheckWelcome"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@

<!-- Step 1: User browses catalog -->
<comment userInput="Start of browsing catalog" stepKey="startOfBrowsingCatalog"/>
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage"/>
<waitForPageLoad stepKey="homeWaitForPageLoad"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
<waitForElementVisible selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeWaitForWelcomeMessage"/>
<see userInput="Default welcome msg!" selector="{{StorefrontPanelHeaderSection.WelcomeMessage}}" stepKey="homeCheckWelcome"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@
<amOnPage url="{{StorefrontProductPage.url($createSimpleProduct2.name$)}}" stepKey="goToStoreOneProductPageTwo"/>
<amOnPage url="{{StorefrontProductPage.url($createSimpleProduct3.name$)}}" stepKey="goToStoreOneProductPageThree"/>
<!-- Go to Home Page -->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStoreFrontHomePage"/>
<waitForPageLoad time="30" stepKey="waitForHomeContentPageToLoad"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnStoreFrontHomePage"/>
<actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertStoreOneRecentlyViewedProduct2">
<argument name="productName" value="$$createSimpleProduct2.name$$"/>
<argument name="productPosition" value="2"/>
Expand All @@ -116,8 +115,7 @@
<amOnPage url="{{StorefrontProductPage.url($createSimpleProduct1.name$)}}" stepKey="goToStore2ProductPage1"/>
<amOnPage url="{{StorefrontProductPage.url($createSimpleProduct2.name$)}}" stepKey="goToStore2ProductPage2"/>
<!-- Go to Home Page -->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage2"/>
<waitForPageLoad time="30" stepKey="waitForStoreHomeContentPageToLoad"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnHomePage2"/>
<actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertNextStore1RecentlyViewedProduct1">
<argument name="productName" value="$$createSimpleProduct1.name$$"/>
<argument name="productPosition" value="2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,7 @@
<amOnPage url="{{StorefrontProductPage.url($createSimpleProduct2.name$)}}" stepKey="goToStore1ProductPage2"/>
<amOnPage url="{{StorefrontProductPage.url($createSimpleProduct3.name$)}}" stepKey="goToStore1ProductPage3"/>
<!-- Go to Home Page -->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage"/>
<waitForPageLoad time="30" stepKey="homeWaitForPageLoad"/>

<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnHomePage"/>
<actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertStore1RecentlyViewedProduct2">
<argument name="productName" value="$$createSimpleProduct2.name$$"/>
<argument name="productPosition" value="2"/>
Expand All @@ -116,9 +114,7 @@
<amOnPage url="{{StorefrontProductPage.url($createSimpleProduct2.name$)}}" stepKey="goToStore2ProductPage2"/>

<!-- Go to Home Page -->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStoreViewHomePage"/>
<waitForPageLoad time="30" stepKey="homePageWaitForStoreView"/>

<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnStoreViewHomePage"/>
<actionGroup ref="AssertSeeProductDetailsOnStorefrontRecentlyViewedWidgetActionGroup" stepKey="assertNextStore1RecentlyViewedProduct1">
<argument name="productName" value="$$createSimpleProduct1.name$$"/>
<argument name="productPosition" value="2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@
</after>
<!--Open Storefront home page-->
<comment userInput="Open Storefront home page" stepKey="openStorefrontHomePage"/>
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefrontHomePage"/>
<waitForPageLoad stepKey="waitForSimpleProductPage"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontHomePage"/>
<!--Click on first category-->
<comment userInput="Click on first category" stepKey="openFirstCategoryPage"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree($$category1.name$$)}}" stepKey="clickCategory1Name"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<deleteData createDataKey="category2" stepKey="deleteCategory2"/>
<deleteData createDataKey="category1" stepKey="deleteCategory1"/>
</after>
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStorefrontPage"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnStorefrontPage"/>
<moveMouseOver
selector="{{StorefrontHeaderSection.NavigationCategoryByName($$category1.name$$)}}"
stepKey="hoverCategoryLevelOne"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@

<!-- Switch to FR Store View Storefront -->

<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnProduct4Page"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnProduct4Page"/>

<actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="switchStore">
<argument name="storeView" value="customStoreFR"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
<argument name="categoryEntity" value="SubCategoryWithParent"/>
</actionGroup>
<!--Go to storefront and verify visibility of categories-->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefrontPage"/>
<waitForPageLoad stepKey="waitForPageLoad2"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage"/>
<seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleSubCategory.name)}}" stepKey="seeSimpleSubCategoryOnStorefront1"/>
<dontSeeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(SubCategoryWithParent.name)}}" stepKey="dontSeeSubCategoryWithParentOnStorefront1"/>
<!--Set Include in menu to No on created category under Default Category -->
Expand All @@ -53,8 +52,7 @@
<seeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="seeCheckboxEnableCategoryIsChecked"/>
<dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.IncludeInMenu}}" stepKey="dontSeeCheckboxIncludeInMenuIsChecked"/>
<!--Go to storefront and verify visibility of categories-->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefrontPage2"/>
<waitForPageLoad stepKey="waitForPageLoad4"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage2"/>
<dontSeeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleSubCategory.name)}}" stepKey="dontSeeSimpleSubCategoryOnStorefront1"/>
<dontSeeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(SubCategoryWithParent.name)}}" stepKey="dontSeeSubCategoryWithParentOnStorefront2"/>
<!--Set Enable category to No and Include in menu to Yes on created category under Default Category -->
Expand All @@ -67,8 +65,7 @@
<dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="dontSeeCheckboxEnableCategoryIsChecked"/>
<seeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.IncludeInMenu}}" stepKey="seeCheckboxIncludeInMenuIsChecked"/>
<!--Go to storefront and verify visibility of categories-->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefrontPage3"/>
<waitForPageLoad stepKey="waitForPageLoad6"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage3"/>
<dontSeeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleSubCategory.name)}}" stepKey="dontSeeSimpleSubCategoryOnStorefront2"/>
<dontSeeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(SubCategoryWithParent.name)}}" stepKey="dontSeeSubCategoryWithParentOnStorefront3"/>
<!--Set Enable category to No and Include in menu to No on created category under Default Category -->
Expand All @@ -80,8 +77,7 @@
<dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="dontSeeCheckboxEnableCategoryIsChecked2"/>
<dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.IncludeInMenu}}" stepKey="dontSeeCheckboxIncludeInMenuIsChecked2"/>
<!--Go to storefront and verify visibility of categories-->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToStorefrontPage4"/>
<waitForPageLoad stepKey="waitForPageLoad8"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStorefrontPage4"/>
<dontSeeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleSubCategory.name)}}" stepKey="dontSeeSimpleSubCategoryOnStorefront3"/>
<dontSeeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(SubCategoryWithParent.name)}}" stepKey="dontSeeSubCategoryWithParentOnStorefront4"/>
</test>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
</actionGroup>

<!-- Go to storefront -->
<amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnStorefrontPage"/>
<waitForPageLoad stepKey="waitForPageLoad"/>
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="amOnStorefrontPage"/>

<!-- Assert created search term on storefront -->
<actionGroup ref="AssertSearchTermOnFrontendActionGroup" stepKey="assertCreatedSearchTermOnFrontend">
Expand Down
Loading