AdminBasicBundleProductAttributesTest.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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="AdminBasicBundleProductAttributesTest">
  10. <annotations>
  11. <features value="Bundle"/>
  12. <stories value="Create/Edit bundle product in Admin"/>
  13. <title value="Admin should be able to set/edit all the basic product attributes when creating/editing a bundle product"/>
  14. <description value="Admin should be able to set/edit all the basic product attributes when creating/editing a bundle product"/>
  15. <severity value="CRITICAL"/>
  16. <testCaseId value="MC-222"/>
  17. <group value="Bundle"/>
  18. </annotations>
  19. <before>
  20. <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
  21. </before>
  22. <after>
  23. <amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/>
  24. </after>
  25. <!--Create attribute set-->
  26. <actionGroup ref="CreateDefaultAttributeSet" stepKey="createDefaultAttributeSet">
  27. <argument name="label" value="{{ProductAttributeFrontendLabel.label}}"/>
  28. </actionGroup>
  29. <!--Go to product creation page-->
  30. <amOnPage url="{{AdminProductCreatePage.url(BundleProduct.set, BundleProduct.type)}}" stepKey="goToBundleProductCreationPage"/>
  31. <waitForPageLoad stepKey="waitForBundleProductCreationPage"/>
  32. <!--Enable/Disable Toggle-->
  33. <checkOption selector="{{AdminProductFormBundleSection.enableDisableToggle}}" stepKey="clickOnEnableDisableToggle"/>
  34. <!--Fill out product attributes-->
  35. <actionGroup ref="SetBundleProductAttributes" stepKey="fillOutAllAttributes">
  36. <!--primarily uses default values-->
  37. <argument name="attributeSet" value="{{ProductAttributeFrontendLabel.label}}"/>
  38. <argument name="bundleProductName" value="{{BundleProduct.name}}"/>
  39. <argument name="bundleProductSku" value="{{BundleProduct.sku}}"/>
  40. <argument name="visibilty" value="catalog"/>
  41. </actionGroup>
  42. <!--Verify form was filled out correctly-->
  43. <!--Enable/Disable Toggle check-->
  44. <dontSeeCheckboxIsChecked selector="{{AdminProductFormBundleSection.enableDisableToggle}}" stepKey="seeToggleIsOff"/>
  45. <!--Apply Attribute Set-->
  46. <seeOptionIsSelected selector="{{AdminProductFormSection.attributeSet}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="seeAttributeSet"/>
  47. <!--Product name and SKU-->
  48. <seeInField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="seeProductName"/>
  49. <seeInField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="seeProductSku"/>
  50. <!--Dynamic SKU Toggle-->
  51. <dontSeeCheckboxIsChecked selector="{{AdminProductFormBundleSection.dynamicSkuToggle}}" stepKey="seeDynamicSkuToggleOff"/>
  52. <!--Dynamic Price Toggle-->
  53. <dontSeeCheckboxIsChecked selector="{{AdminProductFormBundleSection.dynamicPriceToggle}}" stepKey="seeDynamicPriceToggleOff"/>
  54. <!--Tax Class-->
  55. <seeOptionIsSelected selector="{{AdminProductFormBundleSection.taxClassDropDown}}" userInput="Taxable Goods" stepKey="seeCorrectTaxClass"/>
  56. <!--Fill out price-->
  57. <seeInField selector="{{AdminProductFormBundleSection.priceField}}" userInput="10" stepKey="seePrice"/>
  58. <!--Stock status-->
  59. <seeOptionIsSelected selector="{{AdminProductFormBundleSection.stockStatusField}}" userInput="In Stock" stepKey="seeStockStatus"/>
  60. <!--Dynamic weight-->
  61. <dontSeeCheckboxIsChecked selector="{{AdminProductFormBundleSection.dynamicWeightToggle}}" stepKey="seeDynamicWeightOff"/>
  62. <!--Weight-->
  63. <seeInField selector="{{AdminProductFormBundleSection.weightField}}" userInput="10" stepKey="seeWeight"/>
  64. <!--Visibilty-->
  65. <seeOptionIsSelected selector="{{AdminProductFormBundleSection.visibilityDropDown}}" userInput="Catalog" stepKey="seeVisibility"/>
  66. <!--Categories-->
  67. <seeElement selector="{{AdminProductFormBundleSection.defaultCategory}}" stepKey="seeDefaultCategory"/>
  68. <!--New from - to-->
  69. <seeInField selector="{{AdminProductFormBundleSection.fromDate}}" userInput="10/10/2018" stepKey="seeFirstDate"/>
  70. <seeInField selector="{{AdminProductFormBundleSection.toDate}}" userInput="10/10/2018" stepKey="seeSecondDate"/>
  71. <!--Country of manufacture-->
  72. <seeOptionIsSelected selector="{{AdminProductFormBundleSection.countryOfManufactureDropDown}}" userInput="Italy" stepKey="seeCountryOfManufacture"/>
  73. <!--Create second attribute set for edit-->
  74. <actionGroup ref="CreateDefaultAttributeSet" stepKey="createSecondAttributeSet">
  75. <argument name="label" value="{{ProductAttributeFrontendLabelTwo.label}}"/>
  76. </actionGroup>
  77. <!--Filter catalog-->
  78. <amOnPage url="{{AdminCatalogProductPage.url}}" stepKey="goToCatalogProductPage"/>
  79. <waitForPageLoad stepKey="WaitForPageToLoad"/>
  80. <actionGroup ref="filterProductGridByName" stepKey="filterBundleProductOptionsDownToName">
  81. <argument name="product" value="BundleProduct"/>
  82. </actionGroup>
  83. <click selector="{{AdminProductFiltersSection.attributeSetOfFirstRow(ProductAttributeFrontendLabel.label)}}" stepKey="clickAttributeSet2"/>
  84. <waitForPageLoad stepKey="waitForPageLoad2"/>
  85. <!--Edit fields-->
  86. <!--Enable/Disable Toggle-->
  87. <checkOption selector="{{AdminProductFormBundleSection.enableDisableToggle}}" stepKey="clickOnEnableDisableToggleAgain"/>
  88. <!--Apply Attribute Set-->
  89. <click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
  90. <fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{ProductAttributeFrontendLabelTwo.label}}" stepKey="searchForAttrSet"/>
  91. <click selector="{{AdminProductFormSection.attributeSetFilterResultByName(ProductAttributeFrontendLabelTwo.label)}}" stepKey="selectAttrSet"/>
  92. <!--Product name and SKU-->
  93. <fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name2}}" stepKey="fillProductName"/>
  94. <fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku2}}" stepKey="fillProductSku"/>
  95. <click selector="{{AdminProductFormBundleSection.productName}}" stepKey="clickUnselectField"/>
  96. <!--Dynamic SKU Toggle-->
  97. <checkOption selector="{{AdminProductFormBundleSection.dynamicSkuToggle}}" stepKey="clickOnToggle"/>
  98. <click selector="{{AdminProductFormBundleSection.productName}}" stepKey="clickUnselectFieldAgain"/>
  99. <!--Fill out price-->
  100. <fillField selector="{{AdminProductFormBundleSection.priceField}}" userInput="20" stepKey="fillOutPrice"/>
  101. <!--Stock status-->
  102. <selectOption selector="{{AdminProductFormBundleSection.stockStatusField}}" userInput="Out of Stock" stepKey="stockStatus"/>
  103. <!--Dynamic weight-->
  104. <checkOption selector="{{AdminProductFormBundleSection.dynamicWeightToggle}}" stepKey="dynamicWeight"/>
  105. <!--Visibilty-->
  106. <selectOption selector="{{AdminProductFormBundleSection.visibilityDropDown}}" userInput="Not Visible Individually" stepKey="openVisibility"/>
  107. <!--New from - to-->
  108. <fillField selector="{{AdminProductFormBundleSection.fromDate}}" userInput="10/20/2018" stepKey="fillInFirstDate"/>
  109. <fillField selector="{{AdminProductFormBundleSection.toDate}}" userInput="10/20/2018" stepKey="fillInSecondDate"/>
  110. <!--Country of manufacture-->
  111. <selectOption selector="{{AdminProductFormBundleSection.countryOfManufactureDropDown}}" userInput="France" stepKey="countryOfManufactureDropDown"/>
  112. <!--Save the product-->
  113. <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButton"/>
  114. <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/>
  115. <!--Verify form was filled out correctly after edit-->
  116. <!--Enable/Disable Toggle-->
  117. <seeElement selector="{{AdminProductFormBundleSection.enableDisableToggleOn}}" stepKey="seeToggleIsOn2"/>
  118. <!--Attribute Set-->
  119. <seeOptionIsSelected selector="{{AdminProductFormSection.attributeSet}}" userInput="{{ProductAttributeFrontendLabelTwo.label}}" stepKey="seeAttributeSet2"/>
  120. <!--Product name and SKU-->
  121. <seeInField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name2}}" stepKey="seeProductName2"/>
  122. <seeInField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku2}}" stepKey="seeProductSku2"/>
  123. <!--Dynamic SKU Toggle-->
  124. <seeElement selector="{{AdminProductFormBundleSection.dynamicSkuToggleOn}}" stepKey="seeDynamicSkuToggleOn2"/>
  125. <!--Tax Class-->
  126. <seeOptionIsSelected selector="{{AdminProductFormBundleSection.taxClassDropDown}}" userInput="Taxable Goods" stepKey="seeCorrectTaxClass2"/>
  127. <!--Price-->
  128. <seeInField selector="{{AdminProductFormBundleSection.priceField}}" userInput="20" stepKey="seePrice2"/>
  129. <!--Stock status-->
  130. <seeOptionIsSelected selector="{{AdminProductFormBundleSection.stockStatusField}}" userInput="Out of Stock" stepKey="seeStockStatus2"/>
  131. <!--Dynamic weight-->
  132. <seeElement selector="{{AdminProductFormBundleSection.dynamicWeightToggleOn}}" stepKey="seeDynamicWeightOn2"/>
  133. <!--Visibilty-->
  134. <seeOptionIsSelected selector="{{AdminProductFormBundleSection.visibilityDropDown}}" userInput="Not Visible Individually" stepKey="seeVisibility2"/>
  135. <!--Categories-->
  136. <seeElement selector="{{AdminProductFormBundleSection.categoriesDropDown}}" stepKey="seeDefaultCategory2"/>
  137. <!--New from - to-->
  138. <seeInField selector="{{AdminProductFormBundleSection.fromDate}}" userInput="10/20/2018" stepKey="seeFirstDate2"/>
  139. <seeInField selector="{{AdminProductFormBundleSection.toDate}}" userInput="10/20/2018" stepKey="seeSecondDate2"/>
  140. <!--Country of manufacture-->
  141. <seeOptionIsSelected selector="{{AdminProductFormBundleSection.countryOfManufactureDropDown}}" userInput="France" stepKey="seeCountryOfManufacture2"/>
  142. </test>
  143. </tests>