SetBundleProductAttributesActionGroup.xml 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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="SetBundleProductAttributes">
  11. <arguments>
  12. <argument name="attributeSet" defaultValue="Default" type="string"/>
  13. <argument name="bundleProductName" defaultValue="defaultBundleProductNameAndSku" type="string"/>
  14. <argument name="bundleProductSku" defaultValue="defaultBundleProductNameAndSku" type="string"/>
  15. <argument name="price" defaultValue="10" type="string"/>
  16. <argument name="stock" defaultValue="In Stock" type="string"/>
  17. <argument name="weight" defaultValue="10" type="string"/>
  18. <argument name="visibility" defaultValue="Catalog, Search" type="string"/>
  19. <argument name="fromDate" defaultValue="10/10/2018" type="string"/>
  20. <argument name="toDate" defaultValue="10/10/2018" type="string"/>
  21. <argument name="country" defaultValue="Italy" type="string"/>
  22. </arguments>
  23. <!--
  24. Pre-Reqs:
  25. 1) Go to bundle product creation page
  26. 2) Will not Enable/Disable
  27. -->
  28. <!--Apply Attribute Set-->
  29. <click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
  30. <fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{attributeSet}}" stepKey="searchForAttrSet"/>
  31. <click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet"/>
  32. <!--Product name and SKU-->
  33. <fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{bundleProductName}}" stepKey="fillProductName"/>
  34. <fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{bundleProductSku}}" stepKey="fillProductSku"/>
  35. <click selector="{{AdminProductFormBundleSection.productName}}" stepKey="clickUnselectField"/>
  36. <!--Dynamic SKU Toggle-->
  37. <checkOption selector="{{AdminProductFormBundleSection.dynamicSkuToggle}}" stepKey="clickOnToggle"/>
  38. <click selector="{{AdminProductFormBundleSection.productName}}" stepKey="clickUnselectFieldAgain"/>
  39. <!--Dynamic Price Toggle-->
  40. <checkOption selector="{{AdminProductFormBundleSection.dynamicPriceToggle}}" stepKey="clickOnDynamicPriceToggle"/>
  41. <!--Tax Class-->
  42. <selectOption selector="{{AdminProductFormBundleSection.taxClassDropDown}}" userInput="Taxable Goods" stepKey="taxClassDropDown"/>
  43. <!--Fill out price-->
  44. <fillField selector="{{AdminProductFormBundleSection.priceField}}" userInput="{{price}}" stepKey="fillOutPrice"/>
  45. <!--Stock status-->
  46. <selectOption selector="{{AdminProductFormBundleSection.stockStatusField}}" userInput="{{stock}}" stepKey="stockStatus"/>
  47. <!--Dynamic weight-->
  48. <checkOption selector="{{AdminProductFormBundleSection.dynamicWeightToggle}}" stepKey="dynamicWeight"/>
  49. <!--Weight-->
  50. <fillField selector="{{AdminProductFormBundleSection.weightField}}" userInput="{{weight}}" stepKey="fillIn"/>
  51. <!--Visibilty-->
  52. <selectOption selector="{{AdminProductFormBundleSection.visibilityDropDown}}" userInput="{{visibility}}" stepKey="openVisibility"/>
  53. <!--Categories-->
  54. <click selector="{{AdminProductFormBundleSection.categoriesDropDown}}" stepKey="clickOnCategoriesDropDown"/>
  55. <click selector="{{AdminProductFormBundleSection.defaultCategory}}" stepKey="selectDefaultCategory"/>
  56. <click selector="{{AdminProductFormBundleSection.categoryDone}}" stepKey="clickOnCategoriesDoneToCloseOptions"/>
  57. <!--New from - to-->
  58. <fillField selector="{{AdminProductFormBundleSection.fromDate}}" userInput="{{fromDate}}" stepKey="fillInFirstDate"/>
  59. <fillField selector="{{AdminProductFormBundleSection.toDate}}" userInput="{{toDate}}" stepKey="fillInSecondDate"/>
  60. <!--Country of manufacture-->
  61. <selectOption selector="{{AdminProductFormBundleSection.countryOfManufactureDropDown}}" userInput="{{country}}" stepKey="countryOfManufactureDropDown"/>
  62. <!--Save the product-->
  63. <click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickSaveButton"/>
  64. <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/>
  65. </actionGroup>
  66. </actionGroups>