Skip to content

Commit 9517396

Browse files
Lusine-PapyanYauhen_Lyskavets
authored andcommitted
MAGETWO-67450: The rate in order is duplicated
- Updated automated test script
1 parent 8d10c41 commit 9517396

File tree

5 files changed

+54
-31
lines changed

5 files changed

+54
-31
lines changed

app/code/Magento/Catalog/Test/Mftf/Data/CatalogPriceConfigData.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11-
<entity name="CatalogPriceScopeConfigData">
11+
<entity name="CatalogPriceScopeWebsiteConfigData">
1212
<data key="path">catalog/price/scope</data>
13-
<data key="value_website">1</data>
14-
<data key="value_global">0</data>
13+
<data key="value">1</data>
14+
</entity>
15+
<entity name="CatalogPriceScopeGlobalConfigData">
16+
<data key="path">catalog/price/scope</data>
17+
<data key="value">0</data>
1518
</entity>
1619
</entities>

app/code/Magento/CurrencySymbol/Test/Mftf/Data/CurrencyRatesConfigData.xml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,45 @@
88

99
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11-
<entity name="SetCurrencyBaseConfig">
11+
<entity name="SetCurrencyUSDBaseConfig">
1212
<data key="path">currency/options/base</data>
13-
<data key="value_usd">USD</data>
14-
<data key="value_eur">EUR</data>
13+
<data key="value">USD</data>
1514
<data key="scope">websites</data>
1615
<data key="scope_code">base</data>
1716
</entity>
18-
<entity name="SetAllowedCurrenciesConfig">
17+
<entity name="SetCurrencyEURBaseConfig">
18+
<data key="path">currency/options/base</data>
19+
<data key="value">EUR</data>
20+
<data key="scope">websites</data>
21+
<data key="scope_code">base</data>
22+
</entity>
23+
<entity name="SetAllowedCurrenciesConfigForThree">
24+
<data key="path">currency/options/allow</data>
25+
<data key="value">EUR,USD,RUB</data>
26+
<data key="scope">websites</data>
27+
<data key="scope_code">base</data>
28+
</entity>
29+
<entity name="SetAllowedCurrenciesConfigForTwo">
1930
<data key="path">currency/options/allow</data>
20-
<data key="value_three_currencies">EUR,USD,RUB</data>
21-
<data key="value_two_currencies">EUR,USD</data>
22-
<data key="value_usd">USD</data>
31+
<data key="value">EUR,USD</data>
32+
<data key="scope">websites</data>
33+
<data key="scope_code">base</data>
34+
</entity>
35+
<entity name="SetAllowedCurrenciesConfigForOne">
36+
<data key="path">currency/options/allow</data>
37+
<data key="value">USD</data>
38+
<data key="scope">websites</data>
39+
<data key="scope_code">base</data>
40+
</entity>
41+
<entity name="SetDefaultCurrencyEURConfig">
42+
<data key="path">currency/options/default</data>
43+
<data key="value">EUR</data>
2344
<data key="scope">websites</data>
2445
<data key="scope_code">base</data>
2546
</entity>
26-
<entity name="SetDefaultCurrencyConfig">
47+
<entity name="SetDefaultCurrencyUSDConfig">
2748
<data key="path">currency/options/default</data>
28-
<data key="value_eur">EUR</data>
29-
<data key="value_usd">USD</data>
49+
<data key="value">USD</data>
3050
<data key="scope">websites</data>
3151
<data key="scope_code">base</data>
3252
</entity>

app/code/Magento/CurrencySymbol/Test/Mftf/Page/AdminCurrencyRatesPage.xml

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

99
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11-
<page name="AdminCurrencyRatesPage" url="admin/system_currency/" area="admin" module="Currency">
11+
<page name="AdminCurrencyRatesPage" url="admin/system_currency/" area="admin" module="CurrencySymbol">
1212
<section name="AdminCurrencyRatesSection"/>
1313
</page>
1414
</pages>

app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayWhenChooseThreeAllowedCurrenciesTest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
<!--Create product-->
2525
<createData entity="SimpleProduct2" stepKey="createNewProduct"/>
2626
<!--Set Currency options for Website-->
27-
<magentoCLI command="config:set --scope={{SetCurrencyBaseConfig.scope}} --scope-code={{SetCurrencyBaseConfig.scope_code}} {{SetCurrencyBaseConfig.path}} {{SetCurrencyBaseConfig.value_usd}}" stepKey="setCurrencyBaseUSDWebsites"/>
28-
<magentoCLI command="config:set --scope={{SetAllowedCurrenciesConfig.scope}} --scope-code={{SetAllowedCurrenciesConfig.scope_code}} {{SetAllowedCurrenciesConfig.path}} {{SetAllowedCurrenciesConfig.value_three_currencies}}" stepKey="setAllowedCurrencyWebsites"/>
29-
<magentoCLI command="config:set --scope={{SetDefaultCurrencyConfig.scope}} --scope-code={{SetDefaultCurrencyConfig.scope_code}} {{SetDefaultCurrencyConfig.path}} {{SetDefaultCurrencyConfig.value_eur}}" stepKey="setCurrencyDefaultEURWebsites"/>
27+
<magentoCLI command="config:set --scope={{SetCurrencyUSDBaseConfig.scope}} --scope-code={{SetCurrencyUSDBaseConfig.scope_code}} {{SetCurrencyUSDBaseConfig.path}} {{SetCurrencyUSDBaseConfig.value}}" stepKey="setCurrencyBaseUSDWebsites"/>
28+
<magentoCLI command="config:set --scope={{SetAllowedCurrenciesConfigForThree.scope}} --scope-code={{SetAllowedCurrenciesConfigForThree.scope_code}} {{SetAllowedCurrenciesConfigForThree.path}} {{SetAllowedCurrenciesConfigForThree.value}}" stepKey="setAllowedCurrencyWebsites"/>
29+
<magentoCLI command="config:set --scope={{SetDefaultCurrencyEURConfig.scope}} --scope-code={{SetDefaultCurrencyEURConfig.scope_code}} {{SetDefaultCurrencyEURConfig.path}} {{SetDefaultCurrencyEURConfig.value}}" stepKey="setCurrencyDefaultEURWebsites"/>
3030
</before>
3131
<after>
3232
<!--Delete created product-->

app/code/Magento/CurrencySymbol/Test/Mftf/Test/AdminOrderRateDisplayedInOneLineTest.xml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,28 @@
2424
<!--Create product-->
2525
<createData entity="SimpleProduct2" stepKey="createProduct"/>
2626
<!--Set price scope website-->
27-
<magentoCLI command="config:set {{CatalogPriceScopeConfigData.path}} {{CatalogPriceScopeConfigData.value_website}}" stepKey="setCatalogPriceScopeWebsite"/>
27+
<magentoCLI command="config:set {{CatalogPriceScopeWebsiteConfigData.path}} {{CatalogPriceScopeWebsiteConfigData.value}}" stepKey="setCatalogPriceScopeWebsite"/>
2828
<!--Set Currency options for Default Config-->
29-
<magentoCLI command="config:set {{SetCurrencyBaseConfig.path}} {{SetCurrencyBaseConfig.value_eur}}" stepKey="setCurrencyBaseEUR"/>
30-
<magentoCLI command="config:set {{SetAllowedCurrenciesConfig.path}} {{SetAllowedCurrenciesConfig.value_two_currencies}}" stepKey="setAllowedCurrencyEUR"/>
31-
<magentoCLI command="config:set {{SetDefaultCurrencyConfig.path}} {{SetDefaultCurrencyConfig.value_eur}}" stepKey="setCurrencyDefaultEUR"/>
29+
<magentoCLI command="config:set {{SetCurrencyEURBaseConfig.path}} {{SetCurrencyEURBaseConfig.value}}" stepKey="setCurrencyBaseEUR"/>
30+
<magentoCLI command="config:set {{SetAllowedCurrenciesConfigForTwo.path}} {{SetAllowedCurrenciesConfigForTwo.value}}" stepKey="setAllowedCurrencyEUR"/>
31+
<magentoCLI command="config:set {{SetDefaultCurrencyEURConfig.path}} {{SetDefaultCurrencyEURConfig.value}}" stepKey="setCurrencyDefaultEUR"/>
3232
<!--Set Currency options for Website-->
33-
<magentoCLI command="config:set --scope={{SetCurrencyBaseConfig.scope}} --scope-code={{SetCurrencyBaseConfig.scope_code}} {{SetCurrencyBaseConfig.path}} {{SetCurrencyBaseConfig.value_usd}}" stepKey="setCurrencyBaseEURWebsites"/>
34-
<magentoCLI command="config:set --scope={{SetAllowedCurrenciesConfig.scope}} --scope-code={{SetAllowedCurrenciesConfig.scope_code}} {{SetAllowedCurrenciesConfig.path}} {{SetAllowedCurrenciesConfig.value_two_currencies}}" stepKey="setAllowedCurrencyWebsites"/>
35-
<magentoCLI command="config:set --scope={{SetDefaultCurrencyConfig.scope}} --scope-code={{SetDefaultCurrencyConfig.scope_code}} {{SetDefaultCurrencyConfig.path}} {{SetDefaultCurrencyConfig.value_eur}}" stepKey="setCurrencyDefaultEURWebsites"/>
33+
<magentoCLI command="config:set --scope={{SetCurrencyUSDBaseConfig.scope}} --scope-code={{SetCurrencyUSDBaseConfig.scope_code}} {{SetCurrencyUSDBaseConfig.path}} {{SetCurrencyUSDBaseConfig.value}}" stepKey="setCurrencyBaseEURWebsites"/>
34+
<magentoCLI command="config:set --scope={{SetAllowedCurrenciesConfigForTwo.scope}} --scope-code={{SetAllowedCurrenciesConfigForTwo.scope_code}} {{SetAllowedCurrenciesConfigForTwo.path}} {{SetAllowedCurrenciesConfigForTwo.value}}" stepKey="setAllowedCurrencyWebsites"/>
35+
<magentoCLI command="config:set --scope={{SetDefaultCurrencyEURConfig.scope}} --scope-code={{SetDefaultCurrencyEURConfig.scope_code}} {{SetDefaultCurrencyEURConfig.path}} {{SetDefaultCurrencyEURConfig.value}}" stepKey="setCurrencyDefaultEURWebsites"/>
3636
</before>
3737
<after>
3838
<!--Delete created product-->
3939
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
4040
<!--Reset configurations-->
41-
<magentoCLI command="config:set {{CatalogPriceScopeConfigData.path}} {{CatalogPriceScopeConfigData.value_global}}" stepKey="setCatalogPriceScopeGlobal"/>
42-
<magentoCLI command="config:set {{SetCurrencyBaseConfig.path}} {{SetCurrencyBaseConfig.value_usd}}" stepKey="setCurrencyBaseUSD"/>
43-
<magentoCLI command="config:set {{SetDefaultCurrencyConfig.path}} {{SetDefaultCurrencyConfig.value_usd}}" stepKey="setCurrencyDefaultUSD"/>
44-
<magentoCLI command="config:set {{SetAllowedCurrenciesConfig.path}} {{SetAllowedCurrenciesConfig.value_usd}}" stepKey="setAllowedCurrencyUSD"/>
41+
<magentoCLI command="config:set {{CatalogPriceScopeGlobalConfigData.path}} {{CatalogPriceScopeGlobalConfigData.value}}" stepKey="setCatalogPriceScopeGlobal"/>
42+
<magentoCLI command="config:set {{SetCurrencyUSDBaseConfig.path}} {{SetCurrencyUSDBaseConfig.value}}" stepKey="setCurrencyBaseUSD"/>
43+
<magentoCLI command="config:set {{SetDefaultCurrencyUSDConfig.path}} {{SetDefaultCurrencyUSDConfig.value}}" stepKey="setCurrencyDefaultUSD"/>
44+
<magentoCLI command="config:set {{SetAllowedCurrenciesConfigForOne.path}} {{SetAllowedCurrenciesConfigForOne.value}}" stepKey="setAllowedCurrencyUSD"/>
4545
<!--Set Currency options for Website-->
46-
<magentoCLI command="config:set --scope={{SetCurrencyBaseConfig.scope}} --scope-code={{SetCurrencyBaseConfig.scope_code}} {{SetCurrencyBaseConfig.path}} {{SetCurrencyBaseConfig.value_usd}}" stepKey="setCurrencyBaseUSDWebsites"/>
47-
<magentoCLI command="config:set --scope={{SetDefaultCurrencyConfig.scope}} --scope-code={{SetDefaultCurrencyConfig.scope_code}} {{SetDefaultCurrencyConfig.path}} {{SetDefaultCurrencyConfig.value_usd}}" stepKey="setCurrencyDefaultUSDWebsites"/>
48-
<magentoCLI command="config:set --scope={{SetAllowedCurrenciesConfig.scope}} --scope-code={{SetAllowedCurrenciesConfig.scope_code}} {{SetAllowedCurrenciesConfig.path}} {{SetAllowedCurrenciesConfig.value_usd}}" stepKey="setAllowedCurrencyUSDWebsites"/>
46+
<magentoCLI command="config:set --scope={{SetCurrencyUSDBaseConfig.scope}} --scope-code={{SetCurrencyUSDBaseConfig.scope_code}} {{SetCurrencyUSDBaseConfig.path}} {{SetCurrencyUSDBaseConfig.value}}" stepKey="setCurrencyBaseUSDWebsites"/>
47+
<magentoCLI command="config:set --scope={{SetDefaultCurrencyUSDConfig.scope}} --scope-code={{SetDefaultCurrencyUSDConfig.scope_code}} {{SetDefaultCurrencyUSDConfig.path}} {{SetDefaultCurrencyUSDConfig.value}}" stepKey="setCurrencyDefaultUSDWebsites"/>
48+
<magentoCLI command="config:set --scope={{SetAllowedCurrenciesConfigForOne.scope}} --scope-code={{SetAllowedCurrenciesConfigForOne.scope_code}} {{SetAllowedCurrenciesConfigForOne.path}} {{SetAllowedCurrenciesConfigForOne.value}}" stepKey="setAllowedCurrencyUSDWebsites"/>
4949
<actionGroup ref="logout" stepKey="logout"/>
5050
</after>
5151
<!--Open created product on Storefront and place for order-->

0 commit comments

Comments
 (0)