Skip to content

Commit 35e38af

Browse files
committed
MAGETWO-89079: Different order statuses with zero value and none zero statuses
- Order States fix - Tests fix
1 parent f989d67 commit 35e38af

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

app/code/Magento/Sales/Test/Mftf/Data/ConstData.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
1111
<entity name="CONST" type="CONST">
12-
<data key="Complete">Complete</data>
13-
<data key="Closed">Closed</data>
14-
<data key="Pending">Pending</data>
15-
<data key="Processing">Processing</data>
12+
<data key="orderStatusComplete">Complete</data>
13+
<data key="orderStatusClosed">Closed</data>
14+
<data key="orderStatusPending">Pending</data>
15+
<data key="orderStatusProcessing">Processing</data>
1616
</entity>
1717
</entities>
1818

app/code/Magento/Sales/Test/Mftf/Test/AdminAbleToShipPartiallyInvoicedItemsTest.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<grabFromCurrentUrl regex="~/order_id/(\d+)/~" stepKey="grabOrderId"/>
6060
<seeInCurrentUrl url="{{AdminOrderDetailsPage.url('$grabOrderId')}}" after="grabOrderId" stepKey="seeViewOrderPage"/>
6161
<see selector="{{AdminMessagesSection.success}}" userInput="You created the order." after="seeViewOrderPage" stepKey="seeSuccessMessage"/>
62-
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.Pending}}" stepKey="seeOrderPending"/>
62+
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.orderStatusPending}}" stepKey="seeOrderPending"/>
6363
<grabTextFrom selector="|Order # (\d+)|" after="seeSuccessMessage" stepKey="getOrderId"/>
6464
<scrollTo selector="{{AdminOrderItemsOrderedSection.qtyColumn}}" after="getOrderId" stepKey="scrollToItemsOrdered"/>
6565
<see selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" userInput="Ordered 10" after="scrollToItemsOrdered" stepKey="seeQtyOfItemsOrdered"/>
@@ -80,7 +80,7 @@
8080
<waitForPageLoad stepKey="waitForInvoiceToSubmit1"/>
8181
<!--Invoice created successfully-->
8282
<see selector="{{AdminMessagesSection.success}}" userInput="The invoice has been created." stepKey="seeInvoiceSuccessMessage"/>
83-
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.Processing}}" stepKey="seeOrderProcessing1"/>
83+
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.orderStatusProcessing}}" stepKey="seeOrderProcessing1"/>
8484
<scrollTo selector="{{AdminOrderItemsOrderedSection.itemStatus('1')}}" stepKey="scrollToOrderItems"/>
8585
<see selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" userInput="Invoiced 5" stepKey="see5itemsInvoiced"/>
8686
<scrollTo selector="{{AdminHeaderSection.pageTitle}}" stepKey="scrollToTopOfPage"/>
@@ -100,7 +100,7 @@
100100
<waitForLoadingMaskToDisappear stepKey="waitForShipmentToSubmit"/>
101101
<!--Verify shipment created successfully-->
102102
<see selector="{{AdminMessagesSection.success}}" userInput="The shipment has been created." after="submitShipment" stepKey="successfullShipmentCreation"/>
103-
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.Processing}}" stepKey="seeOrderProcessing2"/>
103+
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.orderStatusProcessing}}" stepKey="seeOrderProcessing2"/>
104104
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="$getOrderId" stepKey="seeOrderIdInPageTitleAfterShip"/>
105105
<scrollTo selector="{{AdminOrderItemsOrderedSection.itemStatus('1')}}" stepKey="scrollToOrderItems1"/>
106106
<see selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" userInput="Shipped 5" stepKey="see5itemsShipped"/>
@@ -120,7 +120,7 @@
120120
<click selector="{{AdminCreditMemoTotalSection.submitRefundOffline}}" stepKey="submitRefundOffline"/>
121121
<!--Verify Credit Memo created successfully-->
122122
<see selector="{{AdminMessagesSection.success}}" userInput="You created the credit memo." after="submitRefundOffline" stepKey="seeCreditMemoSuccessMsg"/>
123-
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.Processing}}" stepKey="seeOrderProcessing3"/>
123+
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.orderStatusProcessing}}" stepKey="seeOrderProcessing3"/>
124124
<scrollTo selector="{{AdminOrderItemsOrderedSection.itemStatus('1')}}" stepKey="scrollToOrderItems2"/>
125125
<see selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" userInput="Refunded 5" stepKey="see5itemsRefunded"/>
126126
<scrollTo selector="{{AdminHeaderSection.pageTitle}}" stepKey="scrollToTopOfPage2"/>
@@ -142,7 +142,7 @@
142142
<waitForPageLoad stepKey="waitForInvoiceToSubmit2"/>
143143
<!--Invoice created successfully for the rest of the ordered items-->
144144
<see selector="{{AdminMessagesSection.success}}" userInput="The invoice has been created." stepKey="seeInvoiceSuccessMessage2"/>
145-
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.Processing}}" stepKey="seeOrderProcessing4"/>
145+
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.orderStatusProcessing}}" stepKey="seeOrderProcessing4"/>
146146
<scrollTo selector="{{AdminOrderItemsOrderedSection.itemStatus('1')}}" stepKey="scrollToOrderItems3"/>
147147
<see selector="{{AdminOrderItemsOrderedSection.itemQty('1')}}" userInput="Invoiced 10" stepKey="see10itemsInvoiced"/>
148148
<scrollTo selector="{{AdminHeaderSection.pageTitle}}" stepKey="scrollToTopOfPage3"/>
@@ -161,7 +161,7 @@
161161
<!--Submit Shipment-->
162162
<click selector="{{AdminShipmentMainActionsSection.submitShipment}}" after="fillRestOfItemsToShip" stepKey="submitShipment2" />
163163
<see selector="{{AdminMessagesSection.success}}" userInput="The shipment has been created." after="submitShipment2" stepKey="successfullyCreatedShipment"/>
164-
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.Complete}}" stepKey="seeOrderComplete"/>
164+
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.orderStatusComplete}}" stepKey="seeOrderComplete"/>
165165

166166
<!--Verify Items Status and Shipped Qty in the Items Ordered section-->
167167
<scrollTo selector="{{AdminOrderItemsOrderedSection.itemStatus('1')}}" stepKey="scrollToItemsOrdered2"/>

app/code/Magento/Sales/Test/Mftf/Test/AdminCreditMemoTotalAfterShippingDiscountTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
<!-- Create invoice -->
100100
<click selector="{{AdminDataGridTableSection.firstRow}}" stepKey="clickOrderRow"/>
101101
<waitForPageLoad stepKey="waitForPageLoad"/>
102-
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.Pending}}" stepKey="seeOrderPending"/>
102+
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.orderStatusPending}}" stepKey="seeOrderPending"/>
103103
<click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceButton"/>
104104
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" stepKey="seeNewInvoiceInPageTitle" after="clickInvoiceButton"/>
105105

@@ -117,7 +117,7 @@
117117
<grabTextFrom selector="{{AdminInvoiceTotalSection.grandTotal}}" stepKey="grabInvoiceGrandTotal" after="seeCorrectGrandTotal"/>
118118
<click selector="{{AdminInvoiceMainActionsSection.submitInvoice}}" stepKey="clickSubmitInvoice"/>
119119
<see selector="{{OrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeSuccessMessage1"/>
120-
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.Processing}}" stepKey="seeOrderProcessing"/>
120+
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{CONST.orderStatusProcessing}}" stepKey="seeOrderProcessing"/>
121121

122122
<!--Create Credit Memo-->
123123
<comment userInput="Admin creates credit memo" stepKey="createCreditMemoComment"/>

dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/AbstractForm.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ function () {
5353
protected function waitForElementEnabled(string $selector, string $strategy = Locator::SELECTOR_CSS)
5454
{
5555
$browser = $this->browser;
56+
5657
return $browser->waitUntil(
5758
function () use ($browser, $selector, $strategy) {
5859
$element = $browser->find($selector, $strategy);
60+
5961
return !$element->isDisabled() ? true : null;
6062
}
6163
);

0 commit comments

Comments
 (0)