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