AdminCustomerShopingCartActionGroup.xml 1.8 KB

123456789101112131415161718192021222324252627
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9. xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
  10. <actionGroup name="AdminAddProductToShoppingCartActionGroup">
  11. <arguments>
  12. <argument name="productName" type="string"/>
  13. </arguments>
  14. <waitForElementVisible selector="{{AdminCustomerShoppingCartProductItemSection.productItem}}" stepKey="waitForElementVisible"/>
  15. <click selector="{{AdminCustomerShoppingCartProductItemSection.productItem}}" stepKey="expandProductItem"/>
  16. <waitForElementVisible selector="{{AdminCustomerShoppingCartProductItemSection.productNameFilter}}" stepKey="waitForProductFilterFieldVisible"/>
  17. <fillField selector="{{AdminCustomerShoppingCartProductItemSection.productNameFilter}}" stepKey="setProductName" userInput="{{productName}}"/>
  18. <click selector="{{AdminCustomerShoppingCartProductItemSection.searchButton}}" stepKey="clickSearchButton"/>
  19. <waitForAjaxLoad stepKey="waitForAjax"/>
  20. <waitForElementVisible selector="{{AdminCustomerShoppingCartProductItemSection.firstProductCheckbox}}" stepKey="waitForElementCheckboxVisible"/>
  21. <click selector="{{AdminCustomerShoppingCartProductItemSection.firstProductCheckbox}}" stepKey="selectFirstCheckbox"/>
  22. <click selector="{{AdminCustomerShoppingCartProductItemSection.addSelectionsToMyCartButton}}" stepKey="clickAddSelectionsToMyCartButton" after="selectFirstCheckbox"/>
  23. <waitForAjaxLoad stepKey="waitForAjax2"/>
  24. <seeElement stepKey="seeAddedProduct" selector="{{AdminCustomerShoppingCartProductItemSection.addedProductName('productName')}}"/>
  25. </actionGroup>
  26. </actionGroups>