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#121 from magento-pangolin/MC-4766
MC-4766
- Loading branch information
Showing
8 changed files
with
491 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...ento/Checkout/Test/Mftf/ActionGroup/StorefrontAddProductToCartFromCategoryActionGroup.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,22 @@ | ||
<?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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="StorefrontAddProductToCartFromCategoryActionGroup"> | ||
<arguments> | ||
<argument name="productName" type="string"/> | ||
</arguments> | ||
<scrollTo selector="{{StorefrontCategoryProductSection.ProductInfoByName(productName)}}" stepKey="scroll"/> | ||
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(productName)}}" stepKey="moveMouseOverProduct" /> | ||
<click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(productName)}}" stepKey="clickAddToCart" /> | ||
<waitForAjaxLoad stepKey="waitForAjax"/> | ||
</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
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
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Sales/Test/Mftf/Page/StorefrontCustomerOrdersHistoryPage.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. | ||
*/ | ||
--> | ||
|
||
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd"> | ||
<page name="StorefrontCustomerOrdersHistoryPage" url="sales/order/history/" module="Magento_Sales" area="storefront"> | ||
<section name="StorefrontCustomerOrdersGridSection"/> | ||
</page> | ||
</pages> |
14 changes: 14 additions & 0 deletions
14
app/code/Magento/Sales/Test/Mftf/Section/StorefrontCustomerOrdersGridSection.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="StorefrontCustomerOrdersGridSection"> | ||
<element name="orderView" type="button" selector="//td[text()='{{orderNumber}}']/following-sibling::td[@class='col actions']/a[contains(@class, 'view')]" parameterized="true" /> | ||
</section> | ||
</sections> |
222 changes: 222 additions & 0 deletions
222
app/code/Magento/Sales/Test/Mftf/Test/StorefrontOrderPagerDisplayedTest.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,222 @@ | ||
<?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="StorefrontOrderPagerDisplayedTest"> | ||
<annotations> | ||
<stories value="Storefront order pager"/> | ||
<title value="Pager is displayed for 21 order items"/> | ||
<description value="Pager is displayed for 21 order items"/> | ||
<severity value="CRITICAL"/> | ||
<testCaseId value="MC-16167"/> | ||
<group value="sales"/> | ||
<group value="mtf_migrated"/> | ||
</annotations> | ||
<before> | ||
<actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> | ||
<!-- 21 products created and category --> | ||
<createData entity="_defaultCategory" stepKey="createCategory"/> | ||
<createData entity="SimpleProduct" stepKey="createProduct01"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="SimpleProduct" stepKey="createProduct02"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="SimpleProduct" stepKey="createProduct03"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="SimpleProduct" stepKey="createProduct04"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="_defaultProduct" stepKey="createProduct05"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="_defaultProduct" stepKey="createProduct06"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="_defaultProduct" stepKey="createProduct07"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="_defaultProduct" stepKey="createProduct08"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="_defaultProduct" stepKey="createProduct09"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="SimpleProduct" stepKey="createProduct10"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="SimpleProduct" stepKey="createProduct11"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="SimpleProduct" stepKey="createProduct12"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="ApiSimpleProduct" stepKey="createProduct13"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="ApiSimpleProduct" stepKey="createProduct14"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="ApiSimpleProduct" stepKey="createProduct15"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="ApiSimpleProduct" stepKey="createProduct16"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="ApiSimpleProduct" stepKey="createProduct17"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="ApiSimpleProduct" stepKey="createProduct18"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="ApiSimpleProduct" stepKey="createProduct19"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="ApiSimpleProduct" stepKey="createProduct20"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="SimpleProduct" stepKey="createProduct21"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
|
||
<!-- Customer is created --> | ||
<createData entity="Simple_US_Customer" stepKey="createCustomer"/> | ||
|
||
</before> | ||
<after> | ||
<!-- Delete category and products --> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
<deleteData createDataKey="createProduct01" stepKey="deleteProduct1"/> | ||
<deleteData createDataKey="createProduct02" stepKey="deleteProduct2"/> | ||
<deleteData createDataKey="createProduct03" stepKey="deleteProduct3"/> | ||
<deleteData createDataKey="createProduct04" stepKey="deleteProduct4"/> | ||
<deleteData createDataKey="createProduct05" stepKey="deleteProduct5"/> | ||
<deleteData createDataKey="createProduct06" stepKey="deleteProduct6"/> | ||
<deleteData createDataKey="createProduct07" stepKey="deleteProduct7"/> | ||
<deleteData createDataKey="createProduct08" stepKey="deleteProduct8"/> | ||
<deleteData createDataKey="createProduct09" stepKey="deleteProduct9"/> | ||
<deleteData createDataKey="createProduct10" stepKey="deleteProduct10"/> | ||
<deleteData createDataKey="createProduct11" stepKey="deleteProduct11"/> | ||
<deleteData createDataKey="createProduct12" stepKey="deleteProduct12"/> | ||
<deleteData createDataKey="createProduct13" stepKey="deleteProduct13"/> | ||
<deleteData createDataKey="createProduct14" stepKey="deleteProduct14"/> | ||
<deleteData createDataKey="createProduct15" stepKey="deleteProduct15"/> | ||
<deleteData createDataKey="createProduct16" stepKey="deleteProduct16"/> | ||
<deleteData createDataKey="createProduct17" stepKey="deleteProduct17"/> | ||
<deleteData createDataKey="createProduct18" stepKey="deleteProduct18"/> | ||
<deleteData createDataKey="createProduct19" stepKey="deleteProduct19"/> | ||
<deleteData createDataKey="createProduct20" stepKey="deleteProduct20"/> | ||
<deleteData createDataKey="createProduct21" stepKey="deleteProduct21"/> | ||
|
||
<!-- Delete Customer --> | ||
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> | ||
<actionGroup ref="logout" stepKey="logout"/> | ||
</after> | ||
|
||
<!-- Login to Storefront as Customer --> | ||
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginAsCustomer"> | ||
<argument name="Customer" value="$$createCustomer$$" /> | ||
</actionGroup> | ||
|
||
<!-- Customer placed the order with 20 products --> | ||
<amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onCategoryPage"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
<scrollTo selector="{{StorefrontCategoryMainSection.perPage}}" stepKey="scrollToLimiter"/> | ||
<selectOption userInput="30" selector="{{StorefrontCategoryMainSection.perPage}}" stepKey="selectLimitOnPage"/> | ||
<waitForPageLoad stepKey="waitForLoadProducts"/> | ||
<scrollToTopOfPage stepKey="scrollToTopOfPage"/> | ||
|
||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct1"> | ||
<argument name="productName" value="$$createProduct01.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct2"> | ||
<argument name="productName" value="$$createProduct02.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct3"> | ||
<argument name="productName" value="$$createProduct03.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct4"> | ||
<argument name="productName" value="$$createProduct04.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct5"> | ||
<argument name="productName" value="$$createProduct05.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct6"> | ||
<argument name="productName" value="$$createProduct06.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct7"> | ||
<argument name="productName" value="$$createProduct07.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct8"> | ||
<argument name="productName" value="$$createProduct08.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct9"> | ||
<argument name="productName" value="$$createProduct09.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct10"> | ||
<argument name="productName" value="$$createProduct10.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct11"> | ||
<argument name="productName" value="$$createProduct11.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct12"> | ||
<argument name="productName" value="$$createProduct12.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct13"> | ||
<argument name="productName" value="$$createProduct13.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct14"> | ||
<argument name="productName" value="$$createProduct14.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct15"> | ||
<argument name="productName" value="$$createProduct15.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct16"> | ||
<argument name="productName" value="$$createProduct16.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct17"> | ||
<argument name="productName" value="$$createProduct17.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct18"> | ||
<argument name="productName" value="$$createProduct18.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct19"> | ||
<argument name="productName" value="$$createProduct19.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct20"> | ||
<argument name="productName" value="$$createProduct20.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProduct21"> | ||
<argument name="productName" value="$$createProduct21.name$$"/> | ||
</actionGroup> | ||
|
||
<!-- Place Order --> | ||
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="onCheckout"/> | ||
<see userInput="21" selector="{{CheckoutOrderSummarySection.itemsQtyInCart}}" stepKey="see21Products"/> | ||
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNextButton"/> | ||
<waitForLoadingMaskToDisappear stepKey="waitForCheckoutLoad"/> | ||
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="placeOrder"/> | ||
<waitForPageLoad stepKey="waitForSuccess"/> | ||
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> | ||
|
||
<!-- Go to My Account > My Orders page --> | ||
<amOnPage url="{{StorefrontCustomerDashboardPage.url}}" stepKey="onMyAccount"/> | ||
<waitForPageLoad stepKey="waitForAccountPage"/> | ||
<click selector="{{StorefrontCustomerSidebarSection.sidebarTab('My Orders')}}" stepKey="clickOnMyOrders"/> | ||
<waitForPageLoad stepKey="waitForOrdersLoad"/> | ||
|
||
<!-- Click 'View Order' link on order from preconditions --> | ||
<click selector="{{StorefrontCustomerOrdersGridSection.orderView({$grabOrderNumber})}}" stepKey="clickOrderView"/> | ||
<waitForPageLoad stepKey="waitForOrderPageLoad"/> | ||
|
||
<!-- Assert: Pager is displayed for 21 order items --> | ||
<seeElement selector="{{StorefrontCustomerOrderViewSection.pager}}" stepKey="assertPagerIsDisplayed"/> | ||
</test> | ||
</tests> |
Oops, something went wrong.