|
19 | 19 | <group value="catalog"/>
|
20 | 20 | </annotations>
|
21 | 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"> |
| 22 | + <before> |
| 23 | + |
| 24 | + <!-- Login to Admin --> |
| 25 | + <actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/> |
| 26 | + <!-- Create attribute set with custom group --> |
| 27 | + <createData entity="CatalogAttributeSet" stepKey="createAttributeSet"/> |
| 28 | + <actionGroup ref="AdminCreateCustomGroupInAnAttributeSetActionGroup" stepKey="createGroupInAttributeSet"> |
| 29 | + <argument name="name" value="$$createAttributeSet.attribute_set_name$$"/> |
| 30 | + <argument name="customGroupName" value="Custom Group"/> |
| 31 | + </actionGroup> |
| 32 | + <actionGroup ref="GoToAttributeSetByNameActionGroup" stepKey="OpenAttributeSet"> |
| 33 | + <argument name="name" value="$$createAttributeSet.attribute_set_name$$"/> |
| 34 | + </actionGroup> |
| 35 | + <waitForPageLoad stepKey="waitForDragAndDropAttributes"/> |
| 36 | + <!-- Drag and drop system product attributes in to custom group --> |
| 37 | + <dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('price')}}" selector2="{{AdminProductAttributeSetEditSection.attributeGroupExtender(customGroup.name)}}" stepKey="dragAndDrop"/> |
| 38 | + <dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('sku')}}" selector2="{{AdminProductAttributeSetEditSection.attributeGroupExtender(customGroup.name)}}" stepKey="dragAndDrop1"/> |
| 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 | + <!-- Logout from Admin --> |
| 49 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 50 | + |
| 51 | + </after> |
| 52 | + <!-- Open attribute set and delete custom group --> |
| 53 | + <actionGroup ref="AdminDeleteCustomGroupDragAndDropAttributesInAnAttributeSetActionGroup" stepKey="deleteGroupInAttributeSet"> |
60 | 54 | <argument name="name" value="$$createAttributeSet.attribute_set_name$$"/>
|
| 55 | + <argument name="customGroupName" value="Custom Group"/> |
61 | 56 | </actionGroup>
|
62 | 57 |
|
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 | 58 | <!-- Again open attribute set and search for custom group -->
|
83 | 59 | <actionGroup ref="GoToAttributeSetByNameActionGroup" stepKey="searchAttribute1">
|
84 | 60 | <argument name="name" value="$$createAttributeSet.attribute_set_name$$"/>
|
85 | 61 | </actionGroup>
|
86 |
| - |
87 | 62 | <!-- Custom Group is absent in attribute set -->
|
88 | 63 | <dontSeeElement selector="{{AdminProductAttributeSetEditSection.attributeGroup('Custom Group')}}" stepKey="assertCustomGroupIsNotPresent"/>
|
89 |
| - |
90 | 64 | <!-- Navigate to Catalog > Products -->
|
91 | 65 | <actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="amOnProductPage"/>
|
92 |
| - |
93 | 66 | <!-- Start to create a new simple product with the custom attribute set from the preconditions -->
|
94 | 67 | <click selector="{{AdminProductGridActionSection.addProductBtn}}" stepKey="clickAddProduct"/>
|
95 |
| - <waitForPageLoad stepKey="waitForNewProductPage"/> |
| 68 | + <waitForPageLoad stepKey="waitForSelectAttribute"/> |
96 | 69 | <actionGroup ref="AdminProductPageSelectAttributeSetActionGroup" stepKey="selectAttribute">
|
97 | 70 | <argument name="attributeSetName" value="$$createAttributeSet.attribute_set_name$$"/>
|
98 | 71 | </actionGroup>
|
99 |
| - |
100 | 72 | <!-- Custom Group is absent in attribute set -->
|
101 | 73 | <dontSeeElement selector="{{AdminProductAttributeSection.attributeGroupByName('Custom Group')}}" stepKey="dontSeeCustomGroup"/>
|
102 | 74 |
|
|
0 commit comments