-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3244 from magento-epam/EPAM-PR-12
[epam] MAGETWO-71375: [Magento Cloud] Zero Subtotal Orders have incorrect status
- Loading branch information
Showing
31 changed files
with
887 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontShippmentFromActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?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="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> | ||
<!--Fill shipment form for free shipping--> | ||
<actionGroup name="ShipmentFormFreeShippingActionGroup"> | ||
<fillField selector="{{CheckoutShippingSection.email}}" userInput="{{CustomerEntityOne.email}}" stepKey="setCustomerEmail"/> | ||
<fillField selector="{{CheckoutShippingSection.firstName}}" userInput="{{CustomerEntityOne.firstname}}" stepKey="SetCustomerFirstName"/> | ||
<fillField selector="{{CheckoutShippingSection.lastName}}" userInput="{{CustomerEntityOne.lastname}}" stepKey="SetCustomerLastName"/> | ||
<fillField selector="{{CheckoutShippingSection.street}}" userInput="{{CustomerAddressSimple.street}}" stepKey="SetCustomerStreetAddress"/> | ||
<fillField selector="{{CheckoutShippingSection.city}}" userInput="{{CustomerAddressSimple.city}}" stepKey="SetCustomerCity"/> | ||
<fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{CustomerAddressSimple.postcode}}" stepKey="SetCustomerZipCode"/> | ||
<fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{CustomerAddressSimple.telephone}}" stepKey="SetCustomerPhoneNumber"/> | ||
<click selector="{{CheckoutShippingSection.region}}" stepKey="clickToSetState"/> | ||
<click selector="{{CheckoutShippingSection.state}}" stepKey="clickToChooseState"/> | ||
<see userInput="$0.00 Free Free Shipping" selector="{{CheckoutShippingMethodsSection.shippingMethodRowByName('Free Shipping')}}" stepKey="seeShippingMethod" after="clickToChooseState"/> | ||
<click selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName('Free Shipping')}}" stepKey="selectFlatShippingMethod" after="seeShippingMethod"/> | ||
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask" after="selectFlatShippingMethod"/> | ||
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickToSaveShippingInfo"/> | ||
<waitForPageLoad time="5" stepKey="waitForReviewAndPaymentsPageIsLoaded"/> | ||
<seeInCurrentUrl url="payment" stepKey="reviewAndPaymentIsShown"/> | ||
</actionGroup> | ||
</actionGroups> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
app/code/Magento/Checkout/Test/Mftf/Test/ZeroSubtotalOrdersWithProcessingStatusTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="ZeroSubtotalOrdersWithProcessingStatusTest"> | ||
<annotations> | ||
<features value="Checkout"/> | ||
<stories value="MAGETWO-71375: Zero Subtotal Orders have incorrect status"/> | ||
<title value="Checking status of Zero Subtotal Orders with 'Processing' New Order Status"/> | ||
<description value="Created order should be in Processing status"/> | ||
<severity value="MAJOR"/> | ||
<testCaseId value="MAGETWO-94178"/> | ||
<group value="checkout"/> | ||
</annotations> | ||
<before> | ||
<createData entity="SimpleSubCategory" stepKey="simplecategory"/> | ||
<createData entity="SimpleProduct" stepKey="simpleproduct"> | ||
<requiredEntity createDataKey="simplecategory"/> | ||
</createData> | ||
<createData entity="PaymentMethodsSettingConfig" stepKey="paymentMethodsSettingConfig"/> | ||
<createData entity="FreeShippingMethodsSettingConfig" stepKey="freeShippingMethodsSettingConfig"/> | ||
<!--Go to Admin page--> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
</before> | ||
|
||
<after> | ||
<actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteSalesRule"> | ||
<argument name="ruleName" value="{{ApiSalesRule.name}}"/> | ||
</actionGroup> | ||
<createData entity="DefaultShippingMethodsConfig" stepKey="defaultShippingMethodsConfig"/> | ||
<createData entity="DisableFreeShippingConfig" stepKey="disableFreeShippingConfig"/> | ||
<createData entity="DisablePaymentMethodsSettingConfig" stepKey="disablePaymentMethodsSettingConfig"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
<deleteData createDataKey="simpleproduct" stepKey="deleteProduct"/> | ||
<deleteData createDataKey="simplecategory" stepKey="deleteCategory"/> | ||
</after> | ||
|
||
<!--Open MARKETING > Cart Price Rules--> | ||
<amOnPage url="{{AdminCartPriceRulesPage.url}}" stepKey="amOnCartPriceList"/> | ||
<waitForPageLoad stepKey="waitForRulesPage"/> | ||
|
||
<!--Add New Rule--> | ||
<click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/> | ||
<fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{ApiSalesRule.name}}" stepKey="fillRuleName"/> | ||
<selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsite"/> | ||
<actionGroup ref="selectNotLoggedInCustomerGroup" stepKey="chooseNotLoggedInCustomerGroup"/> | ||
<selectOption selector="{{AdminCartPriceRulesFormSection.coupon}}" userInput="Specific Coupon" stepKey="selectCouponType"/> | ||
<fillField selector="{{AdminCartPriceRulesFormSection.couponCode}}" userInput="{{_defaultCoupon.code}}" stepKey="fillCouponCode"/> | ||
<fillField selector="{{AdminCartPriceRulesFormSection.userPerCoupon}}" userInput="99" stepKey="fillUserPerCoupon"/> | ||
<click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/> | ||
<selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="Percent of product price discount" stepKey="selectActionType"/> | ||
<fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="100" stepKey="fillDiscountAmount"/> | ||
<click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/> | ||
<see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/> | ||
|
||
<!--Proceed to store front and place an order with free shipping using created coupon--> | ||
<!--Add product to card--> | ||
<actionGroup ref="AddSimpleProductToCart" stepKey="AddProductToCard"> | ||
<argument name="product" value="$$simpleproduct$$"/> | ||
</actionGroup> | ||
|
||
<!--Proceed to shipment--> | ||
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickToOpenCard"/> | ||
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="clickToProceedToCheckout"/> | ||
<waitForPageLoad stepKey="waitForTheFormIsOpened"/> | ||
|
||
<!--Fill shipping form--> | ||
<actionGroup ref="ShipmentFormFreeShippingActionGroup" stepKey="shipmentFormFreeShippingActionGroup"/> | ||
|
||
<click selector="{{DiscountSection.DiscountTab}}" stepKey="clickToAddDiscount"/> | ||
<fillField selector="{{DiscountSection.DiscountInput}}" userInput="{{_defaultCoupon.code}}" stepKey="TypeDiscountCode"/> | ||
<click selector="{{DiscountSection.ApplyCodeBtn}}" stepKey="clickToApplyDiscount"/> | ||
<waitForPageLoad stepKey="WaitForDiscountToBeAdded"/> | ||
<see userInput="Your coupon was successfully applied." stepKey="verifyText"/> | ||
|
||
<waitForElement selector="{{CheckoutPaymentSection.placeOrder}}" time="30" stepKey="waitForPlaceOrderButton"/> | ||
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/> | ||
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/> | ||
|
||
<!--Proceed to Admin panel > SALES > Orders. Created order should be in Processing status--> | ||
<amOnPage url="/admin/sales/order/" stepKey="navigateToSalesOrderPage"/> | ||
<waitForPageLoad stepKey="waitForSalesOrderPageLoaded"/> | ||
|
||
<!-- Open Order --> | ||
<actionGroup ref="filterOrderGridById" stepKey="filterOrderGridById"> | ||
<argument name="orderId" value="$grabOrderNumber"/> | ||
</actionGroup> | ||
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/> | ||
<waitForPageLoad stepKey="waitForCreatedOrderPageOpened"/> | ||
|
||
<!--Verify that Created order is in Processing status--> | ||
<see selector="{{AdminShipmentOrderInformationSection.orderStatus}}" userInput="Processing" stepKey="seeShipmentOrderStatus"/> | ||
</test> | ||
</tests> |
Oops, something went wrong.