Skip to content

Commit c73664a

Browse files
committed
ACP2E-125: Cover MC-38156 with autotest
1 parent 5788e74 commit c73664a

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

app/code/Magento/Catalog/Test/Mftf/Section/AdminCreateProductAttributeSection/AdvancedAttributePropertiesSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<element name="defaultValueDatetime" type="date" selector="#default_value_datetime"/>
1717
<element name="DefaultValueYesNo" type="textarea" selector="#default_value_yesno"/>
1818
<element name="Scope" type="select" selector="#is_global"/>
19+
<element name="ScopeDisabled" type="select" selector="#is_global[disabled='disabled']"/>
1920
<element name="UniqueValue" type="select" selector="#is_unique"/>
2021
<element name="AddToColumnOptions" type="select" selector="#is_used_in_grid"/>
2122
<element name="UseInFilterOptions" type="select" selector="#is_filterable_in_grid"/>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminEditMediaGalleryProductAttributeScopeTest">
11+
<annotations>
12+
<features value="Catalog"/>
13+
<stories value="MC-38156-Error on changing Media gallery attribute scope back to Global"/>
14+
<group value="Catalog"/>
15+
<title value="Admin are not able to change Scope of Media Gallery product attribute"/>
16+
<description value="Admin are not able to change Scope of Media Gallery product attribute"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-40774"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginGetFromGeneralFile"/>
22+
</before>
23+
24+
<actionGroup ref="AdminOpenProductAttributePageActionGroup" stepKey="navigateToProductAttribute"/>
25+
<click selector="{{AdminProductAttributeGridSection.ResetFilter}}" stepKey="resetFiltersOnGrid1"/>
26+
<fillField selector="{{AdminProductAttributeGridSection.GridFilterFrontEndLabel}}" userInput="Media Gallery" stepKey="setAttributeLabel1"/>
27+
<click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid1"/>
28+
<click selector="{{AdminProductAttributeGridSection.FirstRow}}" stepKey="clickOnAttributeRow1"/>
29+
<waitForPageLoad stepKey="wait2"/>
30+
31+
<seeOptionIsSelected selector="{{AttributePropertiesSection.InputType}}" userInput="Gallery" stepKey="seeGallerySelected" />
32+
<see selector="{{AttributePropertiesSection.InputType}}" userInput="Gallery" stepKey="seeGallerySelected1" />
33+
<click selector="{{AdvancedAttributePropertiesSection.AdvancedAttributePropertiesSectionToggle}}" stepKey="clickAdvancedAttributePropertiesSectionToggle"/>
34+
35+
<seeElement selector="{{AdvancedAttributePropertiesSection.Scope}}" stepKey="seeScope" />
36+
<seeOptionIsSelected selector="{{AdvancedAttributePropertiesSection.Scope}}" userInput="Global" stepKey="seeGlobalScopeSelected" />
37+
<see selector="{{AdvancedAttributePropertiesSection.Scope}}" userInput="Global" stepKey="seeGlobalScopeSelected1" />
38+
39+
<seeElement selector="{{AdvancedAttributePropertiesSectionToggle.ScopeDisabled}}" stepKey="seeScopeDisabled" />
40+
<seeOptionIsSelected selector="{{AdvancedAttributePropertiesSection.ScopeDisabled}}" userInput="Global" stepKey="seeGlobalScopeSelectedDisabled" />
41+
<see selector="{{AdvancedAttributePropertiesSection.ScopeDisabled}}" userInput="Global" stepKey="seeGlobalScopeSelectedDisabled1" />
42+
</test>
43+
</tests>
44+

0 commit comments

Comments
 (0)