Skip to content

Commit

Permalink
ENGCOM-8515: [MFTF] Adding AdminSetStockStatusActionGroup #31013
Browse files Browse the repository at this point in the history
 - Merge Pull Request #31013 from AnnaAPak/magento2:add-AdminSetSTockStatusActionGroup
 - Merged commits:
   1. 3adff7a
   2. fe4a58f
   3. b542bd8
   4. 0b882f3
   5. 8626a36
   6. f95ed51
  • Loading branch information
magento-engcom-team committed Dec 4, 2020
2 parents 78c411d + f95ed51 commit d315a9f
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?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="AdminSetStockStatusActionGroup">
<annotations>
<description>Set Stock Status of product.</description>
</annotations>

<arguments>
<argument name="stockStatus" type="string" defaultValue="In Stock"/>
</arguments>

<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="{{stockStatus}}" stepKey="setStockStatus"/>

</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

<scrollTo selector="{{AdminProductFormSection.productQuantity}}" stepKey="scrollToProductQuantity" after="waitForProductPageToLoad"/>
<remove keyForRemoval="disableProduct"/>
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="Out of Stock" stepKey="selectOutOfStock" after="scrollToProductQuantity"/>
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectOutOfStock" after="scrollToProductQuantity">
<argument name="stockStatus" value="Out of Stock"/>
</actionGroup>

</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@
<waitForPageLoad stepKey="waitForProductToLoad"/>

<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="100" stepKey="fillProductQty"/>
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="In Stock" stepKey="selectStockStatus"/>
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectStockStatus">
<argument name="stockStatus" value="In Stock"/>
</actionGroup>

<!-- Create New Product Attribute -->
<click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickOnAddAttribute"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
<waitForPageLoad stepKey="waitForProductToLoad"/>

<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="100" stepKey="fillProductQty"/>
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="In Stock" stepKey="selectStockStatus"/>
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectStockStatus">
<argument name="stockStatus" value="In Stock"/>
</actionGroup>

<!-- Create Product Attribute -->
<click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickOnAddAttribute"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@
<argument name="productId" value="$$createConfigChildProduct2.id$$"/>
</actionGroup>
<waitForPageLoad stepKey="waitForSecondChildProductPageLoad"/>
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="Out of Stock" stepKey="outOfStockStatus"/>

<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="outOfStockStatus">
<argument name="stockStatus" value="Out of Stock"/>
</actionGroup>

<actionGroup ref="SaveProductFormActionGroup" stepKey="saveSecondProductForm"/>
<!-- Go to created customer page -->
<comment userInput="Go to created customer page" stepKey="goToCreatedCustomerPage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@
<click selector="{{AdminProductGridFilterSection.nthRow('1')}}" stepKey="selectFirstRow"/>
<waitForPageLoad stepKey="waitForProductPageToLoad"/>
<scrollTo selector="{{AdminProductFormSection.productQuantity}}" stepKey="scrollToProductQuantity"/>
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="Out of Stock" stepKey="disableProduct"/>
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="disableProduct">
<argument name="stockStatus" value="Out of Stock"/>
</actionGroup>
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickOnSaveButton"/>
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@
<actionGroup ref="AdminFormSaveAndDuplicateActionGroup" stepKey="saveAndDuplicateProductForm"/>
<click selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="clickEnableProduct"/>
<fillField selector="{{AdminProductFormSection.productName}}" userInput="$$createConfigProduct.name$$-Updated" stepKey="fillProductName"/>
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="1" stepKey="selectInStock"/>
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectInStock">
<argument name="stockStatus" value="In Stock"/>
</actionGroup>
<!--Change product image-->
<comment userInput="Change product image" stepKey="commentChangeProductImage"/>
<actionGroup ref="RemoveProductImageActionGroup" stepKey="removeProductImage"/>
Expand Down

0 comments on commit d315a9f

Please sign in to comment.