Skip to content

Commit 1e2d445

Browse files
committed
MC-244: Admin should be able to create a simple product using a custom attribute set
- Fix flaky Jenkins failure
1 parent 55f307d commit 1e2d445

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<section name="AdminProductFormSection">
1111
<element name="attributeSet" type="select" selector="div[data-index='attribute_set_id'] .admin__field-control"/>
1212
<element name="attributeSetFilter" type="input" selector="div[data-index='attribute_set_id'] .admin__field-control input"/>
13+
<element name="attributeSetFilterResult" type="input" selector="div[data-index='attribute_set_id'] .action-menu-item._last"/>
1314
<element name="productName" type="input" selector=".admin__field[data-index=name] input"/>
1415
<element name="productSku" type="input" selector=".admin__field[data-index=sku] input"/>
1516
<element name="productStatus" type="checkbox" selector="input[name='product[status]']"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminCreateProductCustomAttributeSet.xml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,28 +45,31 @@
4545
<fillField selector="{{AdminProductAttributeSetSection.name}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="fillName"/>
4646
<selectOption selector="{{AdminProductAttributeSetSection.basedOn}}" userInput="Default" stepKey="selectDefaultSet"/>
4747
<click selector="{{AdminProductAttributeSetSection.saveBtn}}" stepKey="clickSave1"/>
48-
<dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('color')}}" selector2="{{AdminProductAttributeSetSection.attribute('manufacturer')}}" stepKey="unassignColor"/>
48+
<dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('news_from_date')}}" selector2="{{AdminProductAttributeSetSection.attribute('manufacturer')}}" stepKey="unassign1"/>
49+
<dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('news_to_date')}}" selector2="{{AdminProductAttributeSetSection.attribute('manufacturer')}}" stepKey="unassign2"/>
4950
<click selector="{{AdminProductAttributeSetSection.addNewGroupBtn}}" stepKey="clickAddNewGroup"/>
5051
<fillField selector="{{AdminProductAttributeSetSection.newGroupName}}" userInput="TestGroupName" stepKey="fillNewGroupName"/>
5152
<click selector="{{AdminProductAttributeSetSection.modalOk}}" stepKey="clickOkInModal"/>
5253
<dragAndDrop selector1="{{AdminProductAttributeSetSection.attribute('manufacturer')}}" selector2="{{AdminProductAttributeSetSection.attribute('TestGroupName')}}" stepKey="assignManufacturer"/>
5354
<click selector="{{AdminProductAttributeSetSection.saveBtn}}" stepKey="clickSave2"/>
5455

55-
<!-- Go to new product page and see a default attribute (color) -->
56+
<!-- Go to new product page and see a default attribute -->
5657
<amOnPage url="{{AdminProductCreatePage.url('4', 'simple')}}" stepKey="goToNewProductPage"/>
5758
<waitForPageLoad stepKey="wait2"/>
58-
<seeElementInDOM selector="{{AdminProductFormSection.divByDataIndex('color')}}" stepKey="seeColor"/>
59+
<seeElementInDOM selector="{{AdminProductFormSection.divByDataIndex('news_from_date')}}" stepKey="seeNewsFromDate"/>
60+
<seeElementInDOM selector="{{AdminProductFormSection.divByDataIndex('news_to_date')}}" stepKey="seeNewsToDate"/>
5961
<dontSeeElementInDOM selector="{{AdminProductFormSection.divByDataIndex('testgroupname')}}" stepKey="dontSeeTestGroupName"/>
6062

6163
<!-- Switch from default attribute set to new attribute set -->
6264
<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
6365
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="searchForAttrSet"/>
64-
<click selector="div[data-index='attribute_set_id'] .action-menu-item._last" stepKey="selectAttrSet"/> <!-- todo: reusable selector -->
66+
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet"/>
6567
<waitForPageLoad stepKey="wait3"/>
6668

6769
<!-- See new attibute set -->
68-
<dontSeeElementInDOM selector="{{AdminProductFormSection.divByDataIndex('color')}}" stepKey="dontSeeColor"/>
6970
<seeElementInDOM selector="{{AdminProductFormSection.divByDataIndex('testgroupname')}}" stepKey="seeTestGroupName"/>
71+
<dontSeeElementInDOM selector="{{AdminProductFormSection.divByDataIndex('news_from_date')}}" stepKey="dontSeeNewsFromDate"/>
72+
<dontSeeElementInDOM selector="{{AdminProductFormSection.divByDataIndex('news_to_date')}}" stepKey="dontSeeNewsToDate"/>
7073

7174
<!-- Finish filling the new product page -->
7275
<actionGroup ref="fillMainProductFormNoWeight" stepKey="fillSimpleProductMain">

0 commit comments

Comments
 (0)