AdminRemoveDefaultVideoBundleProductTest.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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="AdminRemoveDefaultVideoBundleProductTest" extends="AdminRemoveDefaultVideoSimpleProductTest">
  11. <annotations>
  12. <features value="Bundle"/>
  13. <stories value="Add/remove images and videos for all product types and category"/>
  14. <title value="Admin should be able to remove default video from a Bundle Product"/>
  15. <description value="Admin should be able to remove default video from a Bundle Product"/>
  16. <severity value="MAJOR"/>
  17. <testCaseId value="MC-205"/>
  18. <group value="Bundle"/>
  19. </annotations>
  20. <before>
  21. <createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
  22. <createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
  23. </before>
  24. <after>
  25. <deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
  26. <deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
  27. </after>
  28. <!-- Create a bundle product -->
  29. <!-- Replacing steps in base AdminRemoveDefaultVideoSimpleProductTest -->
  30. <actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage">
  31. <argument name="product" value="BundleProduct"/>
  32. </actionGroup>
  33. <actionGroup ref="fillProductNameAndSkuInProductForm" stepKey="fillMainProductForm">
  34. <argument name="product" value="BundleProduct"/>
  35. </actionGroup>
  36. <!-- Add two bundle items -->
  37. <scrollTo selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" x="0" y="-100" stepKey="scrollToSection" after="addProductVideo"/>
  38. <conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="openBundleSection" after="scrollToSection"/>
  39. <click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption" after="openBundleSection"/>
  40. <waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleTitle" after="clickAddOption"/>
  41. <fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillBundleTitle" after="waitForBundleTitle"/>
  42. <selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectOptionBundleTitle" after="fillBundleTitle"/>
  43. <waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProducts" after="selectOptionBundleTitle"/>
  44. <click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProducts" after="waitForAddProducts"/>
  45. <waitForPageLoad stepKey="waitForPageLoad" after="clickAddProducts"/>
  46. <actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku1" after="waitForPageLoad">
  47. <argument name="product" value="$$simpleProduct1$$"/>
  48. </actionGroup>
  49. <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="checkOption1" after="filterProductGridBySku1"/>
  50. <actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku2" after="checkOption1">
  51. <argument name="product" value="$$simpleProduct2$$"/>
  52. </actionGroup>
  53. <checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="checkOption2" after="filterProductGridBySku2"/>
  54. <click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="addProducts" after="checkOption2"/>
  55. <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillQty1" after="addProducts"/>
  56. <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillQty2" before="saveProductForm"/>
  57. <!-- Assert product in storefront product page -->
  58. <actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
  59. <argument name="product" value="BundleProduct"/>
  60. </actionGroup>
  61. </test>
  62. </tests>