Skip to content

Commit 6f13e93

Browse files
committed
MC-234: Admin should be able to create category from the product page
- Account for admin product creation on b2b and ee
1 parent 11ce389 commit 6f13e93

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
<element name="FolderName" type="text" selector="//span[text()='{{var1}}']" parameterized="true"/>
1919
</section>
2020
<section name="ModifyAttributes">
21-
<!-- Parameter is the order number of the attribute on the page (1 is the newest) -->
22-
<element name="nthExistingAttribute" type="block" selector=".admin__field:nth-of-type({{numElement}}) .admin__control-select" parameterized="true"/>
23-
<!-- First parameter is the order number of the attribute on the page, 2nd parameter is the number option in the dropdown (1 for blank) -->
24-
<element name="nthAttributeOption" type="block" selector=".admin__field:nth-of-type({{numElement}}) .admin__control-select option:nth-of-type({{numOption}})" parameterized="true"/>
21+
<!-- Parameter is the attribute name -->
22+
<element name="nthExistingAttribute" type="select" selector="//*[text()='{{attributeName}}']/../..//select" parameterized="true"/>
2523
</section>
2624
</sections>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<description value="Admin should be able to create category from the product page" />
1616
<severity value="AVERAGE"/>
1717
<testCaseId value="MC-234"/>
18-
<group value="Levi"/>
18+
<group value="Catalog"/>
1919
</annotations>
2020
<before>
2121
<!-- Login as admin -->

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<description value="Admin should be able to create simple product with two custom options"/>
1717
<severity value="AVERAGE"/>
1818
<testCaseId value="MC-248"/>
19-
<group value="Levi"/>
19+
<group value="Catalog"/>
2020
</annotations>
2121
<before>
2222
<!-- log in as admin -->

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/AdminConfigurableProductUpdateAttributeTest.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
<requiredEntity createDataKey="createModifiableProductAttribute"/>
3737
</createData>
3838

39-
4039
<!-- TODO: This should be converted to an actionGroup once MQE-993 is fixed. -->
4140
<!-- Create the category the product will be a part of -->
4241
<createData entity="ApiCategory" stepKey="createCategory"/>
@@ -111,6 +110,7 @@
111110
<!-- Get the current option of the attribute before it was changed -->
112111
<amOnPage url="/{{ApiConfigurableProduct.urlKey}}2.html" stepKey="goToConfigProductPage"/>
113112
<waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/>
113+
114114
<grabTextFrom stepKey="getBeforeOption" selector="{{StorefrontProductInfoMainSection.nthAttributeOnPage('1')}}"/>
115115

116116
<!-- Find the product that we just created using the product grid -->
@@ -126,9 +126,7 @@
126126
<waitForPageLoad stepKey="waitForProductPageLoad"/>
127127

128128
<!-- change the option on the first attribute -->
129-
<click stepKey="clickFirstAttribute" selector="{{ModifyAttributes.nthExistingAttribute('1')}}"/>
130-
131-
<click stepKey="clickSecondAttributeOption" selector="{{ModifyAttributes.nthAttributeOption('1', '2')}}"/>
129+
<selectOption stepKey="clickFirstAttribute" selector="{{ModifyAttributes.nthExistingAttribute($$createModifiableProductAttribute.default_frontend_label$$)}}" userInput="option1"/>
132130

133131
<!-- Save the product -->
134132
<click stepKey="saveProductAttribute" selector="{{AdminProductFormActionSection.saveButton}}"/>

0 commit comments

Comments
 (0)