AdminRemoveDefaultImageDownloadableProductTest.xml 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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"
  9. xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
  10. <test name="AdminRemoveDefaultImageDownloadableProductTest">
  11. <annotations>
  12. <features value="Downloadable"/>
  13. <stories value="Add/remove images and videos for all product types and category"/>
  14. <title value="Admin should be able to remove default images from a Downloadable Product"/>
  15. <description value="Admin should be able to remove default images from a Downloadable Product"/>
  16. <severity value="MAJOR"/>
  17. <testCaseId value="MC-201"/>
  18. <group value="Downloadable"/>
  19. </annotations>
  20. <before>
  21. <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
  22. </before>
  23. <after>
  24. <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/>
  25. </after>
  26. <!-- Create product -->
  27. <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="adminProductIndexPageAdd"/>
  28. <waitForPageLoad stepKey="waitForProductIndexPageLoad"/>
  29. <actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage">
  30. <argument name="product" value="DownloadableProduct"/>
  31. </actionGroup>
  32. <actionGroup ref="fillMainProductFormNoWeight" stepKey="fillMainProductForm">
  33. <argument name="product" value="DownloadableProduct"/>
  34. </actionGroup>
  35. <!-- Add image to product -->
  36. <actionGroup ref="addProductImage" stepKey="addImageForProduct">
  37. <argument name="image" value="MagentoLogo"/>
  38. </actionGroup>
  39. <!-- Add downloadable links -->
  40. <click selector="{{AdminProductDownloadableSection.sectionHeader}}" stepKey="openDownloadableSection"/>
  41. <checkOption selector="{{AdminProductDownloadableSection.isDownloadableProduct}}" stepKey="checkIsDownloadable"/>
  42. <fillField userInput="{{downloadableData.link_title}}" selector="{{AdminProductDownloadableSection.linksTitleInput}}" stepKey="fillDownloadableLinkTitle"/>
  43. <checkOption selector="{{AdminProductDownloadableSection.isLinksPurchasedSeparately}}" stepKey="checkLinksPurchasedSeparately"/>
  44. <fillField userInput="{{downloadableData.sample_title}}" selector="{{AdminProductDownloadableSection.samplesTitleInput}}" stepKey="fillDownloadableSampleTitle"/>
  45. <actionGroup ref="addDownloadableProductLinkWithMaxDownloads" stepKey="addDownloadableLinkWithMaxDownloads">
  46. <argument name="link" value="downloadableLinkWithMaxDownloads"/>
  47. </actionGroup>
  48. <actionGroup ref="addDownloadableProductLink" stepKey="addDownloadableLink">
  49. <argument name="link" value="downloadableLink"/>
  50. </actionGroup>
  51. <!--Save product-->
  52. <actionGroup ref="saveProductForm" stepKey="saveProduct"/>
  53. <!-- Remove image from product -->
  54. <actionGroup ref="removeProductImage" stepKey="removeProductImage"/>
  55. <actionGroup ref="saveProductForm" stepKey="saveProductFormAfterRemove"/>
  56. <!-- Assert product image not in admin product form -->
  57. <actionGroup ref="assertProductImageNotInAdminProductPage" stepKey="assertProductImageNotInAdminProductPage"/>
  58. <!-- Assert product in storefront product page -->
  59. <actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPageAfterRemove">
  60. <argument name="product" value="DownloadableProduct"/>
  61. </actionGroup>
  62. <!-- Assert product image not in storefront product page -->
  63. <actionGroup ref="assertProductImageNotInStorefrontProductPage" stepKey="assertProductImageNotInStorefrontProductPage">
  64. <argument name="product" value="DownloadableProduct"/>
  65. </actionGroup>
  66. </test>
  67. </tests>