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#117 from magento-pangolin/MC-4765
MC-4765
- Loading branch information
Showing
4 changed files
with
193 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerActivitiesLastOrderedSection.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,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="AdminCustomerActivitiesLastOrderedSection"> | ||
<element name="addProductToOrder" type="text" selector="//div[@id='sidebar_data_reorder']//tr[td[.='{{productName}}']]//input[contains(@name,'add')]" parameterized="true" timeout="30"/> | ||
</section> | ||
</sections> |
112 changes: 112 additions & 0 deletions
112
app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedConfigurableProductOnOrderPageTest.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,112 @@ | ||
<?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="MoveLastOrderedConfigurableProductOnOrderPageTest"> | ||
<annotations> | ||
<features value="Sales"/> | ||
<stories value="Add Products to Order from Last Ordered Products Section"/> | ||
<title value="Move last ordered configurable product on order page test"/> | ||
<description value="Move last ordered configurable product on order page"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-16155"/> | ||
<group value="sales"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<!-- Login as admin --> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
|
||
<!-- Create customer --> | ||
<createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/> | ||
|
||
<!-- Create category --> | ||
<createData entity="_defaultCategory" stepKey="createCategory"/> | ||
|
||
<!-- Create configurable product --> | ||
<createData entity="ApiConfigurableProduct" stepKey="createConfigProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> | ||
<createData entity="productAttributeOption1" stepKey="createConfigProductAttributeOption"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</createData> | ||
<createData entity="AddToDefaultSet" stepKey="createConfigAddToAttributeSet"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</createData> | ||
<getData entity="ProductAttributeOptionGetter" index="1" stepKey="getConfigAttributeOption"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
</getData> | ||
<createData entity="ApiSimpleOne" stepKey="createConfigChildProduct"> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
<requiredEntity createDataKey="getConfigAttributeOption"/> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="ConfigurableProductTwoOptions" stepKey="createConfigProductOption"> | ||
<requiredEntity createDataKey="createConfigProduct"/> | ||
<requiredEntity createDataKey="createConfigProductAttribute"/> | ||
<requiredEntity createDataKey="getConfigAttributeOption"/> | ||
</createData> | ||
<createData entity="ConfigurableProductAddChild" stepKey="createConfigProductAddChild"> | ||
<requiredEntity createDataKey="createConfigProduct"/> | ||
<requiredEntity createDataKey="createConfigChildProduct"/> | ||
</createData> | ||
</before> | ||
<after> | ||
<!-- Delete created data --> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> | ||
<deleteData createDataKey="createConfigChildProduct" stepKey="deleteConfigChildProduct"/> | ||
<deleteData createDataKey="createConfigProduct" stepKey="deleteConfigProduct"/> | ||
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
</after> | ||
|
||
<!-- Create order --> | ||
<actionGroup ref="navigateToNewOrderPageExistingCustomer" stepKey="goToCreateOrderPage"> | ||
<argument name="customer" value="$$createCustomer$$"/> | ||
</actionGroup> | ||
|
||
<!-- Add configurable product to order --> | ||
<actionGroup ref="addConfigurableProductToOrderFromAdmin" stepKey="addConfigurableProductToOrder"> | ||
<argument name="product" value="$$createConfigProduct$$"/> | ||
<argument name="attribute" value="$$createConfigProductAttribute$$"/> | ||
<argument name="option" value="$$getConfigAttributeOption$$"/> | ||
</actionGroup> | ||
|
||
<!-- Select shipping method --> | ||
<click selector="{{AdminInvoicePaymentShippingSection.getShippingMethodAndRates}}" stepKey="openShippingMethod"/> | ||
<waitForPageLoad stepKey="waitForShippingMethods"/> | ||
<click selector="{{AdminInvoicePaymentShippingSection.shippingMethod}}" stepKey="chooseShippingMethod"/> | ||
<waitForPageLoad stepKey="waitForShippingMethodLoad"/> | ||
|
||
<!-- Submit order --> | ||
<actionGroup ref="AdminSubmitOrderActionGroup" stepKey="submitOrder"/> | ||
|
||
<!-- Search and open customer --> | ||
<actionGroup ref="AdminFilterCustomerByEmail" stepKey="filterCreatedCustomer"> | ||
<argument name="email" value="$$createCustomer.email$$"/> | ||
</actionGroup> | ||
<click selector="{{AdminCustomerGridSection.firstRowEditLink}}" stepKey="clickEditButton"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
|
||
<!-- Click create order --> | ||
<click selector="{{AdminCustomerMainActionsSection.createOrderBtn}}" stepKey="clickCreateOrder"/> | ||
|
||
<!-- Select product in Last Ordered Items section --> | ||
<click selector="{{AdminCustomerActivitiesLastOrderedSection.addProductToOrder($$createConfigProduct.name$$)}}" stepKey="addProductToOrder"/> | ||
|
||
<!-- Click Update Changes --> | ||
<click selector="{{AdminCustomerCreateNewOrderSection.updateChangesBtn}}" stepKey="clickUpdateChangesBtn"/> | ||
|
||
<!-- Assert product in items ordered grid --> | ||
<see selector="{{AdminCustomerCreateNewOrderSection.gridCell('1', 'Product')}}" userInput="$$createConfigProduct.name$$" stepKey="seeProductName"/> | ||
<see selector="{{AdminCustomerCreateNewOrderSection.gridCell('1', 'Price')}}" userInput="$123.00" stepKey="seeProductPrice"/> | ||
</test> | ||
</tests> |
65 changes: 65 additions & 0 deletions
65
app/code/Magento/Sales/Test/Mftf/Test/MoveLastOrderedSimpleProductOnOrderPageTest.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,65 @@ | ||
<?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="MoveLastOrderedSimpleProductOnOrderPageTest"> | ||
<annotations> | ||
<features value="Sales"/> | ||
<stories value="Add Products to Order from Last Ordered Products Section"/> | ||
<title value="Move last ordered simple product on order page test"/> | ||
<description value="Move last ordered simple product on order page"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-16154"/> | ||
<group value="sales"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<!-- Login as admin --> | ||
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/> | ||
|
||
<!-- Create customer --> | ||
<createData entity="Simple_US_CA_Customer" stepKey="createCustomer"/> | ||
|
||
<!-- Create product --> | ||
<createData entity="SimpleProduct2" stepKey="createProduct"/> | ||
</before> | ||
<after> | ||
<!-- Delete created data --> | ||
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/> | ||
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> | ||
<actionGroup ref="logout" stepKey="logOut"/> | ||
</after> | ||
|
||
<!-- Create order --> | ||
<actionGroup ref="CreateOrderActionGroup" stepKey="createOrder"> | ||
<argument name="product" value="$$createProduct$$"/> | ||
<argument name="customer" value="$$createCustomer$$"/> | ||
</actionGroup> | ||
|
||
<!-- Search and open customer --> | ||
<actionGroup ref="AdminFilterCustomerByEmail" stepKey="filterCreatedCustomer"> | ||
<argument name="email" value="$$createCustomer.email$$"/> | ||
</actionGroup> | ||
<click selector="{{AdminCustomerGridSection.firstRowEditLink}}" stepKey="clickEditButton"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
|
||
<!-- Click create order --> | ||
<click selector="{{AdminCustomerMainActionsSection.createOrderBtn}}" stepKey="clickCreateOrder"/> | ||
|
||
<!-- Select product in Last Ordered Items section --> | ||
<click selector="{{AdminCustomerActivitiesLastOrderedSection.addProductToOrder($$createProduct.name$$)}}" stepKey="addProductToOrder"/> | ||
|
||
<!-- Click Update Changes --> | ||
<click selector="{{AdminCustomerCreateNewOrderSection.updateChangesBtn}}" stepKey="clickUpdateChangesBtn"/> | ||
|
||
<!-- Assert product in items ordered grid --> | ||
<see selector="{{AdminCustomerCreateNewOrderSection.gridCell('1', 'Product')}}" userInput="$$createProduct.name$$" stepKey="seeProductName"/> | ||
<see selector="{{AdminCustomerCreateNewOrderSection.gridCell('1', 'Price')}}" userInput="$$createProduct.price$$" stepKey="seeProductPrice"/> | ||
</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