Skip to content

Removed redundant header issue in grid cells while adding grouped product items after changing attribute set #31142

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

Merged
merged 11 commits into from
Dec 21, 2020
Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?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="AdminAssertProductOnGroupedOptionGridActionGroup">
<annotations>
<description>Admin assert product on grouped option grid.</description>
</annotations>
<arguments>
<argument name="product"/>
</arguments>

<grabTextFrom selector="{{AdminGroupedProductOptionGridSection.productName}}" stepKey="grabProductName"/>
<assertEquals stepKey="assertProductName">
<expectedResult type="string">{{product.name}}</expectedResult>
<actualResult type="variable">$grabProductName</actualResult>
</assertEquals>

<grabTextFrom selector="{{AdminGroupedProductOptionGridSection.productSku}}" stepKey="grabProductSku"/>
<assertEquals stepKey="assertProductSku">
<expectedResult type="string">{{product.sku}}</expectedResult>
<actualResult type="variable">$grabProductSku</actualResult>
</assertEquals>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
<section name="AdminGroupedProductOptionGridSection">
<element name="productName" type="text" selector=".data-row td[data-index='name']"/>
<element name="productSku" type="text" selector=".data-row td[data-index='sku']"/>
</section>
</sections>
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
<test name="AdminCreateGroupedProductNonDefaultAttributeSetTest">
<annotations>
<features value="GroupedProduct"/>
<stories value="Create product"/>
<title value="Create Grouped Product when non-default attribute set is chosen"/>
<description value="Create Grouped Product with simple when non-default attribute set is chosen"/>
<testCaseId value="MC-39950"/>
<severity value="MAJOR"/>
<group value="groupedProduct"/>
</annotations>
<before>
<createData entity="ApiProductWithDescription" stepKey="createSimpleProduct"/>
<createData entity="CatalogAttributeSet" stepKey="createAttributeSet"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
<deleteData createDataKey="createSimpleProduct" stepKey="deleteFirstProduct"/>
<deleteData createDataKey="createAttributeSet" stepKey="deleteAttributeSet"/>
</after>

<actionGroup ref="GoToSpecifiedCreateProductPageActionGroup" stepKey="createGroupedProduct">
<argument name="productType" value="grouped"/>
</actionGroup>
<actionGroup ref="AdminProductPageSelectAttributeSetActionGroup" stepKey="selectAttributeSet">
<argument name="attributeSetName" value="$createAttributeSet.attribute_set_name$"/>
</actionGroup>
<actionGroup ref="FillGroupedProductFormActionGroup" stepKey="fillProductForm">
<argument name="product" value="GroupedProduct"/>
</actionGroup>
<actionGroup ref="AdminAssignProductToGroupActionGroup" stepKey="addSimpleToGroup">
<argument name="product" value="$$createSimpleProduct$$"/>
</actionGroup>
<actionGroup ref="AdminAssertProductOnGroupedOptionGridActionGroup" stepKey="assertProductOptionGrid">
<argument name="product" value="$$createSimpleProduct$$"/>
</actionGroup>
</test>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ protected function fillMeta()
'fit' => true,
'label' => __('Thumbnail'),
'sortOrder' => 20,
'labelVisible' => false,
],
],
],
Expand All @@ -586,6 +587,7 @@ protected function fillMeta()
'validation' => [
'validate-number' => true,
],
'labelVisible' => false,
],
],
],
Expand All @@ -601,7 +603,8 @@ protected function fillMeta()
'elementTmpl' => 'Magento_GroupedProduct/components/position',
'sortOrder' => 90,
'fit' => true,
'dataScope' => 'positionCalculated'
'dataScope' => 'positionCalculated',
'labelVisible' => false,
],
],
],
Expand Down Expand Up @@ -660,6 +663,7 @@ protected function getTextColumn($dataScope, $fit, Phrase $label, $sortOrder)
'fit' => $fit,
'label' => $label,
'sortOrder' => $sortOrder,
'labelVisible' => false,
],
],
],
Expand Down