|
| 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 | + |
| 9 | +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> |
| 11 | + |
| 12 | + <actionGroup name="GotoCatalogProductsPage"> |
| 13 | + |
| 14 | + <!--Click on Catalog item--> |
| 15 | + <click stepKey="clickOnCatalogItem" selector="{{CatalogProductsSection.catalogItem}}"/> |
| 16 | + |
| 17 | + <waitForPageLoad stepKey="waitForCatalogLoad" time="3"/> |
| 18 | + |
| 19 | + <!--Click on Products item--> |
| 20 | + <click stepKey="clickOnProductItem" selector="{{CatalogProductsSection.productItem}}"/> |
| 21 | + |
| 22 | + <waitForPageLoad stepKey="waitForCatalogProductPageLoad" time="3"/> |
| 23 | + |
| 24 | + <!--Assert we have gone desired page successfully--> |
| 25 | + <seeInCurrentUrl stepKey="assertWeAreOnTheCatalogProductPage" url="{{assertionData.catalogProduct}}"/> |
| 26 | + |
| 27 | + </actionGroup> |
| 28 | + |
| 29 | + <actionGroup name="GotoConfigurableProductPage"> |
| 30 | + |
| 31 | + <!--Click on Add product item--> |
| 32 | + <click stepKey="clickOnAddProductItem" selector="{{ConfigurableProductSection.addProductItem}}"/> |
| 33 | + |
| 34 | + <!--Click on Configuration Product item--> |
| 35 | + <click stepKey="clickOnConfigurationProductItem" selector="{{ConfigurableProductSection.configProductItem}}"/> |
| 36 | + |
| 37 | + <waitForPageLoad stepKey="waitForConfigurableProductPageLoad" time="3"/> |
| 38 | + |
| 39 | + <!--Assert we have gone desired page successfully--> |
| 40 | + <seeInCurrentUrl stepKey="assertWeAreOnTheConfigurableProductPage" url="{{assertionData.configurableProduct}}"/> |
| 41 | + |
| 42 | + </actionGroup> |
| 43 | + |
| 44 | + <actionGroup name="FillAllRequiredFields"> |
| 45 | + |
| 46 | + <!--Fill In Product Name Fields--> |
| 47 | + <fillField stepKey="fillInProductNameFields" selector="{{NewProduct.productName}}" userInput="{{NewProductsData.productName}}"/> |
| 48 | + |
| 49 | + <!--Fill In Price Fields--> |
| 50 | + <fillField stepKey="fillInPriceFields" selector="{{NewProduct.price}}" userInput="{{NewProductsData.price}}"/> |
| 51 | + |
| 52 | + <!--Fill In Weight Fields--> |
| 53 | + <fillField stepKey="fillInWeightFields" selector="{{NewProduct.weight}}" userInput="{{NewProductsData.weight}}"/> |
| 54 | + |
| 55 | + <!--Click "Create Configurations" button in configurations field--> |
| 56 | + <click stepKey="clickOnCreateConfigurationsButton" selector="{{NewProduct.createConfigurationButton}}"/> |
| 57 | + |
| 58 | + <wait stepKey="waitForCreateProductConfigurationsPageLoad" time="3"/> |
| 59 | + |
| 60 | + <!--Click "Create New Attribute" button--> |
| 61 | + <click stepKey="clickOnCreateNewAttributeButton" selector="{{NewProduct.createNewAttributeButton}}"/> |
| 62 | + |
| 63 | + <wait stepKey="waitForNewAttributePageLoad" time="3"/> |
| 64 | + |
| 65 | + </actionGroup> |
| 66 | + |
| 67 | + <actionGroup name="FillNewAttributeFields"> |
| 68 | + |
| 69 | + <switchToIFrame stepKey="NewAttributePage" selector="{{NewProduct.newAttributeIFrame}}"/> |
| 70 | + |
| 71 | + <!--Fill In Product Name Fields--> |
| 72 | + <fillField stepKey="fillInDefaultLabelField" selector="{{NewProduct.defaultLabel}}" userInput="{{NewProductsData.defaultLabel}}"/> |
| 73 | + |
| 74 | + <!--Add option 1 to attribute--> |
| 75 | + <click selector="{{NewProduct.addOptionButton}}" stepKey="clickAddOption1"/> |
| 76 | + <fillField stepKey="fillInAdminField1" selector="{{NewProduct.adminField1}}" userInput="{{NewProductsData.adminField1}}"/> |
| 77 | + <fillField stepKey="fillInDefaultStoreViewField1" selector="{{NewProduct.defaultStoreViewField1}}" userInput="{{NewProductsData.defaultStoreViewField1}}"/> |
| 78 | + |
| 79 | + <!--Add option 2 to attribute--> |
| 80 | + <click selector="{{NewProduct.addOptionButton}}" stepKey="clickAddOption2"/> |
| 81 | + <fillField stepKey="fillInAdminField2" selector="{{NewProduct.adminField2}}" userInput="{{NewProductsData.adminField2}}"/> |
| 82 | + <fillField stepKey="fillInDefaultStoreViewField2" selector="{{NewProduct.defaultStoreViewField2}}" userInput="{{NewProductsData.defaultStoreViewField2}}"/> |
| 83 | + |
| 84 | + <!--Add option 3 to attribute--> |
| 85 | + <click selector="{{NewProduct.addOptionButton}}" stepKey="clickAddOption3"/> |
| 86 | + <fillField stepKey="fillInAdminField3" selector="{{NewProduct.adminField3}}" userInput="{{NewProductsData.adminField3}}"/> |
| 87 | + <fillField stepKey="fillInDefaultStoreViewField3" selector="{{NewProduct.defaultStoreViewField3}}" userInput="{{NewProductsData.defaultStoreViewField3}}"/> |
| 88 | + |
| 89 | + <!--Add option 4 to attribute--> |
| 90 | + <click selector="{{NewProduct.addOptionButton}}" stepKey="clickAddOption4"/> |
| 91 | + <fillField stepKey="fillInAdminField4" selector="{{NewProduct.adminField4}}" userInput="{{NewProductsData.adminField4}}"/> |
| 92 | + <fillField stepKey="fillInDefaultStoreViewField4" selector="{{NewProduct.defaultStoreViewField4}}" userInput="{{NewProductsData.defaultStoreViewField4}}"/> |
| 93 | + |
| 94 | + <!--Add option 5 to attribute--> |
| 95 | + <click selector="{{NewProduct.addOptionButton}}" stepKey="clickAddOption5"/> |
| 96 | + <fillField stepKey="fillInAdminField5" selector="{{NewProduct.adminField5}}" userInput="{{NewProductsData.adminField5}}"/> |
| 97 | + <fillField stepKey="fillInDefaultStoreViewField5" selector="{{NewProduct.defaultStoreViewField5}}" userInput="{{NewProductsData.defaultStoreViewField5}}"/> |
| 98 | + |
| 99 | + <!--Click Save Attribute button--> |
| 100 | + <click selector="{{NewProduct.saveAttributeButton}}" stepKey="clickSaveAttributeButton"/> |
| 101 | + |
| 102 | + <wait stepKey="waitForSavingSettings" time="3"/> |
| 103 | + |
| 104 | + <!--Select created Attribute --> |
| 105 | + <click selector="{{ConfigurableProductSection.selectCreatedAttribute}}" stepKey="selectCreatedAttribute"/> |
| 106 | + |
| 107 | + <!--Click Next button--> |
| 108 | + <click selector="{{ConfigurableProductSection.nextButton}}" stepKey="clickNextButton"/> |
| 109 | + |
| 110 | + <wait stepKey="waitForNextPageLoaded" time="3"/> |
| 111 | + |
| 112 | + <!--Select all the options of all the attributes button--> |
| 113 | + <click selector="{{CreateProductConfigurations.item1}}" stepKey="selectItem1"/> |
| 114 | + <click selector="{{CreateProductConfigurations.item2}}" stepKey="selectItem2"/> |
| 115 | + <click selector="{{CreateProductConfigurations.item3}}" stepKey="selectItem3"/> |
| 116 | + <click selector="{{CreateProductConfigurations.item4}}" stepKey="selectItem4"/> |
| 117 | + <click selector="{{CreateProductConfigurations.item5}}" stepKey="selectItem5"/> |
| 118 | + |
| 119 | + <!--Click Next button--> |
| 120 | + <click selector="{{ConfigurableProductSection.nextButton}}" stepKey="clickNextButton2"/> |
| 121 | + |
| 122 | + <wait stepKey="waitForBulkImagesPricePageLoaded" time="3"/> |
| 123 | + |
| 124 | + <!--Click Next button--> |
| 125 | + <click selector="{{ConfigurableProductSection.nextButton}}" stepKey="clickNextButton3"/> |
| 126 | + |
| 127 | + <wait stepKey="waitForSummaryPageLoaded" time="3"/> |
| 128 | + |
| 129 | + <!--Click Generate Configure button--> |
| 130 | + <click selector="{{ConfigurableProductSection.generateConfigure}}" stepKey="generateConfigure"/> |
| 131 | + |
| 132 | + <wait stepKey="waitForGenerateConfigure" time="3"/> |
| 133 | + |
| 134 | + <!-- This Error message shouldn't appear: Test will pass when bug will be fixed--> |
| 135 | + <dontSee selector="{{CreateProductConfigurations.errorMessage}}" userInput="{{assertionData.errorMessage}}" stepKey="dontSeeError"/> |
| 136 | + |
| 137 | + <!--Close frame--> |
| 138 | + <conditionalClick selector="{{ConfigurableProductSection.closeFrame}}" dependentSelector="{{ConfigurableProductSection.closeFrame}}" visible="1" stepKey="closeFrame"/> |
| 139 | + |
| 140 | + <wait stepKey="waitForClosingFrame" time="3"/> |
| 141 | + |
| 142 | + </actionGroup> |
| 143 | + |
| 144 | + <actionGroup name="DeleteCreatedAttributeIfExist"> |
| 145 | + |
| 146 | + <!--Click on Stores item--> |
| 147 | + <click stepKey="clickOnStoresItem" selector="{{CatalogProductsSection.storesItem}}"/> |
| 148 | + |
| 149 | + <waitForPageLoad stepKey="waitForCatalogLoad" time="3"/> |
| 150 | + |
| 151 | + <!--Click on Products item--> |
| 152 | + <click stepKey="clickOnStoresProductItem" selector="{{CatalogProductsSection.storesProductItem}}"/> |
| 153 | + |
| 154 | + <waitForPageLoad stepKey="waitForStoresProductPageLoad" time="3"/> |
| 155 | + |
| 156 | + <!--Click on created Attribute item if it exist--> |
| 157 | + <conditionalClick selector="{{CatalogProductsSection.createdAttributeItem}}" dependentSelector="{{CatalogProductsSection.createdAttributeItem}}" visible="1" stepKey="clickOnCreatedAttributeItem"/> |
| 158 | + |
| 159 | + <waitForPageLoad stepKey="waitForCreatedAttributeLoad" time="3"/> |
| 160 | + |
| 161 | + <!--Click on Delete Attribute item--> |
| 162 | + <conditionalClick stepKey="clickOnDeleteAttributeItem" selector="{{CatalogProductsSection.deleteAttributeItem}}" dependentSelector="{{CatalogProductsSection.deleteAttributeItem}}" visible="1"/> |
| 163 | + |
| 164 | + <waitForPageLoad stepKey="waitForDeletedDialogOpened" time="3"/> |
| 165 | + |
| 166 | + <!--Click on OK button--> |
| 167 | + <conditionalClick stepKey="clickOnOKButton" selector="{{CatalogProductsSection.okButton}}" dependentSelector="{{CatalogProductsSection.okButton}}" visible="1"/> |
| 168 | + |
| 169 | + <waitForPageLoad stepKey="waitFordAttributeDeleted" time="3"/> |
| 170 | + |
| 171 | + </actionGroup> |
| 172 | + |
| 173 | +</actionGroups> |
0 commit comments