Skip to content

Commit 1bf0376

Browse files
committed
Merge remote-tracking branch 'origin/AC-3201' into Hammer_Community_Backlog_06092022
2 parents be5513f + 581f298 commit 1bf0376

File tree

4 files changed

+83
-1
lines changed

4 files changed

+83
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="ZeroTaxSubtotalActionGroup">
12+
<annotations>
13+
<description>Zero tax subtotal should not be displayed on frontend after admin config setting</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="optionValue" type="string" defaultValue="{{DefaultTotalFlagZero.value}}"/>
17+
</arguments>
18+
<amOnPage url="{{AdminTaxConfigurationPage.url}}" stepKey="navigateToAdminStoreTaxConfiguration"/>
19+
<scrollTo selector="{{AdminZeroTaxFormSection.label}}" stepKey="scrollToDropdownSelection" />
20+
<selectOption selector="{{AdminZeroTaxFormSection.optionvalue}}" userInput="{{optionValue}}" stepKey="setSelectorValue"/>
21+
<click selector="{{AdminZeroTaxFormSection.saveConfig}}" stepKey="clickSave"/>
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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="AdminZeroTaxFormSection">
12+
<element name="optionvalue" type="select" selector="select#tax_cart_display_zero_tax"/>
13+
<element name="saveConfig" type="button" selector="#save" timeout="30"/>
14+
<element name="label" type="input" selector="#row_tax_cart_display_zero_tax"/>
15+
</section>
16+
</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="StoreFrontZeroTaxSettingCheckOnCartPage">
12+
<annotations>
13+
<stories value="Storefront cart page"/>
14+
<title value="Zero tax configuration for multiple shipping methods on Cart page"/>
15+
<description value="Zero tax configuration for multiple shipping methods on Cart page"/>
16+
<severity value="MINOR"/>
17+
<testCaseId value="AC-3201"/>
18+
<group value="Tax"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
22+
<actionGroup ref="ZeroTaxSubtotalActionGroup" stepKey="zerosubtotal"/>
23+
<createData entity="_defaultCategory" stepKey="createCategory"/>
24+
<createData entity="SimpleProduct" stepKey="createProduct01">
25+
<requiredEntity createDataKey="createCategory"/>
26+
</createData>
27+
</before>
28+
<after>
29+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
30+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
31+
<deleteData createDataKey="createProduct01" stepKey="deleteProduct1"/>
32+
</after>
33+
34+
<amOnPage url="$$createProduct01.custom_attributes[url_key]$$.html" stepKey="goToSimpleProductPage"/>
35+
<waitForPageLoad stepKey="waitForSimpleProductPage"/>
36+
<waitForElementClickable selector="{{StorefrontProductActionSection.addToCart}}" stepKey="waitForAddToCartButton"/>
37+
<click stepKey="addSimpleProductToCart" selector="{{StorefrontProductActionSection.addToCart}}"/>
38+
<waitForPageLoad stepKey="waitForProductAdded"/>
39+
<see stepKey="seeSuccess" selector="{{StorefrontMessagesSection.success}}" userInput="You added"/>
40+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCartPage" />
41+
<dontSeeElement selector="//*[@id='cart-totals']/div/table/tbody/tr[2]/th[contains(text(),'Tax')]" stepKey="checkZerotaxVisible"/>
42+
</test>
43+
</tests>

app/code/Magento/Tax/view/frontend/web/js/view/checkout/cart/totals/tax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ define([
2121
* @override
2222
*/
2323
ifShowValue: function () {
24-
if (this.getPureValue() === 0) {
24+
if (parseInt(this.getPureValue()) === 0) { //eslint-disable-line radix
2525
return isZeroTaxDisplayed;
2626
}
2727

0 commit comments

Comments
 (0)