ConfigurableProductAttributeNameDesignActionGroup.xml 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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="GotoCatalogProductsPage">
  11. <!--Click on Catalog item-->
  12. <click stepKey="clickOnCatalogItem" selector="{{CatalogProductsSection.catalogItem}}"/>
  13. <waitForPageLoad stepKey="waitForCatalogLoad"/>
  14. <!--Click on Products item-->
  15. <click stepKey="clickOnProductItem" selector="{{CatalogProductsSection.productItem}}"/>
  16. <waitForPageLoad stepKey="waitForCatalogProductPageLoad"/>
  17. <!--Assert we have gone desired page successfully-->
  18. <seeInCurrentUrl stepKey="assertWeAreOnTheCatalogProductPage" url="{{assertionData.catalogProduct}}"/>
  19. </actionGroup>
  20. <actionGroup name="GotoConfigurableProductPage">
  21. <!--Click on Add product item-->
  22. <click stepKey="clickOnAddProductItem" selector="{{ConfigurableProductSection.addProductItem}}"/>
  23. <!--Click on Configuration Product item-->
  24. <click stepKey="clickOnConfigurationProductItem" selector="{{ConfigurableProductSection.configProductItem}}"/>
  25. <waitForPageLoad stepKey="waitForConfigurableProductPageLoad"/>
  26. <!--Assert we have gone desired page successfully-->
  27. <seeInCurrentUrl stepKey="assertWeAreOnTheConfigurableProductPage" url="{{assertionData.configurableProduct}}"/>
  28. </actionGroup>
  29. <actionGroup name="FillAllRequiredFields">
  30. <!--Fill In Product Name Fields-->
  31. <fillField stepKey="fillInProductNameFields" selector="{{NewProduct.productName}}" userInput="{{NewProductsData.productName}}"/>
  32. <!--Fill In Price Fields-->
  33. <fillField stepKey="fillInPriceFields" selector="{{NewProduct.price}}" userInput="{{NewProductsData.price}}"/>
  34. <!--Fill In Weight Fields-->
  35. <fillField stepKey="fillInWeightFields" selector="{{NewProduct.weight}}" userInput="{{NewProductsData.weight}}"/>
  36. <!--Click "Create Configurations" button in configurations field-->
  37. <click stepKey="clickOnCreateConfigurationsButton" selector="{{NewProduct.createConfigurationButton}}"/>
  38. <waitForPageLoad stepKey="waitForCreateProductConfigurationsPageLoad"/>
  39. <!--Click "Create New Attribute" button-->
  40. <click stepKey="clickOnCreateNewAttributeButton" selector="{{NewProduct.createNewAttributeButton}}"/>
  41. <waitForPageLoad stepKey="waitForNewAttributePageLoad"/>
  42. </actionGroup>
  43. <actionGroup name="CreateNewAttribute">
  44. <switchToIFrame stepKey="NewAttributePage" selector="{{NewProduct.newAttributeIFrame}}"/>
  45. <!--Fill In Product Name Fields-->
  46. <fillField stepKey="fillInDefaultLabelField" selector="{{NewProduct.defaultLabel}}" userInput="{{NewProductsData.defaultLabel}}"/>
  47. <!--Add option 1 to attribute-->
  48. <click selector="{{NewProduct.addOptionButton}}" stepKey="clickAddOption1"/>
  49. <waitForPageLoad stepKey="waitForOption1"/>
  50. <fillField stepKey="fillInAdminFieldRed" selector="{{NewProduct.adminFieldRed}}" userInput="{{NewProductsData.adminFieldRed}}"/>
  51. <fillField stepKey="fillInDefaultStoreViewFieldRed" selector="{{NewProduct.defaultStoreViewFieldRed}}" userInput="{{NewProductsData.defaultStoreViewFieldRed}}"/>
  52. <!--Add option 2 to attribute-->
  53. <click selector="{{NewProduct.addOptionButton}}" stepKey="clickAddOption2"/>
  54. <waitForPageLoad stepKey="waitForOption2"/>
  55. <fillField stepKey="fillInAdminFieldBlue" selector="{{NewProduct.adminFieldBlue}}" userInput="{{NewProductsData.adminFieldBlue}}"/>
  56. <fillField stepKey="fillInDefaultStoreViewFieldBlue" selector="{{NewProduct.defaultStoreViewFieldBlue}}" userInput="{{NewProductsData.defaultStoreViewFieldBlue}}"/>
  57. <!--Add option 3 to attribute-->
  58. <click selector="{{NewProduct.addOptionButton}}" stepKey="clickAddOption3"/>
  59. <waitForPageLoad stepKey="waitForOption3"/>
  60. <fillField stepKey="fillInAdminFieldYellow" selector="{{NewProduct.adminFieldYellow}}" userInput="{{NewProductsData.adminFieldYellow}}"/>
  61. <fillField stepKey="fillInDefaultStoreViewFieldYellow" selector="{{NewProduct.defaultStoreViewFieldYellow}}" userInput="{{NewProductsData.defaultStoreViewFieldYellow}}"/>
  62. <!--Add option 4 to attribute-->
  63. <click selector="{{NewProduct.addOptionButton}}" stepKey="clickAddOption4"/>
  64. <waitForPageLoad stepKey="waitForOption4"/>
  65. <fillField stepKey="fillInAdminFieldGreen" selector="{{NewProduct.adminFieldGreen}}" userInput="{{NewProductsData.adminFieldGreen}}"/>
  66. <fillField stepKey="fillInDefaultStoreViewFieldGreen" selector="{{NewProduct.defaultStoreViewFieldGreen}}" userInput="{{NewProductsData.defaultStoreViewFieldGreen}}"/>
  67. <!--Add option 5 to attribute-->
  68. <click selector="{{NewProduct.addOptionButton}}" stepKey="clickAddOption5"/>
  69. <waitForPageLoad stepKey="waitForOption5"/>
  70. <fillField stepKey="fillInAdminFieldBlack" selector="{{NewProduct.adminFieldBlack}}" userInput="{{NewProductsData.adminFieldBlack}}"/>
  71. <fillField stepKey="fillInDefaultStoreViewFieldBlack" selector="{{NewProduct.defaultStoreViewFieldBlack}}" userInput="{{NewProductsData.defaultStoreViewFieldBlack}}"/>
  72. <!--Click Save Attribute button-->
  73. <click selector="{{NewProduct.saveAttributeButton}}" stepKey="clickSaveAttributeButton"/>
  74. <waitForPageLoad stepKey="waitForSavingSettings"/>
  75. <!--Select created Attribute -->
  76. <click selector="{{ConfigurableProductSection.selectCreatedAttribute}}" stepKey="selectCreatedAttribute"/>
  77. <!--Click Next button-->
  78. <click selector="{{ConfigurableProductSection.nextButton}}" stepKey="clickNextButton"/>
  79. <waitForPageLoad stepKey="waitForNextPageLoaded"/>
  80. <!--Select all the options of all the attributes button-->
  81. <click selector="{{CreateProductConfigurations.checkboxRed}}" stepKey="selectCheckboxRed"/>
  82. <click selector="{{CreateProductConfigurations.checkboxBlue}}" stepKey="selectCheckboxBlue"/>
  83. <click selector="{{CreateProductConfigurations.checkboxYellow}}" stepKey="selectCheckboxYellow"/>
  84. <click selector="{{CreateProductConfigurations.checkboxGreen}}" stepKey="selectCheckboxGreen"/>
  85. <click selector="{{CreateProductConfigurations.checkboxBlack}}" stepKey="selectCheckboxBlack"/>
  86. <!--Click Next button-->
  87. <click selector="{{ConfigurableProductSection.nextButton}}" stepKey="clickNextButton2"/>
  88. <waitForPageLoad stepKey="waitForBulkImagesPricePageLoaded"/>
  89. <!--Click Next button-->
  90. <click selector="{{ConfigurableProductSection.nextButton}}" stepKey="clickNextButton3"/>
  91. <waitForPageLoad stepKey="waitForSummaryPageLoaded"/>
  92. <!--Click Generate Configure button-->
  93. <click selector="{{ConfigurableProductSection.generateConfigure}}" stepKey="generateConfigure"/>
  94. <waitForPageLoad stepKey="waitForGenerateConfigure"/>
  95. <!-- This Error message shouldn't appear: Test will pass when bug will be fixed-->
  96. <dontSee selector="{{CreateProductConfigurations.errorMessage}}" userInput="{{assertionData.errorMessage}}" stepKey="dontSeeError"/>
  97. <!--Close frame-->
  98. <conditionalClick selector="{{ConfigurableProductSection.closeFrame}}" dependentSelector="{{ConfigurableProductSection.closeFrame}}" visible="1" stepKey="closeFrame"/>
  99. <waitForPageLoad stepKey="waitForClosingFrame"/>
  100. </actionGroup>
  101. <actionGroup name="DeleteCreatedAttribute">
  102. <!--Click on Stores item-->
  103. <click stepKey="clickOnStoresItem" selector="{{CatalogProductsSection.storesItem}}"/>
  104. <waitForPageLoad stepKey="waitForNavigationPanel"/>
  105. <!--Click on Products item-->
  106. <waitForElementVisible selector="{{CatalogProductsSection.storesProductItem}}" stepKey="waitForCatalogLoad"/>
  107. <click stepKey="clickOnStoresProductItem" selector="{{CatalogProductsSection.storesProductItem}}"/>
  108. <waitForPageLoad stepKey="waitForStoresProductPageLoad"/>
  109. <!--Click on created Attribute -->
  110. <fillField stepKey="searchProductDefaultLabel" selector="{{CatalogProductsSection.searchDefaultLabelField}}" userInput="{{NewProductsData.defaultLabel}}"/>
  111. <click stepKey="clickSearchButton" selector="{{CatalogProductsSection.searchButton}}"/>
  112. <waitForPageLoad stepKey="waitForCreatedAttributeLoad"/>
  113. <click stepKey="clickOnCreatedAttributeItem" selector="{{CatalogProductsSection.createdAttributeItem}}"/>
  114. <waitForPageLoad stepKey="waitForAttributePropertiesPageLoad"/>
  115. <!--Click on Delete Attribute item-->
  116. <click stepKey="clickOnDeleteAttributeItem" selector="{{CatalogProductsSection.deleteAttributeItem}}"/>
  117. <waitForPageLoad stepKey="waitForDeletedDialogOpened"/>
  118. <!--Click on OK button-->
  119. <click stepKey="clickOnOKButton" selector="{{CatalogProductsSection.okButton}}"/>
  120. <waitForPageLoad stepKey="waitFordAttributeDeleted"/>
  121. <see userInput="You deleted the product attribute." stepKey="seeDeletedTheProductAttributeMessage"/>
  122. <!-- Click Reset Filter button-->
  123. <click stepKey="clickResetFilterButton" selector="{{CatalogProductsSection.resetFilter}}"/>
  124. <waitForPageLoad stepKey="waitForAllFilterReset"/>
  125. </actionGroup>
  126. </actionGroups>