OpenEditCustomerFromAdminActionGroup.xml 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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="OpenEditCustomerFromAdminActionGroup">
  11. <arguments>
  12. <argument name="customer"/>
  13. </arguments>
  14. <amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/>
  15. <waitForPageLoad stepKey="waitForPageLoad1" />
  16. <click selector="{{AdminCustomerFiltersSection.filtersButton}}" stepKey="openFilter"/>
  17. <fillField userInput="{{customer.email}}" selector="{{AdminCustomerFiltersSection.emailInput}}" stepKey="filterEmail"/>
  18. <click selector="{{AdminCustomerFiltersSection.apply}}" stepKey="applyFilter"/>
  19. <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
  20. <click selector="{{AdminCustomerGridSection.firstRowEditLink}}" stepKey="clickEdit"/>
  21. <waitForPageLoad stepKey="waitForPageLoad2" />
  22. </actionGroup>
  23. <actionGroup name="OpenEditCustomerAddressFromAdminActionGroup">
  24. <arguments>
  25. <argument name="address"/>
  26. </arguments>
  27. <click selector="{{AdminCustomerAccountInformationSection.addressesButton}}" stepKey="openAddressesTab"/>
  28. <waitForElementVisible selector="{{AdminCustomerAddressFiltersSection.filtersButton}}" stepKey="waitForComponentLoad"/>
  29. <click selector="{{AdminCustomerAddressFiltersSection.filtersButton}}" stepKey="openAddressesFilter"/>
  30. <fillField userInput="{{address.firstname}}" selector="{{AdminCustomerAddressFiltersSection.firstnameInput}}" stepKey="fillFirstname"/>
  31. <fillField userInput="{{address.lastname}}" selector="{{AdminCustomerAddressFiltersSection.lastnameInput}}" stepKey="fillLastname"/>
  32. <fillField userInput="{{address.telephone}}" selector="{{AdminCustomerAddressFiltersSection.telephoneInput}}" stepKey="fillCountry"/>
  33. <fillField userInput="{{address.postcode}}" selector="{{AdminCustomerAddressFiltersSection.postcodeInput}}" stepKey="fillPostcode"/>
  34. <click selector="{{AdminCustomerAddressFiltersSection.applyFilter}}" stepKey="applyAddressesFilter"/>
  35. <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
  36. <click selector="{{AdminCustomerAddressGridSection.firstRowSelectActionLink}}" stepKey="clickAction"/>
  37. <click selector="{{AdminCustomerAddressGridSection.firstRowEditActionLink}}" stepKey="clickEdit"/>
  38. <waitForPageLoad stepKey="waitForModalWindow" />
  39. </actionGroup>
  40. <actionGroup name="DeleteCustomerFromAdminActionGroup">
  41. <arguments>
  42. <argument name="customer" defaultValue="CustomerEntityOne"/>
  43. </arguments>
  44. <amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/>
  45. <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickOnButtonToRemoveFiltersIfPresent"/>
  46. <fillField selector="{{AdminDataGridHeaderSection.search}}" userInput="{{customer.email}}" stepKey="fillSearch"/>
  47. <click selector="{{AdminDataGridHeaderSection.submitSearch}}" stepKey="clickSubmit"/>
  48. <waitForAjaxLoad stepKey="waitForLoadAjax"/>
  49. <click selector="{{AdminCustomerGridMainActionsSection.multicheck}}" stepKey="selectAll"/>
  50. <click selector="{{AdminCustomerGridMainActionsSection.actions}}" stepKey="clickActions"/>
  51. <click selector="{{AdminCustomerGridMainActionsSection.delete}}" stepKey="clickDelete"/>
  52. <waitForAjaxLoad stepKey="waitForLoadConfirmation"/>
  53. <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmDelete"/>
  54. <see selector="{{AdminMessagesSection.successMessage}}" userInput="A total of 1 record(s) were deleted" stepKey="seeSuccess"/>
  55. </actionGroup>
  56. <actionGroup name="AdminClearCustomersFiltersActionGroup">
  57. <amOnPage url="{{AdminCustomerPage.url}}" stepKey="amOnCustomersPage"/>
  58. <waitForPageLoad stepKey="WaitForPageToLoad"/>
  59. <conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickOnButtonToRemoveFiltersIfPresent"/>
  60. </actionGroup>
  61. </actionGroups>