AdminDeleteCustomerAddressesFromTheGridViaMassActionsTest.xml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
  9. <test name="AdminDeleteCustomerAddressesFromTheGridViaMassActionsTest">
  10. <annotations>
  11. <title value="Admin delete customer addresses from the grid via mass actions"/>
  12. <description value="Admin delete customer addresses from the grid via mass actions"/>
  13. <features value="Module/ Customer"/>
  14. <severity value="MAJOR"/>
  15. <testCaseId value="MAGETWO-94951"/>
  16. <stories value="MAGETWO-94346: Implement handling of large number of addresses on admin edit customer page"/>
  17. <group value="customer"/>
  18. </annotations>
  19. <before>
  20. <createData entity="Simple_US_Customer_Multiple_Addresses" stepKey="createCustomer"/>
  21. <magentoCLI command="indexer:reindex" stepKey="reindex"/>
  22. <actionGroup ref="LoginAsAdmin" stepKey="login"/>
  23. </before>
  24. <after>
  25. <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
  26. <actionGroup ref="logout" stepKey="logout"/>
  27. </after>
  28. <!-- -
  29. Step1. Login to admin and go to Customers > All Customerts.
  30. Step2. On *Customers* page choose customer from preconditions and open it to edit
  31. Step3. On edit customer page open *Addresses* tab and find a grid with the additional addresses
  32. <!- -->
  33. <amOnPage url="{{AdminCustomerPage.url}}" stepKey="openCustomersGridPage"/>
  34. <actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="openEditCustomerPage">
  35. <argument name="customer" value="Simple_US_Customer_Multiple_Addresses"/>
  36. </actionGroup>
  37. <click selector="{{AdminEditCustomerInformationSection.addresses}}" stepKey="openAddressesTab"/>
  38. <conditionalClick selector="{{AdminCustomerAddressFiltersSection.clearAll}}" dependentSelector="{{AdminCustomerAddressFiltersSection.clearAll}}" visible="true" stepKey="clickOnButtonToRemoveFiltersIfPresent"/>
  39. <!-- -
  40. Step4. Check checkboxes for several addresses open *Actions* dropdown at the top of addresses grid and select action *Delete*
  41. Step5. Press *Ok* button on the pop-up
  42. <!- -->
  43. <click selector="{{AdminCustomerAddressesGridSection.firstRowCheckbox}}" stepKey="tickFirstRowCustomerAddressCheckbox"/>
  44. <click selector="{{AdminCustomerAddressesGridSection.secondRowCheckbox}}" stepKey="tickSecondRowCustomerAddressCheckbox"/>
  45. <click selector="{{AdminCustomerAddressesGridActionsSection.actions}}" stepKey="openActionsDropdown"/>
  46. <click selector="{{AdminCustomerAddressesGridActionsSection.delete}}" stepKey="chooseDeleteOption"/>
  47. <waitForPageLoad stepKey="waitForCustomerAddressesGridPageLoad1"/>
  48. <click selector="{{AdminCustomerAddressesGridActionsSection.ok}}" stepKey="clickOkOnPopup"/>
  49. <waitForPageLoad stepKey="waitForCustomerAddressesGridPageLoad2"/>
  50. <see userInput="We couldn't find any records." selector="{{AdminCustomerAddressesGridSection.customerAddressGrid}}" stepKey="checkThatCustomerAddressesGridHasNoRecords"/>
  51. </test>
  52. </tests>