|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="AdminVerifyCreateCustomProductAttributeTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <stories value="Create product Attribute"/> |
| 15 | + <title value="Create Custom Product Attribute Dropdown Field (Not Required) from Product Page"/> |
| 16 | + <description value="login as admin and create simple product with attribute Dropdown field"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MC-26027"/> |
| 19 | + <group value="mtf_migrated"/> |
| 20 | + <group value="catalog"/> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 24 | + <createData entity="SimpleProduct" stepKey="createProduct"> |
| 25 | + <requiredEntity createDataKey="createCategory"/> |
| 26 | + </createData> |
| 27 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginToAdminPanel"/> |
| 28 | + </before> |
| 29 | + <after> |
| 30 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 31 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 32 | + <actionGroup ref="AdminDeleteProductAttributeByLabelActionGroup" stepKey="deleteCreatedAttribute"> |
| 33 | + <argument name="productAttributeLabel" value="{{ProductAttributeFrontendLabel.label}}"/> |
| 34 | + </actionGroup> |
| 35 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdminPanel"/> |
| 36 | + </after> |
| 37 | + <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="navigateToProductPage"> |
| 38 | + <argument name="productId" value="$createProduct.id$"/> |
| 39 | + </actionGroup> |
| 40 | + <actionGroup ref="AdminStartCreateProductAttributeOnProductPageActionGroup" stepKey="createDropdownAttribute"> |
| 41 | + <argument name="attributeCode" value="{{newProductAttribute.attribute_code}}" /> |
| 42 | + <argument name="attributeLabel" value="{{ProductAttributeFrontendLabel.label}}" /> |
| 43 | + <argument name="inputType" value="Dropdown" /> |
| 44 | + </actionGroup> |
| 45 | + <scrollTo selector="{{AdminCreateNewProductAttributeSection.storefrontProperties}}" stepKey="scrollToStorefrontProperties"/> |
| 46 | + <click selector="{{AdminCreateNewProductAttributeSection.storefrontProperties}}" stepKey="clickOnStorefrontProperties"/> |
| 47 | + <waitForElementVisible selector="{{AdminCreateNewProductAttributeSection.inSearch}}" stepKey="waitForStoreFrontProperties"/> |
| 48 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.inSearch}}" stepKey="enableInSearchOption"/> |
| 49 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.advancedSearch}}" stepKey="enableAdvancedSearch"/> |
| 50 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.visibleOnStorefront}}" stepKey="enableVisibleOnStorefront"/> |
| 51 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.sortProductListing}}" stepKey="enableSortProductListing"/> |
| 52 | + <actionGroup ref="AdminAddOptionForDropdownAttributeActionGroup" stepKey="createDropdownOption"> |
| 53 | + <argument name="storefrontViewAttributeValue" value="{{ProductAttributeOption8.label}}"/> |
| 54 | + <argument name="adminAttributeLabel" value="{{ProductAttributeOption8.label}}"/> |
| 55 | + </actionGroup> |
| 56 | + <checkOption selector="{{AdminCreateNewProductAttributeSection.defaultRadioButton('1')}}" stepKey="selectRadioButton"/> |
| 57 | + <click selector="{{AdminCreateNewProductAttributeSection.saveAttribute}}" stepKey="clickOnSaveAttribute"/> |
| 58 | + <actionGroup ref="SaveProductFormActionGroup" stepKey="saveTheProduct"/> |
| 59 | + <actionGroup ref="AdminAssertProductAttributeOnProductEditPageActionGroup" stepKey="adminProductAssertAttribute"> |
| 60 | + <argument name="attributeLabel" value="{{ProductAttributeFrontendLabel.label}}"/> |
| 61 | + <argument name="attributeCode" value="{{newProductAttribute.attribute_code}}"/> |
| 62 | + </actionGroup> |
| 63 | + <actionGroup ref="SearchAttributeByCodeOnProductAttributeGridActionGroup" stepKey="searchAttributeByCodeOnProductAttributeGrid"> |
| 64 | + <argument name="productAttributeCode" value="{{newProductAttribute.attribute_code}}"/> |
| 65 | + </actionGroup> |
| 66 | + <actionGroup ref="AdminAssertProductAttributeInAttributeGridActionGroup" stepKey="assertAttributeOnProductAttributesGrid"> |
| 67 | + <argument name="productAttributeLabel" value="{{ProductAttributeFrontendLabel.label}}"/> |
| 68 | + </actionGroup> |
| 69 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPageOnStorefront"> |
| 70 | + <argument name="product" value="$createProduct$"/> |
| 71 | + </actionGroup> |
| 72 | + <actionGroup ref="StorefrontAssertUpdatedProductPriceInStorefrontProductPageActionGroup" stepKey="checkProductPriceAndNameInStorefrontProductPage"> |
| 73 | + <argument name="productName" value="$createProduct.name$"/> |
| 74 | + <argument name="expectedPrice" value="$createProduct.price$"/> |
| 75 | + </actionGroup> |
| 76 | + <scrollTo selector="{{StorefrontProductMoreInformationSection.moreInformation}}" stepKey="scrollToAttribute"/> |
| 77 | + <actionGroup ref="CheckAttributeInMoreInformationTabActionGroup" stepKey="checkAttributeInMoreInformationTab"> |
| 78 | + <argument name="attributeLabel" value="{{ProductAttributeFrontendLabel.label}}"/> |
| 79 | + <argument name="attributeValue" value="{{ProductAttributeOption8.value}}"/> |
| 80 | + </actionGroup> |
| 81 | + <actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="quickSearchByProductAttribute"> |
| 82 | + <argument name="phrase" value="{{ProductAttributeOption8.value}}"/> |
| 83 | + </actionGroup> |
| 84 | + <actionGroup ref="AssertStorefrontAttributeOptionPresentInLayeredNavigationActionGroup" stepKey="assertAttributeWithOptionInLayeredNavigation"> |
| 85 | + <argument name="attributeLabel" value="{{ProductAttributeFrontendLabel.label}}"/> |
| 86 | + <argument name="attributeOptionLabel" value="{{ProductAttributeOption8.value}}"/> |
| 87 | + </actionGroup> |
| 88 | + <actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="assertProductPresentOnSearchPage"> |
| 89 | + <argument name="productName" value="$createProduct.name$"/> |
| 90 | + </actionGroup> |
| 91 | + </test> |
| 92 | +</tests> |
0 commit comments