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] Use ActionGroup to open products grid page #27697

Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -31,8 +31,7 @@
</after>

<!-- Create a bundle product -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageBundle"/>
<waitForPageLoad stepKey="waitForProductPageLoadBundle"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="visitAdminProductPageBundle"/>
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateBundleProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
</after>

<!-- Create a bundle product -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageBundle"/>
<waitForPageLoad stepKey="waitForProductPageLoadBundle"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="visitAdminProductPageBundle"/>
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateBundleProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
</after>

<!-- Create a bundle product -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageBundle"/>
<waitForPageLoad stepKey="waitForProductPageLoadBundle"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="visitAdminProductPageBundle"/>
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateBundleProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@
<seeElement stepKey="LookingForNameOfProduct" selector="{{StorefrontBundledSection.bundleProductName}}"/>

<!--Testing disabled view-->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="GoToProductCatalog"/>
<waitForPageLoad stepKey="WaitForCatalogProductPageToLoad"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="GoToProductCatalog"/>
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="FindProductEditPage">
<argument name="product" value="BundleProduct"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@

<!-- Create a product to appear in the widget, fill in basic info first -->

<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="amOnProductList"/>
<waitForPageLoad stepKey="waitForProductList"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="amOnProductList"/>
<click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickAddProductToggle"/>
<click selector="{{AdminProductGridActionSection.addBundleProduct}}" stepKey="clickAddBundleProduct"/>
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{_defaultProduct.name}}" stepKey="fillProductName"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
</after>

<!-- Start creating a bundle product -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductList"/>
<waitForPageLoad stepKey="waitForProductList"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goToProductList"/>
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
</after>

<!-- Create a bundle product -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageBundle"/>
<waitForPageLoad stepKey="waitForProductPageLoadBundle"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="visitAdminProductPageBundle"/>
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateBundleProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
Expand Down Expand Up @@ -85,8 +84,7 @@
<grabTextFrom selector="{{CheckoutCartProductSection.nthBundleOptionName('1')}}" stepKey="grabTotalBefore"/>

<!-- Find the product that we just created using the product grid -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/>
<waitForPageLoad stepKey="waitForAdminProductPageLoad"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="visitAdminProductPage"/>
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/>
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="findCreatedProduct">
<argument name="product" value="BundleProduct"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
</after>

<!-- Start creating a bundle product -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductList"/>
<waitForPageLoad stepKey="waitForProductList"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goToProductList"/>
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
</after>

<!-- Start creating a bundle product -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductList"/>
<waitForPageLoad stepKey="waitForProductList"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goToProductList"/>
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
</after>

<!-- Start creating a bundle product -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductList"/>
<waitForPageLoad stepKey="waitForProductList"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="goToProductList"/>
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
</after>

<!-- Create a bundle product -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageBundle"/>
<waitForPageLoad stepKey="waitForProductPageLoadBundle"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="visitAdminProductPageBundle"/>
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateBundleProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminOpenProductIndexPageActionGroup">
<annotations>
<description>Go to products grid page.</description>
</annotations>
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="goToProductIndexPage"/>
<waitForPageLoad stepKey="waitForProductIndexPageLoad"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
</after>

<!--Create product-->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
<waitForPageLoad stepKey="waitForProductIndexPage"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/>
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateSimpleProduct">
<argument name="product" value="SimpleProduct3"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
</after>

<!--Create product-->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
<waitForPageLoad stepKey="waitForProductIndexPage"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/>
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct">
<argument name="product" value="defaultVirtualProduct"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
</after>

<!-- Create product -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="adminProductIndexPageAdd"/>
<waitForPageLoad stepKey="waitForProductIndexPageLoad"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="adminProductIndexPageAdd"/>
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/>
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProductPage">
<argument name="product" value="ApiSimpleProduct"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<!--Open Product Index Page and filter the product-->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
<waitForPageLoad stepKey="waitForProductIndexPageToLoad"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProduct">
<argument name="product" value="SimpleProduct"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
<deleteData createDataKey="createSimpleUSCustomer" stepKey="deleteCustomer"/>
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex1"/>
<waitForPageLoad time="30" stepKey="waitForProductIndexPageLoad"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex1"/>
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetGridToDefaultKeywordSearch"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
</after>
Expand Down Expand Up @@ -69,8 +68,7 @@
<seeElement selector="{{StorefrontCategoryProductSection.productPriceLabel('Regular Price')}}" stepKey="assertRegularPriceLabel_2"/>
<seeElement selector="{{StorefrontCategoryProductSection.productPriceOld('100')}}" stepKey="assertRegularPriceAmount_2"/>
<!--Case: Tier Price for General Customer Group-->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex2"/>
<waitForPageLoad time="30" stepKey="waitForProductPageToLoad1"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex2"/>
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct2">
<argument name="product" value="$$createSimpleProduct$$"/>
</actionGroup>
Expand All @@ -94,8 +92,7 @@
<seeElement selector="{{StorefrontCategoryProductSection.productPriceLabel('Regular Price')}}" stepKey="assertRegularPriceLabel_4"/>
<seeElement selector="{{StorefrontCategoryProductSection.productPriceOld('100')}}" stepKey="assertRegularPriceAmount_3"/>
<!--Case: Tier Price applied if Product quantity meets Tier Price Condition-->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex3"/>
<waitForPageLoad time="30" stepKey="waitForProductPageToLoad2"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex3"/>
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct3">
<argument name="product" value="$$createSimpleProduct$$"/>
</actionGroup>
Expand Down Expand Up @@ -160,8 +157,7 @@
<actualResult type="variable">grabTextFromSubtotalField3</actualResult>
</assertEquals>
<!--Tier Price is changed in Shopping Cart and is changed on Product page if Tier Price parameters are changed in Admin-->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex4"/>
<waitForPageLoad time="30" stepKey="waitForProductPageToLoa4"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex4"/>
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct4">
<argument name="product" value="$$createSimpleProduct$$"/>
</actionGroup>
Expand Down Expand Up @@ -228,8 +224,7 @@
<seeElement selector="{{StorefrontProductInfoMainSection.productTierPriceAmount('2', '75')}}" stepKey="assertProductTierPriceAmountForSecondRow2"/>
<seeElement selector="{{StorefrontProductInfoMainSection.productTierPriceSavePercentageAmount('1', '10')}}" stepKey="assertProductTierPriceSavePercentageAmountForFirstRow2"/>
<seeElement selector="{{StorefrontProductInfoMainSection.productTierPriceSavePercentageAmount('2', '25')}}" stepKey="assertProductTierPriceSavePercentageAmountForSecondRow2"/>
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex5"/>
<waitForPageLoad time="30" stepKey="waitForProductPageToLoad3"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex5"/>
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct5">
<argument name="product" value="$$createSimpleProduct$$"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
<after>
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
<waitForPageLoad time="30" stepKey="waitForProductIndexPageLoad"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetGridToDefaultKeywordSearch"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
</after>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@
<see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$$createConfigChildProduct3.price$$" stepKey="seeChildProduct3PriceInStoreFront"/>

<!-- Open Product Index Page and Filter First Child product -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
<waitForPageLoad stepKey="waitForProductIndexPageToLoad"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProduct">
<argument name="product" value="ApiSimpleOne"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<!--Open Product Index Page and filter the product-->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
<waitForPageLoad stepKey="waitForProductIndexPageToLoad"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProduct">
<argument name="product" value="SimpleProduct"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
<magentoCLI stepKey="setDisplayOutOfStockProduct" command="config:set cataloginventory/options/show_out_of_stock 0" />
</after>
<!--Open Product Index Page and filter the product-->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
<waitForPageLoad stepKey="waitForProductIndexPageToLoad"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProduct">
<argument name="product" value="SimpleProduct"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@
<see userInput="$$createProductAttribute.attribute_code$$" selector="{{AdminProductAttributeSetEditSection.groupTree}}" stepKey="seeAttributeInGroup2"/>

<!-- Assert attribute can be used in product creation -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToCatalogProductGrid"/>
<waitForPageLoad stepKey="waitForPageLoad3"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToCatalogProductGrid"/>
<click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickAddProductDropdown"/>
<click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="clickAddSimpleProduct"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
</after>

<!-- Find the product that we just created using the product grid and go to its page-->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/>
<waitForPageLoad stepKey="waitForAdminProductGridLoad"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="visitAdminProductPage"/>
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/>
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="findCreatedProduct">
<argument name="product" value="SimpleTwo"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
<actionGroup ref="NavigateToAndResetProductGridToDefaultViewActionGroup" stepKey="NavigateToAndResetProductGridToDefaultView"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
</after>
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="amOnProductList"/>
<waitForPageLoad stepKey="waitForProductList"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="amOnProductList"/>
<!--Create Default Product-->
<click selector="{{AdminProductGridActionSection.addProductBtn}}" stepKey="clickAddDefaultProduct"/>
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="fillDefaultProductName"/>
Expand All @@ -45,8 +44,7 @@
<waitForPageLoad stepKey="waitForPDefaultProductSaved"/>
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="successMessageYouSavedTheProductIsShown"/>
<!--Create product with grid filter Not Visible Individually-->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="ProductList"/>
<waitForPageLoad stepKey="waitForProductPage"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="ProductList"/>
<click selector="{{AdminProductGridActionSection.addProductBtn}}" stepKey="clickAddFilterProduct"/>
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{defaultSimpleProduct.name}}" stepKey="fillProductName"/>
<fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{defaultSimpleProduct.sku}}" stepKey="fillProductSku"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
</after>

<!-- Open Product Index Page-->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
<waitForPageLoad stepKey="waitForProductIndexPageToLoad"/>
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>

<!-- Select Created Product-->
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProductGridBySku">
Expand Down
Loading