Skip to content

Commit ac1247f

Browse files
committed
Merge remote-tracking branch 'magento-l3/ACP2E-2247' into AUG102023_PR_pradeep
2 parents fb625cf + b4e95c0 commit ac1247f

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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="AdminCheckTaxForDetailsTagExpandCollapseTest">
12+
<annotations>
13+
<features value="Tax"/>
14+
<stories value="Additional settings"/>
15+
<title value="Additional settings expand collapse icon visible"/>
16+
<description value="Checking expand and collapse icon for additional settings"/>
17+
<severity value="AVERAGE"/>
18+
<testCaseId value="AC-9376"/>
19+
<useCaseId value="ACP2E-2247"/>
20+
<group value="tax"/>
21+
<group value="sales"/>
22+
</annotations>
23+
<before>
24+
<!--Login as admin-->
25+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
26+
</before>
27+
<after>
28+
<!--Logout-->
29+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
30+
</after>
31+
<!-- Go to the tax rule page -->
32+
<actionGroup ref="AdminTaxRuleGridOpenPageActionGroup" stepKey="goToTaxRulesPage"/>
33+
<!-- Click new tax rule -->
34+
<actionGroup ref="AdminClickAddTaxRuleButtonActionGroup" stepKey="clickAddNewTaxRuleButton"/>
35+
<!-- Click expand icon -->
36+
<conditionalClick selector="{{AdminTaxRuleFormSection.additionalSettings}}" dependentSelector="{{AdminTaxRuleFormSection.additionalSettingsOpened}}" visible="false" stepKey="openAdditionalSettings"/>
37+
<!-- Check class in selector -->
38+
<seeElement selector="details#detailsbase_fieldset ._show" stepKey="seeBox"/>
39+
</test>
40+
</tests>

app/code/Magento/Tax/view/adminhtml/templates/rule/edit.phtml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,18 @@ $scriptString.= <<<script
318318
319319
window.TaxRateEditableMultiselect = TaxRateEditableMultiselect;
320320
});
321+
322+
require(['jquery'], function($) {
323+
jQuery('.admin__collapsible-block-wrapper').on('click', function () {
324+
if(!this.hasAttribute('open')) {
325+
jQuery(this).addClass('_show');
326+
jQuery(this).children().addClass('_show');
327+
} else {
328+
jQuery(this).removeClass('_show');
329+
jQuery(this).children().removeClass('_show');
330+
}
331+
});
332+
});
321333
script;
322334
?>
323335
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>

app/design/adminhtml/Magento/backend/Magento_Tax/web/css/source/_module.less

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// * See COPYING.txt for license details.
44
// */
55

6+
/**
7+
* @codingStandardsIgnoreStart
8+
*/
69
.block-footer .action-add {
710
-webkit-appearance: none;
811
&:extend(.action-default, button all);
@@ -25,3 +28,16 @@
2528
font-size: 1.3rem;
2629
}
2730
}
31+
32+
.admin__collapsible-block-wrapper {
33+
.admin__collapsible-title._show {
34+
&:before {
35+
content: @icon-expand-close__content;
36+
font-size: @collapsible-title-icon__size;
37+
position: absolute;
38+
right: @data-grid__font-size;
39+
top: 2.3rem;
40+
}
41+
}
42+
}
43+
//@codingStandardsIgnoreEnd

0 commit comments

Comments
 (0)