AdminCreateCustomerWithWebsiteAndStoreViewActionGroup.xml 5.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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="AdminCreateCustomerWithWebsiteAndStoreViewActionGroup">
  11. <arguments>
  12. <argument name="customerData"/>
  13. <argument name="address"/>
  14. <argument name="website" type="string"/>
  15. <argument name="storeView" type="string"/>
  16. </arguments>
  17. <amOnPage url="{{AdminCustomerPage.url}}" stepKey="goToCustomersPage"/>
  18. <click stepKey="addNewCustomer" selector="{{AdminCustomerGridMainActionsSection.addNewCustomer}}"/>
  19. <selectOption stepKey="selectWebSite" selector="{{AdminCustomerAccountInformationSection.associateToWebsite}}" userInput="{{website}}"/>
  20. <fillField stepKey="FillFirstName" selector="{{AdminCustomerAccountInformationSection.firstName}}" userInput="{{customerData.firstname}}"/>
  21. <fillField stepKey="FillLastName" selector="{{AdminCustomerAccountInformationSection.lastName}}" userInput="{{customerData.lastname}}"/>
  22. <fillField stepKey="FillEmail" selector="{{AdminCustomerAccountInformationSection.email}}" userInput="{{customerData.email}}"/>
  23. <selectOption stepKey="selectStoreView" selector="{{AdminCustomerAccountInformationSection.storeView}}" userInput="{{storeView}}"/>
  24. <scrollToTopOfPage stepKey="scrollToTopOfThePage"/>
  25. <click stepKey="saveCustomer" selector="{{AdminCustomerAccountInformationSection.saveCustomerAndContinueEdit}}"/>
  26. <waitForPageLoad stepKey="waitForCustomersPage"/>
  27. <see stepKey="seeSuccessMessage" userInput="You saved the customer."/>
  28. <click stepKey="goToAddresses" selector="{{AdminCustomerAccountInformationSection.addressesButton}}"/>
  29. <waitForPageLoad stepKey="waitForAddresses"/>
  30. <click stepKey="clickOnAddNewAddress" selector="{{AdminCustomerAddressesSection.addNewAddress}}"/>
  31. <waitForPageLoad stepKey="waitForAddressFields"/>
  32. <click stepKey="thickBillingAddress" selector="{{AdminCustomerAddressesSection.defaultBillingAddress}}"/>
  33. <click stepKey="thickShippingAddress" selector="{{AdminCustomerAddressesSection.defaultShippingAddress}}"/>
  34. <fillField stepKey="fillFirstNameForAddress" selector="{{AdminCustomerAddressesSection.firstNameForAddress}}" userInput="{{address.firstname}}"/>
  35. <fillField stepKey="fillLastNameForAddress" selector="{{AdminCustomerAddressesSection.lastNameForAddress}}" userInput="{{address.lastname}}"/>
  36. <fillField stepKey="fillStreetAddress" selector="{{AdminCustomerAddressesSection.streetAddress}}" userInput="{{address.street[0]}}"/>
  37. <fillField stepKey="fillCity" selector="{{AdminCustomerAddressesSection.city}}" userInput="{{address.city}}"/>
  38. <selectOption stepKey="selectCountry" selector="{{AdminCustomerAddressesSection.country}}" userInput="{{address.country}}"/>
  39. <selectOption stepKey="selectState" selector="{{AdminCustomerAddressesSection.state}}" userInput="{{address.state}}"/>
  40. <fillField stepKey="fillZip" selector="{{AdminCustomerAddressesSection.zip}}" userInput="{{address.postcode}}"/>
  41. <fillField stepKey="fillPhoneNumber" selector="{{AdminCustomerAddressesSection.phoneNumber}}" userInput="{{address.telephone}}"/>
  42. <click stepKey="saveAddress" selector="{{AdminCustomerAddressesSection.saveAddress}}"/>
  43. <waitForPageLoad stepKey="waitForAddressSave"/>
  44. </actionGroup>
  45. <actionGroup name="AdminCreateCustomerWithWebSiteAndGroup">
  46. <arguments>
  47. <argument name="customerData" defaultValue="Simple_US_Customer"/>
  48. <argument name="website" type="string" defaultValue="customWebsite"/>
  49. <argument name="storeView" type="string" defaultValue="customStore"/>
  50. </arguments>
  51. <amOnPage url="{{AdminCustomerPage.url}}" stepKey="goToCustomersPage"/>
  52. <click stepKey="addNewCustomer" selector="{{AdminCustomerGridMainActionsSection.addNewCustomer}}"/>
  53. <selectOption stepKey="selectWebSite" selector="{{AdminCustomerAccountInformationSection.associateToWebsite}}" userInput="{{website}}"/>
  54. <click selector="{{AdminCustomerAccountInformationSection.group}}" stepKey="ClickToExpandGroup"/>
  55. <waitForElement selector="{{AdminProductFormAdvancedPricingSection.productTierPriceGroupOrCatalogOption('Default (General)')}}" stepKey="waitForCustomerGroupExpand"/>
  56. <click selector="{{AdminCustomerAccountInformationSection.groupValue('Default (General)')}}" after="waitForCustomerGroupExpand" stepKey="ClickToSelectGroup"/>
  57. <fillField stepKey="FillFirstName" selector="{{AdminCustomerAccountInformationSection.firstName}}" userInput="{{customerData.firstname}}"/>
  58. <fillField stepKey="FillLastName" selector="{{AdminCustomerAccountInformationSection.lastName}}" userInput="{{customerData.lastname}}"/>
  59. <fillField stepKey="FillEmail" selector="{{AdminCustomerAccountInformationSection.email}}" userInput="{{customerData.email}}"/>
  60. <selectOption stepKey="selectStoreView" selector="{{AdminCustomerAccountInformationSection.storeView}}" userInput="{{storeView}}"/>
  61. <waitForElement selector="{{AdminCustomerAccountInformationSection.storeView}}" stepKey="waitForCustomerStoreViewExpand"/>
  62. <click stepKey="save" selector="{{AdminCustomerAccountInformationSection.saveCustomer}}"/>
  63. <waitForPageLoad stepKey="waitForCustomersPage"/>
  64. <see stepKey="seeSuccessMessage" userInput="You saved the customer."/>
  65. </actionGroup>
  66. </actionGroups>