|
18 | 18 | <group value="Catalog"/>
|
19 | 19 | </annotations>
|
20 | 20 | <before>
|
21 |
| - <!-- Create a custom attribute set and custom product attribute --> |
22 |
| - <createData entity="CatalogAttributeSet" stepKey="createAttributeSet"/> |
23 |
| - <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> |
| 21 | + <!-- Create a custom attribute set and custom product attribute --> |
| 22 | + <createData entity="CatalogAttributeSet" stepKey="createAttributeSet"/> |
| 23 | + <createData entity="productAttributeWithTwoOptions" stepKey="createConfigProductAttribute"/> |
| 24 | + |
| 25 | + <!-- Login to Admin --> |
| 26 | + <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> |
24 | 27 | </before>
|
25 | 28 | <after>
|
26 | 29 | <deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
|
27 | 30 | <actionGroup ref="logout" stepKey="logout"/>
|
28 | 31 | </after>
|
29 |
| - <!-- Login to Admin --> |
30 |
| - <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> |
31 | 32 |
|
32 | 33 | <!-- Navigate to Stores > Attributes > Attribute Set -->
|
33 | 34 | <amOnPage url="{{AdminProductAttributeSetGridPage.url}}" stepKey="goToAttributeSetPage"/>
|
|
50 | 51 | <see userInput="This is a required field." selector="{{AdminProductAttributeSetEditSection.errorLabel}}" stepKey="seeErrorMessage"/>
|
51 | 52 |
|
52 | 53 | <!-- Fill 'name' for new group and click 'Ok': Name = Custom group -->
|
53 |
| - <fillField userInput="Custom group" selector="{{AdminProductAttributeSetEditSection.newGroupName}}" stepKey="fillCustomGroupName"/> |
| 54 | + <fillField userInput="{{customGroup.name}}" selector="{{AdminProductAttributeSetEditSection.newGroupName}}" stepKey="fillCustomGroupName"/> |
54 | 55 | <click selector="{{AdminProductAttributeSetEditSection.buttonOk}}" stepKey="clickButtonOk"/>
|
55 | 56 |
|
56 | 57 | <!-- Group is created and displayed in 'Groups' block -->
|
57 |
| - <seeElement selector="{{AdminProductAttributeSetEditSection.attributeGroup('Custom group')}}" stepKey="assertCustomGroup"/> |
| 58 | + <seeElement selector="{{AdminProductAttributeSetEditSection.attributeGroup(customGroup.name)}}" stepKey="assertCustomGroup"/> |
58 | 59 |
|
59 | 60 | <!-- Move custom Product Attribute to new 'Custom group' Group -->
|
60 | 61 | <waitForAjaxLoad stepKey="waitForAjaxLoad"/>
|
61 |
| - <click selector="{{AdminProductAttributeSetEditSection.attributeGroupExtender('Custom group')}}" stepKey="click"/> |
| 62 | + <click selector="{{AdminProductAttributeSetEditSection.attributeGroupExtender(customGroup.name)}}" stepKey="click"/> |
62 | 63 | <waitForPageLoad stepKey="waitForPageLoadAfterClick"/>
|
63 |
| - <dragAndDrop selector1="{{AdminProductAttributeSetEditSection.unassignedAttribute($$createConfigProductAttribute.attribute_code$$)}}" selector2="{{AdminProductAttributeSetEditSection.attributeGroupExtender('Custom group')}}" stepKey="moveAttribute"/> |
| 64 | + <dragAndDrop selector1="{{AdminProductAttributeSetEditSection.unassignedAttribute($$createConfigProductAttribute.attribute_code$$)}}" selector2="{{AdminProductAttributeSetEditSection.attributeGroupExtender(customGroup.name)}}" stepKey="moveAttribute"/> |
64 | 65 | <waitForPageLoad stepKey="waitForDragAndDrop"/>
|
65 | 66 |
|
66 | 67 | <!-- Attribute is displayed in the new group -->
|
|
77 | 78 | <click selector="{{AdminProductAttributeSetEditSection.AddNewGroup}}" stepKey="clickAddEmptyGroup"/>
|
78 | 79 | <waitForAjaxLoad stepKey="waitForLoad"/>
|
79 | 80 |
|
80 |
| - <fillField userInput="Empty group" selector="{{AdminProductAttributeSetEditSection.newGroupName}}" stepKey="fillGroupName"/> |
| 81 | + <fillField userInput="{{emptyGroup.name}}" selector="{{AdminProductAttributeSetEditSection.newGroupName}}" stepKey="fillGroupName"/> |
81 | 82 | <click selector="{{AdminProductAttributeSetEditSection.buttonOk}}" stepKey="clickOnOk"/>
|
82 | 83 | <waitForPageLoad stepKey="waitForNewGroup"/>
|
83 | 84 |
|
84 | 85 | <!-- Empty group is created. No attributes are assigned to it. -->
|
85 |
| - <seeElement selector="{{AdminProductAttributeSetEditSection.attributeGroup('Empty group')}}" stepKey="assertEmptyGroup"/> |
86 |
| - <dontSeeElement selector="{{AdminProductAttributeSetEditSection.attributesInGroup('Empty group')}}" stepKey="seeNoAttributes"/> |
| 86 | + <seeElement selector="{{AdminProductAttributeSetEditSection.attributeGroup(emptyGroup.name)}}" stepKey="assertEmptyGroup"/> |
| 87 | + <dontSeeElement selector="{{AdminProductAttributeSetEditSection.attributesInGroup(emptyGroup.name)}}" stepKey="seeNoAttributes"/> |
87 | 88 |
|
88 | 89 | <!-- Navigate to Catalog > Products -->
|
89 | 90 | <amOnPage url="{{AdminProductIndexPage.url}}" stepKey="amOnProductPage"/>
|
|
98 | 99 | </actionGroup>
|
99 | 100 |
|
100 | 101 | <!-- New Section 'Custom group' is present in form. The section contains the attribute from preconditions -->
|
101 |
| - <seeElement selector="{{AdminProductAttributeSection.attributeGroupByName('Custom group')}}" stepKey="seeSectionCustomGroup"/> |
102 |
| - <click selector="{{AdminProductAttributeSection.attributeGroupByName('Custom group')}}" stepKey="openCustomGroupSection"/> |
| 102 | + <seeElement selector="{{AdminProductAttributeSection.attributeGroupByName(customGroup.name)}}" stepKey="seeSectionCustomGroup"/> |
| 103 | + <click selector="{{AdminProductAttributeSection.attributeGroupByName(customGroup.name)}}" stepKey="openCustomGroupSection"/> |
103 | 104 | <waitForAjaxLoad stepKey="waitForOpenSection"/>
|
104 |
| - <scrollTo selector="//footer" stepKey="scrollToFooter"/> |
105 |
| - <seeElement selector="{{AdminProductAttributeSection.attributeByGroupAndName('Custom group')}}" stepKey="seeAttributePresent"/> |
| 105 | + <scrollTo selector="{{AdminProductFormSection.footerBlock}}" stepKey="scrollToFooter"/> |
| 106 | + <seeElement selector="{{AdminProductAttributeSection.attributeByGroupAndName(customGroup.name)}}" stepKey="seeAttributePresent"/> |
106 | 107 |
|
107 | 108 | <!-- Empty section is absent in Product Form -->
|
108 |
| - <dontSeeElement selector="{{AdminProductAttributeSection.attributeGroupByName('Empty group')}}" stepKey="dontSeeEmptyGroup"/> |
| 109 | + <dontSeeElement selector="{{AdminProductAttributeSection.attributeGroupByName(emptyGroup.name)}}" stepKey="dontSeeEmptyGroup"/> |
109 | 110 | </test>
|
110 | 111 | </tests>
|
0 commit comments