|
| 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="AdminDeleteCustomGroupInAnAttributeSetTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Catalog"/> |
| 14 | + <stories value="Delete Custom Group In An attribute set "/> |
| 15 | + <title value="Delete Custom Group from attribute set"/> |
| 16 | + <description value="Delete Custom Group from attribute set"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MC-26728"/> |
| 19 | + <group value="catalog"/> |
| 20 | + </annotations> |
| 21 | + |
| 22 | + <before> |
| 23 | + |
| 24 | + <!-- Login to Admin --> |
| 25 | + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> |
| 26 | + |
| 27 | + <!-- Create attribute set with custom group --> |
| 28 | + <createData entity="CatalogAttributeSet" stepKey="createAttributeSet"/> |
| 29 | + <actionGroup ref="AdminCreateCustomGroupInAnAttributeSetActionGroup" stepKey="createGroupInAttributeSet"> |
| 30 | + <argument name="name" value="$$createAttributeSet.attribute_set_name$$"/> |
| 31 | + <argument name="customGroupName" value="Custom Group"/> |
| 32 | + </actionGroup> |
| 33 | + <wait stepKey="k1" time="10"/> |
| 34 | + |
| 35 | + <!-- Drag and drop system product attributes in to custom group --> |
| 36 | + <dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('price')}}" selector2="{{AdminProductAttributeSetEditSection.attributeGroupExtender(customGroup.name)}}" stepKey="dragAndDrop"/> |
| 37 | + <dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('sku')}}" selector2="{{AdminProductAttributeSetEditSection.attributeGroupExtender(customGroup.name)}}" stepKey="dragAndDrop1"/> |
| 38 | + |
| 39 | + <!-- Click Save Attribute --> |
| 40 | + <actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttribute"/> |
| 41 | + |
| 42 | + </before> |
| 43 | + |
| 44 | + <after> |
| 45 | + |
| 46 | + <!-- Delete attribute set --> |
| 47 | + <deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/> |
| 48 | + |
| 49 | + <!-- Logout from Admin --> |
| 50 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 51 | + |
| 52 | + </after> |
| 53 | + |
| 54 | + <!-- Navigate to Stores > Attributes > Attribute Set --> |
| 55 | + <amOnPage url="{{AdminProductAttributeSetGridPage.url}}" stepKey="goToAttributeSetPage"/> |
| 56 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 57 | + |
| 58 | + <!-- Search and open Attribute Set from preconditions --> |
| 59 | + <actionGroup ref="GoToAttributeSetByNameActionGroup" stepKey="searchAttribute"> |
| 60 | + <argument name="name" value="$$createAttributeSet.attribute_set_name$$"/> |
| 61 | + </actionGroup> |
| 62 | + |
| 63 | + <!-- Delete created custom group --> |
| 64 | + <click selector="{{AdminProductAttributeSetEditSection.attributeGroup('Custom Group')}}" stepKey="selectCustomGroup"/> |
| 65 | + <click selector="{{AdminProductAttributeSetEditSection.DeleteSelectedGroup}}" stepKey="clickDeleteSelectedGroup"/> |
| 66 | + <wait stepKey="k3" time="20"/> |
| 67 | + <seeElement selector="{{AdminProductAttributeSetEditSection.attentionMessage}}" stepKey="assertCustomGroup"/> |
| 68 | + <click selector="{{AdminProductAttributeSetEditSection.buttonOk}}" stepKey="clickOk"/> |
| 69 | + <wait stepKey="k4" time="10"/> |
| 70 | + |
| 71 | + <!-- Drag and drop product attributes to its original groups --> |
| 72 | + <dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('price')}}" selector2="{{AdminProductAttributeSetEditSection.attributeGroup('Product Details')}}" stepKey="dragAndDrop3"/> |
| 73 | + <dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('sku')}}" selector2="{{AdminProductAttributeSetEditSection.attributeGroup('Product Details')}}" stepKey="dragAndDrop4"/> |
| 74 | + <click selector="{{AdminProductAttributeSetEditSection.attributeGroup('Custom Group')}}" stepKey="selectCustomGroup1"/> |
| 75 | + <click selector="{{AdminProductAttributeSetEditSection.DeleteSelectedGroup}}" stepKey="deleteSelectedGroup1"/> |
| 76 | + |
| 77 | + <wait stepKey="k5" time="10"/> |
| 78 | + |
| 79 | + <!-- Click 'Save' --> |
| 80 | + <actionGroup ref="SaveAttributeSetActionGroup" stepKey="saveAttribute1"/> |
| 81 | + |
| 82 | + <!-- Again open attribute set and search for custom group --> |
| 83 | + <actionGroup ref="GoToAttributeSetByNameActionGroup" stepKey="searchAttribute1"> |
| 84 | + <argument name="name" value="$$createAttributeSet.attribute_set_name$$"/> |
| 85 | + </actionGroup> |
| 86 | + |
| 87 | + <!-- Custom Group is absent in attribute set --> |
| 88 | + <dontSeeElement selector="{{AdminProductAttributeSetEditSection.attributeGroup('Custom Group')}}" stepKey="assertCustomGroupIsNotPresent"/> |
| 89 | + |
| 90 | + <!-- Navigate to Catalog > Products --> |
| 91 | + <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="amOnProductPage"/> |
| 92 | + |
| 93 | + <!-- Start to create a new simple product with the custom attribute set from the preconditions --> |
| 94 | + <click selector="{{AdminProductGridActionSection.addProductBtn}}" stepKey="clickAddProduct"/> |
| 95 | + <waitForPageLoad stepKey="waitForNewProductPage"/> |
| 96 | + <actionGroup ref="AdminProductPageSelectAttributeSetActionGroup" stepKey="selectAttribute"> |
| 97 | + <argument name="attributeSetName" value="$$createAttributeSet.attribute_set_name$$"/> |
| 98 | + </actionGroup> |
| 99 | + |
| 100 | + <!-- Custom Group is absent in attribute set --> |
| 101 | + <dontSeeElement selector="{{AdminProductAttributeSection.attributeGroupByName('Custom Group')}}" stepKey="dontSeeCustomGroup"/> |
| 102 | + |
| 103 | + </test> |
| 104 | +</tests> |
| 105 | + |
0 commit comments