NavigateToNewOrderPageExistingCustomerActionGroup.xml 1.51 KB
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
<?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">
    <!--Navigate to create order page (New Order -> Select Customer)-->
    <actionGroup name="navigateToNewOrderPageExistingCustomer">
        <arguments>
            <argument name="customer"/>
        </arguments>
        <amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/>
        <waitForPageLoad stepKey="waitForIndexPageLoad"/>
        <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/>
        <click selector="{{AdminOrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/>
        <waitForPageLoad stepKey="waitForCustomerGridLoad"/>
        <fillField userInput="{{customer.email}}" selector="{{AdminOrderCustomersGridSection.emailInput}}" stepKey="filterEmail"/>
        <click selector="{{AdminOrderCustomersGridSection.apply}}" stepKey="applyFilter"/>
        <waitForPageLoad stepKey="waitForFilteredCustomerGridLoad"/>
        <click selector="{{AdminOrderCustomersGridSection.firstRow}}" stepKey="clickOnCustomer"/>
        <waitForPageLoad stepKey="waitForCreateOrderPageLoad" />
        <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/>
    </actionGroup>
</actionGroups>