Skip to content

Commit 0d32349

Browse files
committed
refactored
1 parent 94cdcf1 commit 0d32349

File tree

4 files changed

+25
-38
lines changed

4 files changed

+25
-38
lines changed

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCheckProductQtyAfterOrderCancelling.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="AdminCheckProductQtyAfterOrderCancelling">
11+
<test name="AdminCheckProductQtyAfterOrderCancellingTest">
1212

1313
<annotations>
1414
<features value="ConfigurableProduct"/>
@@ -41,7 +41,7 @@
4141
</updateData>
4242

4343
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
44-
44+
4545
</before>
4646

4747
<after>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ProductsQtyReturnAfterOrderCancelTest.xml

Lines changed: 14 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="">
11+
<test name="ProductsQtyReturnAfterOrderCancelTest" deprecated="Use AdminCheckProductQtyAfterOrderCancellingTest instead">
1212

1313
<annotations>
1414
<features value="ConfigurableProduct"/>
@@ -23,44 +23,28 @@
2323

2424
<before>
2525
<createData entity="ApiCategory" stepKey="createCategory"/>
26-
<createData entity="BaseConfigurableProduct" stepKey="createConfigProduct">
26+
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct">
2727
<requiredEntity createDataKey="createCategory"/>
28-
<field key="quantity">1000</field>
2928
</createData>
30-
31-
32-
3329
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
3430
</before>
3531

3632
<after>
37-
<!-- <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
38-
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> -->
33+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
34+
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/>
3935
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
4036
</after>
4137

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

44-
<actionGroup ref="ClearFiltersAdminProductGridActionGroup" stepKey="clickClearFiltersInitial"/>
40+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/>
4541
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct">
4642
<argument name="product" value="$$createConfigProduct$$"/>
4743
</actionGroup>
4844
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="100" stepKey="changeProductQuantity"/>
49-
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="saveChanges"/>
50-
51-
<createData entity="GuestCart" stepKey="createGuestCart"/>
52-
<createData entity="SimpleFourCartItems" stepKey="addCartItem">
53-
<requiredEntity createDataKey="createGuestCart"/>
54-
<requiredEntity createDataKey="createConfigProduct"/>
55-
</createData>
56-
<createData entity="GuestAddressInformation" stepKey="addGuestOrderAddress">
57-
<requiredEntity createDataKey="createGuestCart"/>
58-
</createData>
59-
<updateData createDataKey="createGuestCart" entity="GuestOrderPaymentMethod" stepKey="sendGuestPaymentInformation">
60-
<requiredEntity createDataKey="createGuestCart"/>
61-
</updateData>
45+
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="saveChanges"/>
6246

63-
<!-- <amOnPage url="$$createConfigProduct.sku$$.html" stepKey="navigateToProductPage"/>
47+
<amOnPage url="$$createConfigProduct.sku$$.html" stepKey="navigateToProductPage"/>
6448
<waitForPageLoad stepKey="waitForProductPage"/>
6549
<fillField selector="{{StorefrontProductInfoMainSection.qty}}" userInput="4" stepKey="fillQuantity"/>
6650

@@ -79,10 +63,10 @@
7963
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage" />
8064
</actionGroup>
8165

82-
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/> -->
66+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>
8367

8468
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGridById">
85-
<argument name="orderId" value="$createGuestCart.return$"/>
69+
<argument name="orderId" value="$grabOrderNumber"/>
8670
</actionGroup>
8771

8872
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
@@ -91,16 +75,11 @@
9175
<click selector="{{AdminInvoiceItemsSection.updateQty}}" stepKey="updateQuantity"/>
9276
<waitForPageLoad stepKey="waitPageToBeLoaded"/>
9377
<actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/>
94-
<!-- <click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShipAction"/>
95-
<waitForPageLoad stepKey="waitOrderDetailToLoad"/> -->
96-
<!-- <fillField selector="{{AdminShipmentItemsSection.itemQtyToShip('1')}}" userInput="1" stepKey="changeItemQtyToShip"/> -->
97-
<actionGroup ref="AdminCreateShipmentFromOrderPage" stepKey="clickSubmitShipment">
98-
<argument name="Qty" value="1"/>
99-
<argument name="Number" value="111"/>
100-
</actionGroup>
101-
102-
<!-- <click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="clickSubmitShipment"/>
103-
<waitForPageLoad stepKey="waitShipmentSectionToLoad"/> -->
78+
<click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShipAction"/>
79+
<waitForPageLoad stepKey="waitOrderDetailToLoad"/>
80+
<fillField selector="{{AdminShipmentItemsSection.itemQtyToShip('1')}}" userInput="1" stepKey="changeItemQtyToShip"/>
81+
<click selector="{{AdminShipmentMainActionsSection.submitShipment}}" stepKey="clickSubmitShipment"/>
82+
<waitForPageLoad stepKey="waitShipmentSectionToLoad"/>
10483
<actionGroup ref="CancelPendingOrderActionGroup" stepKey="cancelPendingOption">
10584
<argument name="orderStatus" value="Complete"/>
10685
</actionGroup>

app/code/Magento/Quote/Test/Mftf/Data/CartItemData.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,9 @@
2323
<var key="quote_id" entityKey="return" entityType="GuestCart"/>
2424
<var key="sku" entityKey="sku" entityType="product"/>
2525
</entity>
26+
<entity name="FourCartItems" type="CartItem">
27+
<data key="qty">4</data>
28+
<var key="quote_id" entityKey="return" entityType="GuestCart"/>
29+
<var key="sku" entityKey="sku" entityType="product"/>
30+
</entity>
2631
</entities>

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminInvoiceWIthUpdatedProductQtyActionGroup.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="AdminInvoiceWIthUpdatedProductQtyActionGroup" extends="AdminCreateInvoiceActionGroup">
1212
<annotations>
13-
<description>The "Create Invoice" page: Update product qty to invoice (there is one product in the Order).</description>
13+
<description>Start order Invoicing.
14+
Update product qty to invoice (there is one product in the Order).
15+
Submit the invoice.
16+
</description>
1417
</annotations>
1518
<arguments>
1619
<argument name="qty" type="string"/>

0 commit comments

Comments
 (0)