Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaAPak committed Nov 30, 2020
1 parent 8c95f07 commit f36929a
Showing 1 changed file with 35 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="ProductsQtyReturnAfterOrderCancelTest">
<test name="">

<annotations>
<features value="ConfigurableProduct"/>
Expand All @@ -23,28 +23,44 @@

<before>
<createData entity="ApiCategory" stepKey="createCategory"/>
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct">
<createData entity="BaseConfigurableProduct" stepKey="createConfigProduct">
<requiredEntity createDataKey="createCategory"/>
<field key="quantity">1000</field>
</createData>



<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
</before>

<after>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
<!-- <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> -->
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
</after>

<actionGroup ref="AdminOpenCatalogProductPageActionGroup" stepKey="goToCatalogProductPage1"/>

<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/>
<actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clickClearFiltersInitial"/>
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct">
<argument name="product" value="$$createConfigProduct$$"/>
</actionGroup>
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="100" stepKey="changeProductQuantity"/>
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="saveChanges"/>
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="saveChanges"/>

<createData entity="GuestCart" stepKey="createGuestCart"/>
<createData entity="SimpleFourCartItems" stepKey="addCartItem">
<requiredEntity createDataKey="createGuestCart"/>
<requiredEntity createDataKey="createConfigProduct"/>
</createData>
<createData entity="GuestAddressInformation" stepKey="addGuestOrderAddress">
<requiredEntity createDataKey="createGuestCart"/>
</createData>
<updateData createDataKey="createGuestCart" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformation">
<requiredEntity createDataKey="createGuestCart"/>
</updateData>

<amOnPage url="$$createConfigProduct.sku$$.html" stepKey="navigateToProductPage"/>
<!-- <amOnPage url="$$createConfigProduct.sku$$.html" stepKey="navigateToProductPage"/>
<waitForPageLoad stepKey="waitForProductPage"/>
<fillField selector="{{StorefrontProductInfoMainSection.qty}}" userInput="4" stepKey="fillQuantity"/>
Expand All @@ -63,10 +79,10 @@
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" />
</actionGroup>
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/> -->

<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGridById">
<argument name="orderId" value="$grabOrderNumber"/>
<argument name="orderId" value="$createGuestCart.return$"/>
</actionGroup>

<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
Expand All @@ -75,11 +91,16 @@
<click selector="{{AdminInvoiceItemsSection.updateQty}}" stepKey="updateQuantity"/>
<waitForPageLoad stepKey="waitPageToBeLoaded"/>
<actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/>
<click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShipAction"/>
<waitForPageLoad stepKey="waitOrderDetailToLoad"/>
<fillField selector="{{AdminShipmentItemsSection.itemQtyToShip('1')}}" userInput="1" stepKey="changeItemQtyToShip"/>
<click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="clickSubmitShipment"/>
<waitForPageLoad stepKey="waitShipmentSectionToLoad"/>
<!-- <click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShipAction"/>
<waitForPageLoad stepKey="waitOrderDetailToLoad"/> -->
<!-- <fillField selector="{{AdminShipmentItemsSection.itemQtyToShip('1')}}" userInput="1" stepKey="changeItemQtyToShip"/> -->
<actionGroup ref="AdminCreateShipmentFromOrderPage" stepKey="clickSubmitShipment">
<argument name="Qty" value="1"/>
<argument name="Number" value="111"/>
</actionGroup>

<!-- <click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="clickSubmitShipment"/>
<waitForPageLoad stepKey="waitShipmentSectionToLoad"/> -->
<actionGroup ref="CancelPendingOrderActionGroup" stepKey="cancelPendingOption">
<argument name="orderStatus" value="Complete"/>
</actionGroup>
Expand Down

0 comments on commit f36929a

Please sign in to comment.