DeleteImageFromStorageActionGroup.xml 1.8 KB

123456789101112131415161718192021222324252627282930
  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="DeleteImageFromStorageActionGroup">
  11. <arguments>
  12. <argument name="Image"/>
  13. </arguments>
  14. <waitForElementVisible selector="{{MediaGallerySection.imageOrImageCopy(Image.fileName, Image.extension)}}" stepKey="waitForInitialImages"/>
  15. <grabMultiple selector="{{MediaGallerySection.imageOrImageCopy(Image.fileName, Image.extension)}}" stepKey="initialImages"/>
  16. <click selector="{{MediaGallerySection.imageOrImageCopy(Image.fileName, Image.extension)}}" stepKey="selectImage"/>
  17. <waitForElementVisible selector="{{MediaGallerySection.DeleteSelectedBtn}}" stepKey="waitForDeleteBtn"/>
  18. <click selector="{{MediaGallerySection.DeleteSelectedBtn}}" stepKey="clickDeleteSelected"/>
  19. <waitForPageLoad stepKey="waitForPageLoad1"/>
  20. <waitForElementVisible selector="{{MediaGallerySection.confirmDelete}}" stepKey="waitForConfirmBtn"/>
  21. <click selector="{{MediaGallerySection.confirmDelete}}" stepKey="clickConfirmBtn"/>
  22. <waitForPageLoad stepKey="waitForPageLoad2"/>
  23. <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/>
  24. <grabMultiple selector="{{MediaGallerySection.imageOrImageCopy(Image.fileName, Image.extension)}}" stepKey="newImages"/>
  25. <assertLessThan stepKey="assertLessImages">
  26. <expectedResult type="variable">initialImages</expectedResult>
  27. <actualResult type="variable">newImages</actualResult>
  28. </assertLessThan>
  29. </actionGroup>
  30. </actionGroups>