Skip to content

Commit 10d5033

Browse files
Manjusha.SManjusha.S
authored andcommitted
Merge branch 'ACQE-4397-4430' into functional-testing-automation
2 parents e7ad229 + cda987d commit 10d5033

File tree

4 files changed

+45
-9
lines changed

4 files changed

+45
-9
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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="AddNewTaxRateNoZipUIActionGroup">
12+
<annotations>
13+
<description>Goes to the Admin Tax Rules grid page. Adds the provided Tax Code.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="taxCode"/>
17+
</arguments>
18+
19+
<!-- Go to the tax rate page -->
20+
<click stepKey="addNewTaxRate" selector="{{AdminTaxRulesSection.addNewTaxRate}}"/>
21+
22+
<!-- Fill out a new tax rate -->
23+
<fillField stepKey="fillTaxIdentifier" selector="{{AdminTaxRulesSection.taxIdentifier}}" userInput="{{taxCode.identifier}}-{{taxCode.rate}}"/>
24+
<fillField stepKey="fillZipCode" selector="{{AdminTaxRulesSection.zipCode}}" userInput="{{taxCode.zip}}"/>
25+
<selectOption stepKey="selectState" selector="{{AdminTaxRulesSection.state}}" userInput="{{taxCode.state}}"/>
26+
<selectOption stepKey="selectCountry" selector="{{AdminTaxRulesSection.country}}" userInput="{{taxCode.country}}"/>
27+
<fillField stepKey="fillRate" selector="{{AdminTaxRulesSection.rate}}" userInput="{{taxCode.rate}}"/>
28+
29+
<!-- Save the tax rate -->
30+
<click stepKey="saveTaxRate" selector="{{AdminTaxRulesSection.save}}"/>
31+
</actionGroup>
32+
</actionGroups>

app/code/Magento/Tax/Test/Mftf/Data/TaxCodeData.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<data key="rate">0</data>
2222
</entity>
2323
<entity name="SimpleTaxNY" type="tax">
24+
<data key="identifier" unique="suffix" >New York</data>
2425
<data key="state">New York</data>
2526
<data key="country">United States</data>
2627
<data key="zip">*</data>
@@ -33,6 +34,7 @@
3334
<data key="rate">20.00</data>
3435
</entity>
3536
<entity name="SimpleTaxCA" type="tax">
37+
<data key="identifier" unique="suffix" >California</data>
3638
<data key="state">California</data>
3739
<data key="country">United States</data>
3840
<data key="zip">*</data>

app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInSimpleTest.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@
3030
<fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/>
3131

3232
<!-- Add NY and CA tax rules -->
33-
<actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addNYTaxRate">
33+
<actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addNYTaxRate">
3434
<argument name="taxCode" value="SimpleTaxNY"/>
3535
</actionGroup>
3636

37-
<actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addCATaxRate">
37+
<actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addCATaxRate">
3838
<argument name="taxCode" value="SimpleTaxCA"/>
3939
</actionGroup>
4040

4141
<click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/>
42+
<see userInput="You saved the tax rule." selector="{{AdminMessagesSection.success}}" stepKey="seeSuccessMessageForSavingRule"/>
4243
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
4344

4445
<!-- Fill out form for a new user with address -->
@@ -67,14 +68,14 @@
6768
<!-- Go to the tax rate page -->
6869
<actionGroup ref="AdminTaxRateGridOpenPageActionGroup" stepKey="goToTaxRatesPage"/>
6970

70-
<!-- Delete the two tax rates that were created -->
71+
<!-- Delete the two created tax rates -->
7172
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate">
72-
<argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/>
73+
<argument name="name" value="{{SimpleTaxNY.identifier}}-{{SimpleTaxNY.rate}}"/>
7374
<argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/>
7475
</actionGroup>
7576

7677
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate">
77-
<argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/>
78+
<argument name="name" value="{{SimpleTaxCA.identifier}}-{{SimpleTaxCA.rate}}"/>
7879
<argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/>
7980
</actionGroup>
8081

app/code/Magento/Tax/Test/Mftf/Test/StorefrontTaxQuoteCartTest/StorefrontTaxQuoteCartLoggedInVirtualTest.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@
3030
<fillField stepKey="fillRuleName" selector="{{AdminTaxRulesSection.ruleName}}" userInput="SampleRule"/>
3131

3232
<!-- Add NY and CA tax rules -->
33-
<actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addNYTaxRate">
33+
<actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addNYTaxRate">
3434
<argument name="taxCode" value="SimpleTaxNY"/>
3535
</actionGroup>
3636

37-
<actionGroup ref="AddNewTaxRateNoZipActionGroup" stepKey="addCATaxRate">
37+
<actionGroup ref="AddNewTaxRateNoZipUIActionGroup" stepKey="addCATaxRate">
3838
<argument name="taxCode" value="SimpleTaxCA"/>
3939
</actionGroup>
4040

4141
<click stepKey="clickSave" selector="{{AdminStoresMainActionsSection.saveButton}}"/>
42+
<see userInput="You saved the tax rule." selector="{{AdminMessagesSection.success}}" stepKey="seeSuccessMessageForSavingRule"/>
4243

4344
<!-- Fill out form for a new user with address -->
4445
<actionGroup ref="StorefrontOpenCustomerAccountCreatePageActionGroup" stepKey="openCreateAccountPage"/>
@@ -68,12 +69,12 @@
6869

6970
<!-- Delete the two tax rates that were created -->
7071
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteNYRate">
71-
<argument name="name" value="{{SimpleTaxNY.state}}-{{SimpleTaxNY.rate}}"/>
72+
<argument name="name" value="{{SimpleTaxNY.identifier}}-{{SimpleTaxNY.rate}}"/>
7273
<argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/>
7374
</actionGroup>
7475

7576
<actionGroup ref="deleteEntitySecondaryGrid" stepKey="deleteCARate">
76-
<argument name="name" value="{{SimpleTaxCA.state}}-{{SimpleTaxCA.rate}}"/>
77+
<argument name="name" value="{{SimpleTaxCA.identifier}}-{{SimpleTaxCA.rate}}"/>
7778
<argument name="searchInput" value="{{AdminSecondaryGridSection.taxIdentifierSearch}}"/>
7879
</actionGroup>
7980

0 commit comments

Comments
 (0)