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 action group to click save button #28959

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
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminProductFormSaveButtonClickActionGroup">
<annotations>
<description>Click Save button of product form.</description>
</annotations>

<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForProductSaved"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
<click selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="clickOnSaveAttribute"/>
<waitForPageLoad stepKey="waitForAttributeToSave"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="saveTheProduct"/>
<waitForPageLoad stepKey="waitForProductToSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveTheProduct"/>
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/>

<!--Verify product attribute added in product form -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
<click selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="clickOnSaveAttribute"/>
<waitForPageLoad stepKey="waitForAttributeToSave"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="saveTheProduct"/>
<waitForPageLoad stepKey="waitForProductToSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveTheProduct"/>
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/>

<!--Run Re-Index task -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
<click selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="clickOnSaveAttribute"/>
<waitForPageLoad stepKey="waitForAttributeToSave"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="saveTheProduct"/>
<waitForPageLoad stepKey="waitForProductToSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveTheProduct"/>

<!--Verify product attribute added in product form and Is Required message displayed-->
<scrollTo selector="{{AdminProductFormSection.contentTab}}" stepKey="scrollToContentTab"/>
Expand All @@ -85,8 +84,7 @@
<!--Fill the Required field and save the product -->
<fillField selector="{{AdminProductFormSection.attributeRequiredInput(newProductAttribute.attribute_code)}}" userInput="attribute" stepKey="fillTheAttributeRequiredInputField"/>
<scrollToTopOfPage stepKey="scrollToTopOfProductFormPage"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="saveTheProduct1"/>
<waitForPageLoad stepKey="waitForProductToSave1"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="saveTheProduct1"/>
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
<fillField selector="{{AdminProductFormSection.productPrice}}" userInput="{{nameAndAttributeSkuMaskSimpleProduct.price}}" stepKey="fillSimpleProductPrice"/>
<fillField selector="{{AdminProductFormSection.productWeight}}" userInput="{{nameAndAttributeSkuMaskSimpleProduct.weight}}" stepKey="fillSimpleProductWeight"/>
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="{{nameAndAttributeSkuMaskSimpleProduct.quantity}}" stepKey="fillSimpleProductQuantity"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForSimpleProductToSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>
<!-- Verify customer see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{virtualProductWithRequiredFields.name}}" stepKey="fillProductName"/>
<fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{virtualProductWithRequiredFields.sku}}" stepKey="fillProductSku"/>
<fillField selector="{{AdminProductFormSection.productPrice}}" userInput="{{virtualProductWithRequiredFields.price}}" stepKey="fillProductPrice"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForVirtualProductSaved" />
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>

<!-- Verify we see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertVirtualProductSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSection"/>
<fillField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{virtualProductOutOfStock.urlKey}}" stepKey="fillUrlKey"/>
<scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForVirtualProductSaved"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>

<!-- Verify we see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertVirtualProductSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@
<selectOption selector="{{AdminProductCustomizableOptionsSection.clickSelectPriceType(virtualProductCustomizableOption4.title,'1')}}" userInput="{{virtualProductCustomizableOption4.option_1_price_type}}" stepKey="selectOptionPriceTypeForFourthDataSetSecondRow"/>
<fillField selector="{{AdminProductCustomizableOptionsSection.fillOptionValueSku(virtualProductCustomizableOption4.title,'1')}}" userInput="{{virtualProductCustomizableOption4.option_1_sku}}" stepKey="fillOptionSkuForFourthDataSetSecondRow"/>
<scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForVirtualProductSaved"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>

<!-- Verify we see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertVirtualProductSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSection"/>
<fillField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{virtualProductBigQty.urlKey}}" stepKey="fillUrlKey"/>
<scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForVirtualProductSaved"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>

<!-- Verify we see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertVirtualProductSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSection"/>
<fillField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{virtualProductWithoutManageStock.urlKey}}" stepKey="fillUrlKey"/>
<scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForVirtualProductSaved"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>

<!-- Verify we see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertVirtualProductSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@
<click selector="{{AdminProductFormSection.selectCategory(SimpleSubCategory.name)}}" stepKey="selectSub1Category"/>
<click selector="{{AdminProductFormSection.done}}" stepKey="clickDone"/>
<waitForPageLoad stepKey="waitForApplyCategory"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSave"/>
<waitForPageLoad stepKey="waitForSavingChanges"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSave"/>

<!-- Enable `Use Categories Path for Product URLs` on Stores -> Configuration -> Catalog -> Catalog -> Search Engine Optimization -->
<amOnPage url="{{AdminCatalogSearchConfigurationPage.url}}" stepKey="onConfigPage"/>
Expand Down Expand Up @@ -109,8 +108,7 @@
<checkOption selector="{{AdminProductFormSection.selectCategory($$createSecondCategory.name$$)}}" stepKey="selectCategory"/>
<click selector="{{AdminProductFormSection.done}}" stepKey="pressButtonDone"/>
<waitForPageLoad stepKey="waitForApplyCategory2"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="pushButtonSave"/>
<waitForPageLoad stepKey="waitForSavingProduct"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="pushButtonSave"/>

<!--Product is saved -->
<see userInput="You saved the product." selector="{{CatalogProductsSection.messageSuccessSavedProduct}}" stepKey="seeSuccessMessage"/>
Expand Down Expand Up @@ -181,8 +179,7 @@
<click selector="{{AdminProductFormSection.selectCategory({$grabNameSubCategory})}}" stepKey="selectSubCategory"/>
<click selector="{{AdminProductFormSection.done}}" stepKey="clickButtonDone"/>
<waitForPageLoad stepKey="waitForCategoryApply"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickButtonSave"/>
<waitForPageLoad stepKey="waitForSaveChanges"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickButtonSave"/>

<!-- Product is saved successfully -->
<see userInput="You saved the product." selector="{{CatalogProductsSection.messageSuccessSavedProduct}}" stepKey="seeSaveMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@

<!-- Update default simple product with name -->
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{simpleProductDataOverriding.name}}" stepKey="fillSimpleProductName"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForSimpleProductSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickButtonSave"/>

<!-- Verify customer see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@

<!-- Update default simple product with price -->
<fillField selector="{{AdminProductFormSection.productPrice}}" userInput="{{simpleProductDataOverriding.price}}" stepKey="fillSimpleProductPrice"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForSimpleProductSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickButtonSave"/>

<!-- Verify customer see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSection"/>
<fillField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductTierPrice300InStock.urlKey}}" stepKey="fillUrlKey"/>
<scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForSimpleProductSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>

<!-- Verify customer see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@
<fillField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductDisabled.urlKey}}" stepKey="fillUrlKey"/>
<scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
<click selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="clickEnableProductLabelToDisableProduct"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForSimpleProductSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>

<!-- Verify customer see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSection"/>
<fillField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductEnabledFlat.urlKey}}" stepKey="fillUrlKey"/>
<scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForSimpleProductSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>

<!-- Verify customer see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSection"/>
<fillField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductNotVisibleIndividually.urlKey}}" stepKey="fillSimpleProductUrlKey"/>
<scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForSimpleProductSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>

<!-- Verify customer see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
<click selector="{{AdminProductFormSection.unselectCategories($$initialCategoryEntity.name$$)}}" stepKey="unselectCategories"/>
<click selector="{{AdminProductFormSection.done}}" stepKey="clickOnDoneAdvancedCategory"/>
<scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForSimpleProductSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>

<!-- Verify customer see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSection"/>
<fillField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductRegularPrice245InStock.urlKey}}" stepKey="fillSimpleProductUrlKey"/>
<scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForSimpleProductSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>

<!-- Verify customer see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSection"/>
<fillField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductRegularPrice32501InStock.urlKey}}" stepKey="fillUrlKey"/>
<scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForSimpleProductSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>

<!-- Verify customer see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="clickAdminProductSEOSection"/>
<fillField selector="{{AdminProductSEOSection.urlKeyInput}}" userInput="{{simpleProductRegularPrice325InStock.urlKey}}" stepKey="fillUrlKey"/>
<scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForSimpleProductSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>

<!-- Verify customer see success message -->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@
<selectOption selector="{{AdminProductCustomizableOptionsSection.clickSelectPriceType(simpleProductCustomizableOption.title,'0')}}" userInput="{{simpleProductCustomizableOption.option_0_price_type}}" stepKey="selectOptionPriceType"/>
<fillField selector="{{AdminProductCustomizableOptionsSection.fillOptionValueSku(simpleProductCustomizableOption.title,'0')}}" userInput="{{simpleProductCustomizableOption.option_0_sku}}" stepKey="fillOptionSku"/>
<scrollToTopOfPage stepKey="scrollToTopOfAdminProductFormSection"/>
<click selector="{{AdminProductFormSection.save}}" stepKey="clickSaveButton"/>
<waitForPageLoad stepKey="waitForSimpleProductSave"/>
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>

<!--Verify customer see success message-->
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeAssertSimpleProductSaveSuccessMessage"/>
Expand Down
Loading