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: Extract Action Groups to separate files - magento/module-catalog #25854

Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<comment userInput="Add product to the shopping cart" stepKey="addProductToCart"/>
<amOnPage url="{{StorefrontProductPage.url($$createProduct.custom_attributes[url_key]$$)}}" stepKey="navigateToSimpleProductPage"/>
<waitForPageLoad stepKey="waitForProductPageLoad"/>
<actionGroup ref="addToCartFromStorefrontProductPage" stepKey="addToCartFromStorefrontProductPage">
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
<argument name="productName" value="$$createProduct.name$$"/>
</actionGroup>
<!--Go to Checkout-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<!--Adding Special price to product-->
<amOnPage url="{{AdminProductEditPage.url($$simpleProduct.id$$)}}" stepKey="openAdminProductEditPage"/>
<actionGroup ref="AddSpecialPriceToProductActionGroup" stepKey="addSpecialPrice"/>
<actionGroup ref="saveProductForm" stepKey="saveProductForm"/>
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/>

<!--Create New Order-->
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrderWithExistingCustomer">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProductsToBundle"/>
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToOption"/>
<waitForPageLoad stepKey="waitForPageLoadAfterBundleProducts"/>
<actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions">
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions">
<argument name="product" value="$$simpleProduct0$$"/>
</actionGroup>
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/>
<actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions2">
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions2">
<argument name="product" value="$$simpleProduct1$$"/>
</actionGroup>
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/>
Expand Down Expand Up @@ -91,7 +91,7 @@
<waitForPageLoad stepKey="WaitForPageToLoad"/>
<conditionalClick selector="{{AdminProductFiltersSection.filtersClear}}" dependentSelector="{{AdminProductFiltersSection.filtersClear}}" visible="true" stepKey="ClickOnButtonToRemoveFiltersIfPresent"/>
<waitForPageLoad stepKey="WaitForClear"/>
<actionGroup ref="filterProductGridByName" stepKey="filterBundleProductOptionsDownToName">
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="filterBundleProductOptionsDownToName">
<argument name="product" value="BundleProduct"/>
</actionGroup>
<click selector="{{AdminProductFormBundleSection.addOptions}}" stepKey="clickOnBundleProductToEdit"/>
Expand All @@ -103,11 +103,11 @@
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProductsToNewBundle"/>
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToNewOption"/>
<waitForPageLoad stepKey="waitForPageLoadAfterNewBundleProducts"/>
<actionGroup ref="filterProductGridBySku" stepKey="filterNewBundleProductOptions">
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterNewBundleProductOptions">
<argument name="product" value="$$simpleProduct2$$"/>
</actionGroup>
<checkOption selector="//div[@class='admin__data-grid-outer-wrap']//tr[@data-repeat-index='0']//input[@type='checkbox']" stepKey="selectNewFirstGridRow"/>
<actionGroup ref="filterProductGridBySku" stepKey="filterNewBundleProductOptions2">
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterNewBundleProductOptions2">
<argument name="product" value="$$simpleProduct3$$"/>
</actionGroup>
<checkOption selector="{{AdminProductFormBundleSection.firstProductOption}}" stepKey="selectNewFirstGridRow2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<requiredEntity createDataKey="createSimpleProduct2"/>
</createData>
<amOnPage url="{{AdminProductEditPage.url($$createProduct.id$$)}}" stepKey="goToProductEditPage"/>
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
</before>
<after>
<!-- Delete created data -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
<!-- Create a bundle product -->
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageBundle"/>
<waitForPageLoad stepKey="waitForProductPageLoadBundle"/>
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateBundleProduct">
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateBundleProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>

<actionGroup ref="fillProductNameAndSkuInProductForm" stepKey="fillBundleProductNameAndSku">
<actionGroup ref="FillProductNameAndSkuInProductFormActionGroup" stepKey="fillBundleProductNameAndSku">
<argument name="product" value="BundleProduct"/>
</actionGroup>

Expand All @@ -51,11 +51,11 @@
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProductsToBundle"/>
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToOption"/>
<waitForPageLoad stepKey="waitForPageLoadAfterBundleProducts"/>
<actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions">
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions">
<argument name="product" value="$$simpleProduct1$$"/>
</actionGroup>
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/>
<actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions2">
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterBundleProductOptions2">
<argument name="product" value="$$simpleProduct2$$"/>
</actionGroup>
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/>
Expand All @@ -64,23 +64,23 @@
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty2"/>

<!-- Add image to product -->
<actionGroup ref="addProductImage" stepKey="addImageForProduct">
<actionGroup ref="AddProductImageActionGroup" stepKey="addImageForProduct">
<argument name="image" value="MagentoLogo"/>
</actionGroup>

<!--Save product-->
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>

<!-- Assert product image in admin product form -->
<actionGroup ref="assertProductImageAdminProductPage" stepKey="assertProductImageAdminProductPage"/>
<actionGroup ref="AssertProductImageAdminProductPageActionGroup" stepKey="assertProductImageAdminProductPage"/>

<!-- Assert product in storefront product page -->
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageActionGroup" stepKey="AssertProductInStorefrontProductPage">
<argument name="product" value="BundleProduct"/>
</actionGroup>

<!-- Assert product image in storefront product page -->
<actionGroup ref="assertProductImageStorefrontProductPage" stepKey="assertProductImageStorefrontProductPage">
<actionGroup ref="AssertProductImageStorefrontProductPageActionGroup" stepKey="assertProductImageStorefrontProductPage">
<argument name="product" value="BundleProduct"/>
<argument name="image" value="MagentoLogo"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@

<!-- Create a bundle product -->
<!-- Replacing steps in base AdminAddDefaultVideoSimpleProductTest -->
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage">
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProductPage">
<argument name="product" value="BundleProduct"/>
</actionGroup>
<actionGroup ref="fillProductNameAndSkuInProductForm" stepKey="fillMainProductForm">
<actionGroup ref="FillProductNameAndSkuInProductFormActionGroup" stepKey="fillMainProductForm">
<argument name="product" value="BundleProduct"/>
</actionGroup>

Expand All @@ -46,11 +46,11 @@
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProducts" after="selectOptionBundleTitle"/>
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProducts" after="waitForAddProducts"/>
<waitForPageLoad stepKey="waitForPageLoad" after="clickAddProducts"/>
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku1" after="waitForPageLoad">
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProductGridBySku1" after="waitForPageLoad">
<argument name="product" value="$$simpleProduct1$$"/>
</actionGroup>
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="checkOption1" after="filterProductGridBySku1"/>
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku2" after="checkOption1">
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProductGridBySku2" after="checkOption1">
<argument name="product" value="$$simpleProduct2$$"/>
</actionGroup>
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="checkOption2" after="filterProductGridBySku2"/>
Expand All @@ -59,7 +59,7 @@
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillQty2" before="saveProductForm"/>

<!-- Assert product in storefront product page -->
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPageActionGroup" stepKey="AssertProductInStorefrontProductPage">
<argument name="product" value="BundleProduct"/>
</actionGroup>
</test>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@
<argument name="websiteName" value="{{secondCustomWebsite.name}}"/>
</actionGroup>

<actionGroup ref="NavigateToAndResetProductGridToDefaultView" stepKey="resetProductGridFilter"/>
<actionGroup ref="NavigateToAndResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridFilter"/>

<!-- Admin logout -->
<actionGroup ref="logout" stepKey="adminLogout"/>
</after>

<!-- Open product page and assign grouped project to second website -->
<actionGroup ref="filterAndSelectProduct" stepKey="openAdminProductPage">
<actionGroup ref="FilterAndSelectProductActionGroup" stepKey="openAdminProductPage">
<argument name="productSku" value="$$createBundleProduct.sku$$"/>
</actionGroup>
<actionGroup ref="AdminAssignProductInWebsiteActionGroup" stepKey="assignProductToSecondWebsite">
Expand All @@ -95,15 +95,15 @@
<actionGroup ref="AdminUnassignProductInWebsiteActionGroup" stepKey="unassignProductFromDefaultWebsite">
<argument name="website" value="{{_defaultWebsite.name}}"/>
</actionGroup>
<actionGroup ref="saveProductForm" stepKey="saveGroupedProduct"/>
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveGroupedProduct"/>

<!-- Assert product is assigned to Second website -->
<actionGroup ref="AssertProductIsAssignedToWebsite" stepKey="seeCustomWebsiteIsChecked">
<actionGroup ref="AssertProductIsAssignedToWebsiteActionGroup" stepKey="seeCustomWebsiteIsChecked">
<argument name="website" value="{{secondCustomWebsite.name}}"/>
</actionGroup>

<!-- Assert product is not assigned to Main website -->
<actionGroup ref="AssertProductIsNotAssignedToWebsite" stepKey="seeMainWebsiteIsNotChecked">
<actionGroup ref="AssertProductIsNotAssignedToWebsiteActionGroup" stepKey="seeMainWebsiteIsNotChecked">
<argument name="website" value="{{_defaultWebsite.name}}"/>
</actionGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<!--Set filter to product name-->
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage"/>
<waitForPageLoad stepKey="WaitForPageToLoad"/>
<actionGroup ref="filterProductGridByName" stepKey="filterBundleProductOptionsDownToName">
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="filterBundleProductOptionsDownToName">
<argument name="product" value="BundleProduct"/>
</actionGroup>
<seeElement selector="{{AdminProductFiltersSection.attributeSetOfFirstRow(ProductAttributeFrontendLabel.label)}}" stepKey="seeAttributeSet"/>
Expand All @@ -77,7 +77,7 @@
<!--Set filter to product name-->
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="GoToCatalogProductPage2"/>
<waitForPageLoad stepKey="WaitForPageToLoad2"/>
<actionGroup ref="filterProductGridByName" stepKey="filterBundleProductOptionsDownToName2">
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="filterBundleProductOptionsDownToName2">
<argument name="product" value="BundleProduct"/>
</actionGroup>
<seeElement selector="{{AdminProductFiltersSection.attributeSetOfFirstRow(BundleProduct.defaultAttribute)}}" stepKey="seeAttributeSet2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/>
</after>
<!--Create attribute set-->
<actionGroup ref="CreateDefaultAttributeSet" stepKey="createDefaultAttributeSet">
<actionGroup ref="CreateDefaultAttributeSetActionGroup" stepKey="createDefaultAttributeSet">
<argument name="label" value="{{ProductAttributeFrontendLabel.label}}"/>
</actionGroup>

Expand Down Expand Up @@ -91,14 +91,14 @@
<seeOptionIsSelected selector="{{AdminProductFormBundleSection.countryOfManufactureDropDown}}" userInput="Italy" stepKey="seeCountryOfManufacture"/>

<!--Create second attribute set for edit-->
<actionGroup ref="CreateDefaultAttributeSet" stepKey="createSecondAttributeSet">
<actionGroup ref="CreateDefaultAttributeSetActionGroup" stepKey="createSecondAttributeSet">
<argument name="label" value="{{ProductAttributeFrontendLabelTwo.label}}"/>
</actionGroup>

<!--Filter catalog-->
<amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="goToCatalogProductPage"/>
<waitForPageLoad stepKey="WaitForPageToLoad"/>
<actionGroup ref="filterProductGridByName" stepKey="filterBundleProductOptionsDownToName">
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="filterBundleProductOptionsDownToName">
<argument name="product" value="BundleProduct"/>
</actionGroup>
<click selector="{{AdminProductFiltersSection.attributeSetOfFirstRow(ProductAttributeFrontendLabel.label)}}" stepKey="clickAttributeSet2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
</annotations>
<after>
<!-- Delete bundle product -->
<actionGroup ref="deleteProductUsingProductGrid" stepKey="deleteProduct">
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
</after>

<!-- Create product -->
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProduct">
<actionGroup ref="GoToCreateProductPageActionGroup" stepKey="goToCreateProduct">
<argument name="product" value="BundleProduct"/>
</actionGroup>
<actionGroup ref="fillProductNameAndSkuInProductForm" stepKey="fillProductForm">
<actionGroup ref="FillProductNameAndSkuInProductFormActionGroup" stepKey="fillProductForm">
<argument name="product" value="BundleProduct"/>
</actionGroup>

Expand Down
Loading