Skip to content

Commit e783dd0

Browse files
Manjusha.SManjusha.S
authored andcommitted
Merge branch 'AC-4977' into functional-testing-automation
2 parents 89379a1 + 138befa commit e783dd0

File tree

3 files changed

+128
-0
lines changed

3 files changed

+128
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
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="DisplayPriceForShippingRateOnShoppingCartPageWithSpecificTaxDisplaySettingsTest">
12+
<annotations>
13+
<features value="Checkout"/>
14+
<stories value="Display price for shipping rate on Shopping Cart page according to setting Shipping Price = Including Tax with specific tax display settings"/>
15+
<title value="Display price for shipping rate on Shopping Cart page with specific tax display settings"/>
16+
<description value="Admin can set specific configuration tax display setting for shipping method on Shopping Cart page"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="AC-4977"/>
19+
</annotations>
20+
<before>
21+
<!-- Enable flatRate -->
22+
<createData entity="FlatRateShippingMethodConfig" stepKey="enableFlatRate"/>
23+
<!-- Login Into Admin -->
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
25+
<!-- Go to tax rule page and create a tax rule -->
26+
<actionGroup ref="AdminTaxRuleGridOpenPageActionGroup" stepKey="goToTaxRulePage"/>
27+
<click stepKey="addNewTaxRate" selector="{{AdminGridMainControls.add}}"/>
28+
<fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/>
29+
<!-- Go to the tax rate page -->
30+
<click stepKey="addNewTaxRate1" selector="{{AdminTaxRulesSection.addNewTaxRate}}"/>
31+
32+
<!-- Fill out a new tax rate -->
33+
<fillField stepKey="fillTaxIdentifier" selector="{{AdminTaxRulesSection.taxIdentifier}}" userInput="NewTaxRate"/>
34+
<fillField stepKey="fillZipCode" selector="{{AdminTaxRulesSection.zipCode}}" userInput="*"/>
35+
<selectOption stepKey="selectState" selector="{{AdminTaxRulesSection.state}}" userInput="*"/>
36+
<selectOption stepKey="selectCountry" selector="{{AdminTaxRulesSection.country}}" userInput="United States"/>
37+
<fillField stepKey="fillRate" selector="{{AdminTaxRulesSection.rate}}" userInput="20"/>
38+
39+
<!-- Save the tax rate -->
40+
<click stepKey="saveTaxRate" selector="{{AdminTaxRulesSection.save}}"/>
41+
<click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/>
42+
<!-- Create category -->
43+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
44+
<!--Create Product-->
45+
<createData entity="SimpleProduct2" stepKey="createProduct">
46+
<field key="price">10</field>
47+
<requiredEntity createDataKey="createCategory"/>
48+
</createData>
49+
<!-- change required configurations -->
50+
<actionGroup ref="SetTaxClassForShippingActionGroup" stepKey="setTaxClass"/>
51+
<magentoCLI command="config:set {{CustomCatalogPrices.path}} {{CustomCatalogPrices.value}}" stepKey="setInclTaxCatalogPrice"/>
52+
<magentoCLI command="config:set {{CustomShippingPricesConfigData.path}} {{CustomShippingPricesConfigData.value}}" stepKey="setShippingPrices"/>
53+
<magentoCLI command="config:set {{DisplayShippingAmountConfigData.path}} {{DisplayShippingAmountConfigData.value}}" stepKey="setDisplayShippingAmount"/>
54+
<actionGroup ref="AdminResetShippingOriginConfigurationActionGroup" stepKey="setCaliforniaShippingOrigin"/>
55+
</before>
56+
<after>
57+
<!-- delete created product -->
58+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
59+
<!-- delete created category -->
60+
<deleteData createDataKey="createCategory" stepKey="deleteCategory1"/>
61+
<!-- delete created Tax Rate & Rule -->
62+
<!-- Go to the tax rule page and delete the row created-->
63+
<actionGroup ref="AdminTaxRuleGridOpenPageActionGroup" stepKey="goToTaxRulesPage"/>
64+
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteRule">
65+
<argument name="name" value="SampleRule"/>
66+
<argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/>
67+
</actionGroup>
68+
<!-- Go to the tax rate page -->
69+
<actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRatesPage"/>
70+
<!-- Delete the tax rate that was created -->
71+
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteTaxRate">
72+
<argument name="name" value="NewTaxRate"/>
73+
<argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/>
74+
</actionGroup>
75+
<!-- Revert configurations -->
76+
<actionGroup ref="ResetTaxClassForShippingActionGroup" stepKey="resetTaxClassForShipping"/>
77+
<actionGroup ref="AdminResetShippingOriginConfigurationActionGroup" stepKey="ResetCaliforniaShippingOrigin"/>
78+
<magentoCLI command="config:set {{DisplayShippingAmountConfigData.path}} {{DisplayShippingAmountConfigData.value}}" stepKey="ResetDisplayShippingAmount"/>
79+
<magentoCLI command="config:set {{ShippingPricesConfigData.path}} {{ShippingPricesConfigData.value}}" stepKey="ResetShippingPrices"/>
80+
<magentoCLI command="config:set {{CatalogPrices.path}} {{CatalogPrices.value}}" stepKey="ResetCatalogPrice"/>
81+
<!-- Logout from admin -->
82+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
83+
</after>
84+
85+
<!-- reindex and flush cache -->
86+
<magentoCron groups="index" stepKey="reindex"/>
87+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
88+
<argument name="tags" value="full_page"/>
89+
</actionGroup>
90+
<!-- Go to storefront product page -->
91+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="GoToProductPage">
92+
<argument name="productUrl" value="$$createProduct.custom_attributes[url_key]$$"/>
93+
</actionGroup>
94+
<!--Add to cart -->
95+
<actionGroup ref="StorefrontAddToTheCartActionGroup" stepKey="product2AddToCart"/>
96+
<!--Click on mini cart-->
97+
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
98+
<!--Click on view and edit cart link-->
99+
<actionGroup ref="ClickViewAndEditCartFromMiniCartActionGroup" stepKey="goToShoppingCartFromMiniCart"/>
100+
<waitForPageLoad stepKey="waitForViewAndEditCartToOpen"/>
101+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
102+
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.estimateShippingAndTaxSummary}}" visible="false" stepKey="openEstimateShippingAndTaxSection"/>
103+
<selectOption selector="{{CheckoutCartSummarySection.country}}" userInput="United States" stepKey="selectCountry"/>
104+
<waitForPageLoad stepKey="waitForSelectCountry"/>
105+
<!-- Assert tax and flatRate amount -->
106+
<see selector="{{CheckoutCartSummarySection.shippingPrice}}" userInput="$4.17" stepKey="assertFlatRate"/>
107+
<see selector="{{CheckoutCartSummarySection.taxAmount}}" userInput="$2.50" stepKey="assertTaxAmount"/>
108+
<!--Assert Shopping Cart Summary-->
109+
<actionGroup ref="AssertStorefrontShoppingCartSummaryWithShippingActionGroup" stepKey="AssertCartSummary" >
110+
<argument name="subtotal" value="$8.33"/>
111+
<argument name="shipping" value="$4.17"/>
112+
<argument name="total" value="$15.00"/>
113+
</actionGroup>
114+
</test>
115+
</tests>

app/code/Magento/Sales/Test/Mftf/Test/AdminMassOrdersReleasePendingOrderTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
</annotations>
2121
<before>
2222
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
23+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2324

2425
<!-- Create Data -->
2526
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>

app/code/Magento/Shipping/Test/Mftf/Data/AdminShippingSettingsConfigData.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,16 @@
4848
<entity name="ShippingOriginPostcodeInheritValue" type="inheritPostcodeFlag">
4949
<data key="value">1</data>
5050
</entity>
51+
<entity name="CustomShippingPricesConfigData">
52+
<data key="path">tax/calculation/shipping_includes_tax</data>
53+
<data key="value">1</data>
54+
</entity>
55+
<entity name="ShippingPricesConfigData">
56+
<data key="path">tax/calculation/shipping_includes_tax</data>
57+
<data key="value">0</data>
58+
</entity>
59+
<entity name="DisplayShippingAmountConfigData">
60+
<data key="path">tax/cart_display/shipping</data>
61+
<data key="value">1</data>
62+
</entity>
5163
</entities>

0 commit comments

Comments
 (0)