123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391 |
- <?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 -> Create New Customer)-->
- <actionGroup name="navigateToNewOrderPageNewCustomer">
- <arguments>
- <argument name="storeView" defaultValue="_defaultStore"/>
- </arguments>
- <amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/>
- <waitForPageLoad stepKey="waitForIndexPageLoad"/>
- <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/>
- <click selector="{{AdminOrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/>
- <click selector="{{AdminOrderFormActionSection.CreateNewCustomer}}" stepKey="clickCreateCustomer"/>
- <click selector="{{AdminOrderStoreScopeTreeSection.storeOption(storeView.name)}}" stepKey="selectDefaultStoreView"/>
- <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/>
- </actionGroup>
- <!--Navigate to create order page (New Order -> Create New Customer)-->
- <actionGroup name="navigateToNewOrderPageNewCustomerSingleStore">
- <arguments>
- <argument name="storeView" defaultValue="_defaultStore"/>
- </arguments>
- <amOnPage url="{{AdminOrdersPage.url}}" stepKey="navigateToOrderIndexPage"/>
- <waitForPageLoad stepKey="waitForIndexPageLoad"/>
- <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Orders" stepKey="seeIndexPageTitle"/>
- <click selector="{{AdminOrdersGridSection.createNewOrder}}" stepKey="clickCreateNewOrder"/>
- <click selector="{{AdminOrderFormActionSection.CreateNewCustomer}}" stepKey="clickCreateCustomer"/>
- <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/>
- </actionGroup>
- <!--Navigate to create order page (New Order -> Select Customer)-->
- <actionGroup name="navigateToNewOrderPageExistingCustomer">
- <arguments>
- <argument name="customer"/>
- <argument name="storeView" defaultValue="_defaultStore"/>
- </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"/>
- <!--Clear grid filters-->
- <conditionalClick selector="{{AdminOrderCustomersGridSection.resetButton}}" dependentSelector="{{AdminOrderCustomersGridSection.resetButton}}" visible="true" stepKey="clearExistingCustomerFilters"/>
- <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" />
- <!-- Select store view if appears -->
- <conditionalClick selector="{{AdminOrderStoreScopeTreeSection.storeOption(storeView.name)}}" dependentSelector="{{AdminOrderStoreScopeTreeSection.storeOption(storeView.name)}}" visible="true" stepKey="selectStoreViewIfAppears"/>
- <waitForPageLoad stepKey="waitForCreateOrderPageLoadAfterStoreSelect" />
- <see selector="{{AdminHeaderSection.pageTitle}}" userInput="Create New Order" stepKey="seeNewOrderPageTitle"/>
- </actionGroup>
- <!--Navigate to New Order Page for existing Customer And Store-->
- <actionGroup name="NavigateToNewOrderPageExistingCustomerAndStoreActionGroup" extends="navigateToNewOrderPageExistingCustomer" >
- <arguments>
- <argument name="storeView" defaultValue="_defaultStore"/>
- </arguments>
- <click selector="{{AdminOrderStoreScopeTreeSection.storeOption(storeView.name)}}" stepKey="selectStoreView" after="waitForCreateOrderPageLoad"/>
- <waitForPageLoad stepKey="waitForLoad" after="selectStoreView"/>
- </actionGroup>
- <!--Check the required fields are actually required-->
- <actionGroup name="checkRequiredFieldsNewOrderForm">
- <seeElement selector="{{AdminOrderFormAccountSection.requiredGroup}}" stepKey="seeCustomerGroupRequired"/>
- <seeElement selector="{{AdminOrderFormAccountSection.requiredEmail}}" stepKey="seeEmailRequired"/>
- <clearField selector="{{AdminOrderFormAccountSection.email}}" stepKey="clearEmailField"/>
- <clearField selector="{{AdminOrderFormBillingAddressSection.FirstName}}" stepKey="clearFirstNameField"/>
- <clearField selector="{{AdminOrderFormBillingAddressSection.LastName}}" stepKey="clearLastNameField"/>
- <clearField selector="{{AdminOrderFormBillingAddressSection.StreetLine1}}" stepKey="clearStreetField"/>
- <clearField selector="{{AdminOrderFormBillingAddressSection.City}}" stepKey="clearCityField"/>
- <selectOption selector="{{AdminOrderFormBillingAddressSection.Country}}" userInput="United States" stepKey="selectUSCountry"/>
- <selectOption selector="{{AdminOrderFormBillingAddressSection.State}}" userInput="Please select" stepKey="selectNoState"/>
- <clearField selector="{{AdminOrderFormBillingAddressSection.PostalCode}}" stepKey="clearPostalCodeField"/>
- <clearField selector="{{AdminOrderFormBillingAddressSection.Phone}}" stepKey="clearPhoneField"/>
- <seeElement selector="{{AdminOrderFormPaymentSection.getShippingMethods}}" stepKey="seeShippingMethodNotSelected"/>
- <click selector="{{AdminOrderFormActionSection.SubmitOrder}}" stepKey="trySubmitOrder"/>
- <see selector="{{AdminOrderFormBillingAddressSection.emailError}}" userInput="This is a required field." stepKey="seeThatEmailIsRequired"/>
- <see selector="{{AdminOrderFormBillingAddressSection.firstNameError}}" userInput="This is a required field." stepKey="seeFirstNameRequired"/>
- <see selector="{{AdminOrderFormBillingAddressSection.lastNameError}}" userInput="This is a required field." stepKey="seeLastNameRequired"/>
- <see selector="{{AdminOrderFormBillingAddressSection.streetAddressError}}" userInput="This is a required field." stepKey="seeStreetRequired"/>
- <see selector="{{AdminOrderFormBillingAddressSection.cityError}}" userInput="This is a required field." stepKey="seeCityRequired"/>
- <see selector="{{AdminOrderFormBillingAddressSection.stateError}}" userInput="This is a required field." stepKey="seeStateRequired"/>
- <see selector="{{AdminOrderFormBillingAddressSection.postalCodeError}}" userInput="This is a required field." stepKey="seePostalCodeRequired"/>
- <see selector="{{AdminOrderFormBillingAddressSection.phoneError}}" userInput="This is a required field." stepKey="seePhoneRequired"/>
- <see selector="{{AdminOrderFormPaymentSection.shippingError}}" userInput="This is a required field." stepKey="seeShippingMethodRequired"/>
- </actionGroup>
- <!--Add a simple product to order-->
- <actionGroup name="addSimpleProductToOrder">
- <arguments>
- <argument name="product" defaultValue="_defaultProduct"/>
- </arguments>
- <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
- <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilter"/>
- <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearch"/>
- <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/>
- <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectProduct"/>
- <fillField selector="{{AdminOrderFormItemsSection.rowQty('1')}}" userInput="1" stepKey="fillProductQty"/>
- <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/>
- <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/>
- <wait time="5" stepKey="waitForOptionsToLoad"/>
- </actionGroup>
- <!--Add configurable product to order -->
- <actionGroup name="addConfigurableProductToOrder">
- <arguments>
- <argument name="product"/>
- <argument name="attribute"/>
- <argument name="option"/>
- </arguments>
- <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
- <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterConfigurable"/>
- <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchConfigurable"/>
- <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/>
- <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectConfigurableProduct"/>
- <waitForElementVisible selector="{{AdminOrderFormConfigureProductSection.optionSelect(attribute.default_label)}}" stepKey="waitForConfigurablePopover"/>
- <wait time="2" stepKey="waitForOptionsToLoad"/>
- <selectOption selector="{{AdminOrderFormConfigureProductSection.optionSelect(attribute.default_label)}}"
- userInput="{{option.name}}" stepKey="selectionConfigurableOption"/>
- <click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOkConfigurablePopover"/>
- <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/>
- <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/>
- </actionGroup>
- <!--Add configurable product to order -->
- <actionGroup name="addConfigurableProductToOrderFromAdmin" extends="addConfigurableProductToOrder">
- <waitForElementVisible selector="{{AdminOrderFormConfigureProductSection.optionSelect(attribute.default_frontend_label)}}" stepKey="waitForConfigurablePopover"/>
- <selectOption selector="{{AdminOrderFormConfigureProductSection.optionSelect(attribute.default_frontend_label)}}"
- userInput="{{option.label}}" stepKey="selectionConfigurableOption"/>
- </actionGroup>
- <actionGroup name="configureOrderedConfigurableProduct">
- <arguments>
- <argument name="attribute"/>
- <argument name="option"/>
- <argument name="quantity" type="string"/>
- </arguments>
- <click selector="{{AdminOrderFormItemsSection.configure}}" stepKey="clickConfigure"/>
- <waitForElementVisible selector="{{AdminOrderFormConfigureProductSection.optionSelect(attribute.default_frontend_label)}}" stepKey="waitForConfigurablePopover"/>
- <wait time="2" stepKey="waitForOptionsToLoad"/>
- <selectOption selector="{{AdminOrderFormConfigureProductSection.optionSelect(attribute.default_frontend_label)}}"
- userInput="{{option.label}}" stepKey="selectionConfigurableOption"/>
- <fillField selector="{{AdminOrderFormConfigureProductSection.quantity}}" userInput="{{quantity}}" stepKey="fillQuantity"/>
- <click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOkConfigurablePopover"/>
- </actionGroup>
- <!--Add bundle product to order -->
- <actionGroup name="addBundleProductToOrder">
- <arguments>
- <argument name="product"/>
- <argument name="quantity" type="string" defaultValue="1"/>
- </arguments>
- <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
- <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterBundle"/>
- <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchBundle"/>
- <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/>
- <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectBundleProduct"/>
- <waitForElementVisible selector="{{AdminOrderFormBundleProductSection.quantity}}" stepKey="waitForBundleOptionLoad"/>
- <wait time="2" stepKey="waitForOptionsToLoad"/>
- <fillField selector="{{AdminOrderFormBundleProductSection.quantity}}" userInput="{{quantity}}" stepKey="fillQuantity"/>
- <click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOk"/>
- <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/>
- <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/>
- </actionGroup>
- <!--Add bundle product to order and check product price in the grid-->
- <actionGroup name="addBundleProductToOrderAndCheckPriceInGrid" extends="addBundleProductToOrder">
- <arguments>
- <argument name="price" type="string"/>
- </arguments>
- <grabTextFrom selector="{{AdminOrderFormItemsSection.rowPrice('1')}}" stepKey="grabProductPriceFromGrid" after="clickOk"/>
- <assertEquals stepKey="assertProductPriceInGrid" message="Bundle product price in grid should be equal {{price}}" after="grabProductPriceFromGrid">
- <expectedResult type="string">{{price}}</expectedResult>
- <actualResult type="variable">grabProductPriceFromGrid</actualResult>
- </assertEquals>
- </actionGroup>
- <!--Add downloadable product to order -->
- <actionGroup name="addDownloadableProductToOrder">
- <arguments>
- <argument name="product"/>
- <argument name="link"/>
- <argument name="quantity" defaultValue="1" type="string"/>
- </arguments>
- <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
- <waitForPageLoad time="30" stepKey="waitForPageLoad1"/>
- <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterDownloadable"/>
- <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchDownloadable"/>
- <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/>
- <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectDownloadableProduct"/>
- <waitForElementVisible selector="{{AdminOrderFormDownloadableProductSection.optionSelect(link.title)}}" stepKey="waitForLinkLoad"/>
- <click selector="{{AdminOrderFormDownloadableProductSection.optionSelect(link.title)}}" stepKey="selectLink"/>
- <fillField selector="{{AdminOrderFormDownloadableProductSection.quantity}}" userInput="{{quantity}}" stepKey="setQuantity"/>
- <click selector="{{AdminOrderFormDownloadableProductSection.ok}}" stepKey="confirmConfiguration"/>
- <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/>
- <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/>
- </actionGroup>
- <!--Add grouped product option to order -->
- <actionGroup name="addGroupedProductOptionToOrder">
- <arguments>
- <argument name="product"/>
- <argument name="option"/>
- <argument name="quantity" type="string" defaultValue="1"/>
- </arguments>
- <click selector="{{AdminOrderFormItemsSection.addProducts}}" stepKey="clickAddProducts"/>
- <fillField selector="{{AdminOrderFormItemsSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillSkuFilterGrouped"/>
- <click selector="{{AdminOrderFormItemsSection.search}}" stepKey="clickSearchGrouped"/>
- <scrollTo selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" x="0" y="-100" stepKey="scrollToCheckColumn"/>
- <checkOption selector="{{AdminOrderFormItemsSection.rowCheck('1')}}" stepKey="selectGroupedProduct"/>
- <waitForElementVisible selector="{{AdminOrderFormGroupedProductSection.optionQty(option.sku)}}" stepKey="waitForGroupedOptionLoad"/>
- <wait time="2" stepKey="waitForOptionsToLoad"/>
- <fillField selector="{{AdminOrderFormGroupedProductSection.optionQty(option.sku)}}" userInput="{{quantity}}" stepKey="fillOptionQuantity"/>
- <click selector="{{AdminOrderFormConfigureProductSection.ok}}" stepKey="clickOk"/>
- <scrollTo selector="{{AdminOrderFormItemsSection.addSelected}}" x="0" y="-100" stepKey="scrollToAddSelectedButton"/>
- <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="clickAddSelectedProducts"/>
- </actionGroup>
- <!--Fill customer billing address-->
- <actionGroup name="fillOrderCustomerInformation">
- <arguments>
- <argument name="customer"/>
- <argument name="address"/>
- </arguments>
- <fillField selector="{{AdminOrderFormBillingAddressSection.FirstName}}" userInput="{{customer.firstname}}" stepKey="fillFirstName"/>
- <fillField selector="{{AdminOrderFormBillingAddressSection.LastName}}" userInput="{{customer.lastname}}" stepKey="fillLastName"/>
- <fillField selector="{{AdminOrderFormBillingAddressSection.StreetLine1}}" userInput="{{address.street[0]}}" stepKey="fillStreetLine1"/>
- <fillField selector="{{AdminOrderFormBillingAddressSection.City}}" userInput="{{address.city}}" stepKey="fillCity"/>
- <selectOption selector="{{AdminOrderFormBillingAddressSection.Country}}" userInput="{{address.country_id}}" stepKey="fillCountry"/>
- <selectOption selector="{{AdminOrderFormBillingAddressSection.State}}" userInput="{{address.state}}" stepKey="fillState"/>
- <fillField selector="{{AdminOrderFormBillingAddressSection.PostalCode}}" userInput="{{address.postcode}}" stepKey="fillPostalCode"/>
- <fillField selector="{{AdminOrderFormBillingAddressSection.Phone}}" userInput="{{address.telephone}}" stepKey="fillPhone"/>
- </actionGroup>
- <!--Select flat rate shipping method-->
- <actionGroup name="orderSelectFlatRateShipping">
- <click selector="{{AdminOrderFormPaymentSection.header}}" stepKey="unfocus"/>
- <waitForPageLoad stepKey="waitForJavascriptToFinish"/>
- <click selector="{{AdminOrderFormPaymentSection.getShippingMethods}}" stepKey="clickShippingMethods"/>
- <waitForElementVisible selector="{{AdminOrderFormPaymentSection.flatRateOption}}" stepKey="waitForShippingOptions"/>
- <selectOption selector="{{AdminOrderFormPaymentSection.flatRateOption}}" userInput="flatrate_flatrate" stepKey="checkFlatRate"/>
- </actionGroup>
- <!--Select free shipping method-->
- <actionGroup name="orderSelectFreeShipping">
- <click selector="{{AdminOrderFormPaymentSection.header}}" stepKey="unfocus"/>
- <waitForPageLoad stepKey="waitForJavascriptToFinish"/>
- <click selector="{{AdminOrderFormPaymentSection.getShippingMethods}}" stepKey="clickShippingMethods"/>
- <waitForElementVisible selector="{{AdminOrderFormPaymentSection.freeShippingOption}}" stepKey="waitForShippingOptions"/>
- <selectOption selector="{{AdminOrderFormPaymentSection.freeShippingOption}}" userInput="freeshipping_freeshipping" stepKey="checkFreeShipping"/>
- </actionGroup>
- <!--Check that customer information is correct in order-->
- <actionGroup name="verifyBasicOrderInformation">
- <arguments>
- <argument name="customer"/>
- <argument name="shippingAddress"/>
- <argument name="billingAddress"/>
- <argument name="customerGroup" defaultValue="GeneralCustomerGroup"/>
- </arguments>
- <see selector="{{AdminOrderDetailsInformationSection.customerName}}" userInput="{{customer.firstname}}" stepKey="seeCustomerName"/>
- <see selector="{{AdminOrderDetailsInformationSection.customerEmail}}" userInput="{{customer.email}}" stepKey="seeCustomerEmail"/>
- <see selector="{{AdminOrderDetailsInformationSection.customerGroup}}" userInput="{{customerGroup.code}}" stepKey="seeCustomerGroup"/>
- <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.street[0]}}" stepKey="seeBillingAddressStreet"/>
- <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.city}}" stepKey="seeBillingAddressCity"/>
- <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.country_id}}" stepKey="seeBillingAddressCountry"/>
- <see selector="{{AdminOrderAddressInformationSection.billingAddress}}" userInput="{{billingAddress.postcode}}" stepKey="seeBillingAddressPostcode"/>
- <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.street[0]}}" stepKey="seeShippingAddressStreet"/>
- <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.city}}" stepKey="seeShippingAddressCity"/>
- <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.country_id}}" stepKey="seeShippingAddressCountry"/>
- <see selector="{{AdminOrderAddressInformationSection.shippingAddress}}" userInput="{{shippingAddress.postcode}}" stepKey="seeShippingAddressPostcode"/>
- </actionGroup>
- <!--Verify order information-->
- <actionGroup name="verifyCreatedOrderInformation">
- <see selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="You created the order." stepKey="seeSuccessMessage"/>
- <see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="Pending" stepKey="seeOrderPendingStatus" after="seeSuccessMessage"/>
- <grabTextFrom selector="|Order # (\d+)|" stepKey="getOrderId" after="seeOrderPendingStatus"/>
- <assertNotEmpty actual="$getOrderId" stepKey="assertOrderIdIsNotEmpty" after="getOrderId"/>
- </actionGroup>
- <!--Check for product in order items list-->
- <actionGroup name="seeProductInItemsOrdered">
- <arguments>
- <argument name="product"/>
- </arguments>
- <see selector="{{AdminOrderItemsOrderedSection.productSkuColumn}}" userInput="{{product.sku}}" stepKey="seeSkuInItemsOrdered"/>
- </actionGroup>
- <actionGroup name="CreateOrderInStoreActionGroup">
- <arguments>
- <argument name="product"/>
- <argument name="customer"/>
- <argument name="storeView"/>
- </arguments>
- <amOnPage stepKey="navigateToNewOrderPage" url="{{AdminOrderCreatePage.url}}"/>
- <click stepKey="chooseCustomer" selector="{{AdminOrdersGridSection.customerInOrdersSection(customer.firstname)}}"/>
- <waitForPageLoad stepKey="waitForStoresPageOpened"/>
- <click stepKey="chooseStore" selector="{{AdminOrderStoreScopeTreeSection.storeForOrder(storeView.name)}}"/>
- <scrollToTopOfPage stepKey="scrollToTop"/>
- <waitForPageLoad stepKey="waitForStoreToAppear"/>
- <click selector="{{OrdersGridSection.addProducts}}" stepKey="clickOnAddProducts"/>
- <waitForPageLoad stepKey="waitForProductsListForOrder"/>
- <click selector="{{AdminOrdersGridSection.productForOrder(product.sku)}}" stepKey="chooseTheProduct"/>
- <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="addSelectedProductToOrder"/>
- <waitForPageLoad stepKey="waitForProductAddedInOrder"/>
- <click selector="{{AdminInvoicePaymentShippingSection.getShippingMethodAndRates}}" stepKey="openShippingMethod"/>
- <waitForPageLoad stepKey="waitForShippingMethods"/>
- <click selector="{{AdminInvoicePaymentShippingSection.shippingMethod}}" stepKey="chooseShippingMethod"/>
- <waitForPageLoad stepKey="waitForShippingMethodsThickened"/>
- <click selector="{{OrdersGridSection.submitOrder}}" stepKey="submitOrder"/>
- <see stepKey="seeSuccessMessageForOrder" userInput="You created the order."/>
- </actionGroup>
- <actionGroup name="CreateOrderInStoreChoosingPaymentMethodActionGroup">
- <arguments>
- <argument name="product"/>
- <argument name="customer"/>
- <argument name="storeView"/>
- </arguments>
- <amOnPage stepKey="navigateToNewOrderPage" url="{{AdminOrderCreatePage.url}}"/>
- <click stepKey="chooseCustomer" selector="{{AdminOrdersGridSection.customerInOrdersSection(customer.firstname)}}"/>
- <waitForPageLoad stepKey="waitForStoresPageOpened"/>
- <click stepKey="chooseStore" selector="{{AdminOrderStoreScopeTreeSection.storeForOrder(storeView.name)}}"/>
- <scrollToTopOfPage stepKey="scrollToTop"/>
- <click selector="{{OrdersGridSection.addProducts}}" stepKey="clickOnAddProducts"/>
- <waitForPageLoad stepKey="waitForProductsListForOrder"/>
- <click selector="{{AdminOrdersGridSection.productForOrder(product.sku)}}" stepKey="chooseTheProduct"/>
- <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="addSelectedProductToOrder"/>
- <waitForPageLoad stepKey="waitForProductAddedInOrder"/>
- <click selector="{{AdminInvoicePaymentShippingSection.getShippingMethodAndRates}}" stepKey="openShippingMethod"/>
- <waitForPageLoad stepKey="waitForShippingMethods"/>
- <click selector="{{AdminInvoicePaymentShippingSection.shippingMethod}}" stepKey="chooseShippingMethod"/>
- <waitForPageLoad stepKey="waitForShippingMethodsThickened"/>
- <waitForElementVisible selector="{{AdminOrderFormPaymentSection.paymentBlock}}" stepKey="waitForPaymentOptions"/>
- <conditionalClick selector="{{AdminOrderFormPaymentSection.checkMoneyOption}}" dependentSelector="{{AdminOrderFormPaymentSection.checkMoneyOption}}" visible="true" stepKey="checkCheckMoneyOption"/>
- <click selector="{{OrdersGridSection.submitOrder}}" stepKey="submitOrder"/>
- <see stepKey="seeSuccessMessageForOrder" userInput="You created the order."/>
- </actionGroup>
- <!--Cancel order that is in pending status-->
- <actionGroup name="cancelPendingOrder">
- <arguments>
- <argument name="orderStatus" type="string" defaultValue="Canceled"/>
- </arguments>
- <click selector="{{AdminOrderDetailsMainActionsSection.cancel}}" stepKey="clickCancelOrder"/>
- <waitForElement selector="{{AdminConfirmationModalSection.message}}" stepKey="waitForCancelConfirmation"/>
- <see selector="{{AdminConfirmationModalSection.message}}" userInput="Are you sure you want to cancel this order?" stepKey="seeConfirmationMessage"/>
- <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmOrderCancel"/>
- <see selector="{{AdminMessagesSection.success}}" userInput="You canceled the order." stepKey="seeCancelSuccessMessage"/>
- <see selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{orderStatus}}" stepKey="seeOrderStatusCanceled"/>
- </actionGroup>
- <!--Select Check Money payment method-->
- <actionGroup name="SelectCheckMoneyPaymentMethod">
- <waitForElementVisible selector="{{AdminOrderFormPaymentSection.paymentBlock}}" stepKey="waitForPaymentOptions"/>
- <conditionalClick selector="{{AdminOrderFormPaymentSection.checkMoneyOption}}" dependentSelector="{{AdminOrderFormPaymentSection.checkMoneyOption}}" visible="true" stepKey="checkCheckMoneyOption"/>
- </actionGroup>
- <!-- Create Order -->
- <actionGroup name="CreateOrderActionGroup">
- <arguments>
- <argument name="product"/>
- <argument name="customer"/>
- </arguments>
- <amOnPage stepKey="navigateToNewOrderPage" url="{{AdminOrderCreatePage.url}}"/>
- <click stepKey="chooseCustomer" selector="{{AdminOrdersGridSection.customerInOrdersSection(customer.firstname)}}"/>
- <waitForPageLoad stepKey="waitForStoresPageOpened"/>
- <click selector="{{OrdersGridSection.addProducts}}" stepKey="clickOnAddProducts"/>
- <waitForPageLoad stepKey="waitForProductsListForOrder"/>
- <click selector="{{AdminOrdersGridSection.productForOrder(product.sku)}}" stepKey="chooseTheProduct"/>
- <click selector="{{AdminOrderFormItemsSection.addSelected}}" stepKey="addSelectedProductToOrder"/>
- <waitForPageLoad stepKey="waitForProductAddedInOrder"/>
- <click selector="{{AdminInvoicePaymentShippingSection.getShippingMethodAndRates}}" stepKey="openShippingMethod"/>
- <waitForPageLoad stepKey="waitForShippingMethods"/>
- <click selector="{{AdminInvoicePaymentShippingSection.shippingMethod}}" stepKey="chooseShippingMethod"/>
- <waitForPageLoad stepKey="waitForShippingMethodsThickened"/>
- <click selector="{{OrdersGridSection.submitOrder}}" stepKey="submitOrder"/>
- <see stepKey="seeSuccessMessageForOrder" userInput="You created the order."/>
- </actionGroup>
- </actionGroups>
|