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] Adding AdminSetStockStatusActionGroup #31013

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
@@ -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