Skip to content

Commit a416908

Browse files
author
Joan He
committed
Merge remote-tracking branch 'trigger/regression-bug' into BugFixPR
2 parents bebb1d0 + 6589dcf commit a416908

File tree

3 files changed

+63
-2
lines changed

3 files changed

+63
-2
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="LayeredNavigationSection">
12+
<element name="layeredNavigation" type="select" selector="#catalog_layered_navigation-head"/>
13+
<element name="CheckIfTabExpand" type="button" selector="#catalog_layered_navigation-head:not(.open)"/>
14+
<element name="NavigationStepCalculation" type="button" selector="#catalog_layered_navigation_price_range_calculation"/>
15+
<element name="NavigationStepCalculationSystemValue" type="button" selector="#catalog_layered_navigation_price_range_calculation_inherit"/>
16+
<element name="PriceNavigationStep" type="button" selector="#catalog_layered_navigation_price_range_step"/>
17+
<element name="PriceNavigationStepSystemValue" type="button" selector="#catalog_layered_navigation_price_range_step_inherit"/>
18+
</section>
19+
</sections>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminSpecifyLayerNavigationConfigurationTest">
12+
<annotations>
13+
<features value="LayerNavigation"/>
14+
<group value="LayerNavigation"/>
15+
<stories value="Magento_LayeredNavigation"/>
16+
<title value="Admin should be able to uncheck Default Value checkbox for dependent field"/>
17+
<description value="Admin should be able to uncheck Default Value checkbox for dependent field"/>
18+
<severity value="AVERAGE"/>
19+
<testCaseId value="MAGETWO-94872"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="LoginActionGroup" stepKey="login"/>
23+
</before>
24+
<amOnPage url="{{CatalogConfigPage.url}}" stepKey="navigateToConfigurationPage" />
25+
<waitForPageLoad stepKey="wait1"/>
26+
<conditionalClick stepKey="expandLayeredNavigationTab" selector="{{LayeredNavigationSection.layeredNavigation}}" dependentSelector="{{LayeredNavigationSection.CheckIfTabExpand}}" visible="true" />
27+
<waitForElementVisible selector="{{LayeredNavigationSection.NavigationStepCalculationSystemValue}}" stepKey="waitForUseSystemValueVisible"/>
28+
<uncheckOption selector="{{LayeredNavigationSection.NavigationStepCalculationSystemValue}}" stepKey="uncheckUseSystemValue"/>
29+
<selectOption selector="{{LayeredNavigationSection.NavigationStepCalculation}}" userInput="Manual" stepKey="selectOption1"/>
30+
<uncheckOption selector="{{LayeredNavigationSection.PriceNavigationStepSystemValue}}" stepKey="uncheckUseSystemValue2"/>
31+
<fillField selector="{{LayeredNavigationSection.PriceNavigationStep}}" userInput="102" stepKey="fillAdmin1"/>
32+
<click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig" />
33+
<waitForPageLoad stepKey="waitForSavingSystemConfiguration"/>
34+
<seeInField stepKey="seeThatValueWasSaved" selector="{{LayeredNavigationSection.PriceNavigationStep}}" userInput="102"/>
35+
<checkOption selector="{{LayeredNavigationSection.NavigationStepCalculationSystemValue}}" stepKey="setToDefaultValue1"/>
36+
<checkOption selector="{{LayeredNavigationSection.PriceNavigationStepSystemValue}}" stepKey="setToDefaultValue2"/>
37+
<click selector="{{ContentManagementSection.Save}}" stepKey="saveConfig2" />
38+
<waitForPageLoad stepKey="waitForSavingSystemConfiguration2"/>
39+
<after>
40+
<actionGroup ref="logout" stepKey="logout"/>
41+
</after>
42+
</test>
43+
</tests>

lib/web/mage/adminhtml/form.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,8 +494,7 @@ define([
494494
inputs.each(function (item) {
495495
// don't touch hidden inputs (and Use Default inputs too), bc they may have custom logic
496496
if ((!item.type || item.type != 'hidden') && !($(item.id + '_inherit') && $(item.id + '_inherit').checked) && //eslint-disable-line
497-
!(currentConfig['can_edit_price'] != undefined && !currentConfig['can_edit_price']) && //eslint-disable-line
498-
!item.id.endsWith('_inherit')
497+
!(currentConfig['can_edit_price'] != undefined && !currentConfig['can_edit_price']) //eslint-disable-line
499498
) {
500499
item.disabled = false;
501500
jQuery(item).removeClass('ignore-validate');

0 commit comments

Comments
 (0)