forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
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 magento#118 from magento-pangolin/MC-4772
MC-4772
- Loading branch information
Showing
3 changed files
with
98 additions
and
0 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
96 changes: 96 additions & 0 deletions
96
app/code/Magento/Sales/Test/Mftf/Test/AdminHoldCreatedOrderTest.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,96 @@ | ||
<?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="AdminHoldCreatedOrderTest"> | ||
<annotations> | ||
<group value="sales"/> | ||
<stories value="Hold Created Order"/> | ||
<title value="Hold the created order"/> | ||
<description value="Create an order and hold the order"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-16160"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
|
||
<before> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
|
||
<!--Set default flat rate shipping method settings--> | ||
<createData entity="FlatRateShippingMethodDefault" stepKey="setDefaultFlatRateShippingMethod"/> | ||
|
||
<!--Create simple customer--> | ||
<createData entity="Simple_US_Customer_CA" stepKey="simpleCustomer"/> | ||
|
||
<!-- Create Simple Products --> | ||
<createData entity="SimpleProduct2" stepKey="simpleProduct"> | ||
<field key="price">10.00</field> | ||
</createData> | ||
<createData entity="SimpleProduct2" stepKey="simpleProduct1"> | ||
<field key="price">20.00</field> | ||
</createData> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="simpleCustomer" stepKey="deleteSimpleCustomer"/> | ||
<deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/> | ||
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!--Create new customer order--> | ||
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="navigateToNewOrderWithExistingCustomer"> | ||
<argument name="customer" value="$$simpleCustomer$$"/> | ||
</actionGroup> | ||
|
||
<!--Add Simple product to order--> | ||
<actionGroup ref="addSimpleProductToOrder" stepKey="addSimpleProductToTheOrder"> | ||
<argument name="product" value="$$simpleProduct$$"/> | ||
</actionGroup> | ||
|
||
<!--Add second product to order--> | ||
<actionGroup ref="addSimpleProductToOrder" stepKey="addSecondProductToTheOrder"> | ||
<argument name="product" value="$$simpleProduct1$$"/> | ||
</actionGroup> | ||
|
||
<!--Select FlatRate shipping method--> | ||
<actionGroup ref="AdminSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRateShippingMethod"/> | ||
|
||
<!-- Submit order --> | ||
<click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="submitOrder"/> | ||
|
||
<!-- Verify order information --> | ||
<actionGroup ref="verifyCreatedOrderInformation" stepKey="verifyCreatedOrderInformation"/> | ||
<grabTextFrom selector="|Order # (\d+)|" stepKey="orderId"/> | ||
|
||
<!-- Hold the Order --> | ||
<click selector="{{AdminOrderDetailsMainActionsSection.hold}}" stepKey="clickOnHoldButton"/> | ||
<see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="You put the order on hold" stepKey="seeSuccessHoldMessage"/> | ||
|
||
<!--Assert Order Status and Unhold button--> | ||
<see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="On Hold" stepKey="seeOrderStatusOnHold"/> | ||
<seeElement selector="{{AdminOrderDetailsMainActionsSection.unhold}}" stepKey="seeUnholdButton"/> | ||
|
||
<!--Assert invoice, cancel, reorder, ship, and edit buttons are unavailable--> | ||
<dontSeeElement selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="dontSeeInvoiceButton"/> | ||
<dontSeeElement selector="{{AdminOrderDetailsMainActionsSection.cancel}}" stepKey="dontSeeCancelButton"/> | ||
<dontSeeElement selector="{{AdminOrderDetailsMainActionsSection.reorder}}" stepKey="dontSeeReorderButton"/> | ||
<dontSeeElement selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="dontSeeShipButton"/> | ||
<dontSeeElement selector="{{AdminOrderDetailsMainActionsSection.edit}}" stepKey="dontSeeEditButton"/> | ||
|
||
<!--Log in to Storefront as Customer --> | ||
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="signUp"> | ||
<argument name="Customer" value="$$simpleCustomer$$"/> | ||
</actionGroup> | ||
|
||
<!-- Assert OrderId and status in frontend order grid --> | ||
<click selector="{{StorefrontCustomerSidebarSection.sidebarCurrentTab('My Orders')}}" stepKey="clickOnMyOrders"/> | ||
<waitForPageLoad stepKey="waitForOrderDetailsToLoad"/> | ||
<seeElement selector="{{StorefrontCustomerOrderViewSection.orderStatusInGrid('$orderId', 'On Hold')}}" stepKey="seeOrderStatusInGrid"/> | ||
</test> | ||
</tests> |
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