Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MFTF] Adding AdminSelectAttributeSetOnEditProductPageActionGroup #31287

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@
<!-- Switch from default attribute set to new attribute set -->
<amOnPage url="{{AdminProductCreatePage.url('4', 'bundle')}}" stepKey="goToNewProductPage"/>
<waitForPageLoad stepKey="wait2"/>
<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="searchForAttrSet"/>
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet"/>

<actionGroup ref="AdminSelectAttributeSetOnEditProductPageActionGroup" stepKey="startEditAttrSet">
<argument name="attributeSet" value="{{ProductAttributeFrontendLabel.label}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="searchForAttrSet"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectAttrSet"/>

<fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="fillProductSku"/>

Expand All @@ -64,9 +68,11 @@
<click selector="{{AdminProductFiltersSection.attributeSetOfFirstRow(ProductAttributeFrontendLabel.label)}}" stepKey="clickAttributeSet2"/>
<waitForPageLoad stepKey="waitForPageLoad2"/>

<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet2"/>
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{BundleProduct.defaultAttribute}}" stepKey="searchForAttrSet2"/>
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet2"/>
<actionGroup ref="AdminSelectAttributeSetOnEditProductPageActionGroup" stepKey="startEditAttrSet2">
<argument name="attributeSet" value="{{BundleProduct.defaultAttribute}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="searchForAttrSet2"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectAttrSet2"/>

<!--save the product/published by default-->
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton2"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,11 @@
<checkOption selector="{{AdminProductFormBundleSection.enableDisableToggle}}" stepKey="clickOnEnableDisableToggleAgain"/>

<!--Apply Attribute Set-->
<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{ProductAttributeFrontendLabelTwo.label}}" stepKey="searchForAttrSet"/>
<click selector="{{AdminProductFormSection.attributeSetFilterResultByName(ProductAttributeFrontendLabelTwo.label)}}" stepKey="selectAttrSet"/>
<actionGroup ref="AdminSelectAttributeSetOnEditProductPageActionGroup" stepKey="startEditAttrSet">
<argument name="attributeSet" value="{{ProductAttributeFrontendLabelTwo.label}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="searchForAttrSet"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectAttrSet"/>

<!--Product name and SKU-->
<fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name2}}" stepKey="fillProductName"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminSelectAttributeSetOnEditProductPageActionGroup">
<annotations>
<description>Selects the specified value from the Attribute Set dropdown on the opened product edit page.</description>
</annotations>
<arguments>
<argument name="attributeSet" type="string"/>
</arguments>

<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="clickAttributeSetDropdown"/>
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{attributeSet}}" stepKey="searchForAttributeSet"/>
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttributeSet"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@
<argument name="product" value="$$createSimpleProduct$$"/>
</actionGroup>

<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="$$createAttributeSet.attribute_set_name$$" stepKey="searchForAttrSet"/>
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet"/>
<actionGroup ref="AdminSelectAttributeSetOnEditProductPageActionGroup" stepKey="startEditAttrSet">
<argument name="attributeSet" value="$$createAttributeSet.attribute_set_name$$"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="searchForAttrSet"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectAttrSet"/>

<waitForText userInput="$$createProductAttribute.default_frontend_label$$" stepKey="seeAttributeInForm"/>
</test>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@
</actionGroup>

<!-- Switch from default attribute set to new attribute set -->
<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="$$createAttributeSet.attribute_set_name$$" stepKey="searchForAttrSet"/>
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet"/>
<actionGroup ref="AdminSelectAttributeSetOnEditProductPageActionGroup" stepKey="startEditAttrSet">
<argument name="attributeSet" value="$$createAttributeSet.attribute_set_name$$"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="searchForAttrSet"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectAttrSet"/>

<!-- See new attribute set -->
<see selector="{{AdminProductFormSection.attributeSet}}" userInput="$$createAttributeSet.attribute_set_name$$" stepKey="seeAttributeSetName"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@
<!-- Switch from default attribute set to new attribute set -->
<!-- A scrollToTopOfPage is needed to hide the floating header -->
<scrollToTopOfPage stepKey="scrollToTop"/>
<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="searchForAttrSet"/>
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet"/>
<actionGroup ref="AdminSelectAttributeSetOnEditProductPageActionGroup" stepKey="startEditAttrSet">
<argument name="attributeSet" value="{{ProductAttributeFrontendLabel.label}}"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="searchForAttrSet"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectAttrSet"/>

<!-- See new attibute set -->
<seeElementInDOM selector="{{AdminProductFormSection.divByDataIndex('testgroupname')}}" stepKey="seeTestGroupName"/>
Expand Down