Skip to content

Commit 2471c69

Browse files
committed
B2B-1704: Add MFTF test for MC-38621
- Adding S3 test for exporting tax rates
1 parent deaa8af commit 2471c69

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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="AdminAwsS3ExportTaxRatesTest" extends="AdminExportTaxRatesTest">
12+
<annotations>
13+
<features value="AwsS3"/>
14+
<stories value="Export"/>
15+
<title value="S3 - Export Tax Rates"/>
16+
<description value="Sets S3 for file system. Exports tax rates from the System > Data Transfer > Import/Export Tax Rates page and
17+
validates contents in downloaded file. Note that MFTF cannot simply click export and have access to the file
18+
that is downloaded in the browser due to the test not having access to the server that is running the test
19+
browser. Therefore, this test verifies that the Export button can be successfully clicked, grabs the request
20+
URL from the Export button's form, executes the request on the magento machine via a curl request, and
21+
verifies the contents of the exported file."/>
22+
<severity value="MAJOR"/>
23+
<testCaseId value="MC-38949"/>
24+
<group value="importExport"/>
25+
<group value="tax"/>
26+
</annotations>
27+
28+
<before>
29+
<!-- Enable AWS S3 Remote Storage -->
30+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage" before="revertInitialTaxRateCA"/>
31+
</before>
32+
33+
<after>
34+
<!-- Disable AWS S3 Remote Storage -->
35+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage" after="logoutFromAdmin"/>
36+
</after>
37+
</test>
38+
</tests>

app/code/Magento/AwsS3/Test/Mftf/Test/AdminAwsS3ImportTaxRatesTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<before>
2525
<!-- Enable AWS S3 Remote Storage -->
26-
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage" before="loginAsAdmin"/>
26+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage" before="revertInitialTaxRateCA"/>
2727
</before>
2828

2929
<after>

app/code/Magento/TaxImportExport/Test/Mftf/Test/AdminImportTaxRatesTest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
</annotations>
2323

2424
<before>
25+
<!-- Create/Revert Seed Data -->
26+
<createData entity="US_CA_Rate_1" stepKey="revertInitialTaxRateCA"/>
27+
<createData entity="US_NY_Rate_1" stepKey="revertInitialTaxRateNY"/>
28+
2529
<!-- Login as Admin -->
2630
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2731
</before>

0 commit comments

Comments
 (0)