File tree Expand file tree Collapse file tree 7 files changed +18
-21
lines changed
dev/tests/functional/tests/app/Magento
AdvancedPricingImportExport/Test Expand file tree Collapse file tree 7 files changed +18
-21
lines changed Original file line number Diff line number Diff line change @@ -86,9 +86,6 @@ private function getPreparePrices()
86
86
foreach ($ tierPrices as $ tierPrice ) {
87
87
$ resultProductArray [$ productSku ][] = $ tierPrice ;
88
88
}
89
- if (isset ($ resultProductArray [$ productSku ])) {
90
- $ resultProductArray [$ productSku ] = array_reverse ($ resultProductArray [$ productSku ]);
91
- }
92
89
}
93
90
94
91
// Prepare tier prices data from csv file.
Original file line number Diff line number Diff line change 26
26
</item >
27
27
</item >
28
28
</data >
29
- <constraint name =" Magento\AdvancedPricingImportExport \Test\Constraint\AssertImportSuccessMessage" />
29
+ <constraint name =" Magento\ImportExport \Test\Constraint\AssertImportSuccessMessage" />
30
30
<constraint name =" Magento\AdvancedPricingImportExport\Test\Constraint\AssertImportAdvancedPricing" />
31
31
</variation >
32
32
<variation name =" ImportProductsVariation2" ticketId =" MAGETWO-46156" summary =" Replace product tier prices" >
48
48
</item >
49
49
</item >
50
50
</data >
51
- <constraint name =" Magento\AdvancedPricingImportExport \Test\Constraint\AssertImportSuccessMessage" />
51
+ <constraint name =" Magento\ImportExport \Test\Constraint\AssertImportSuccessMessage" />
52
52
<constraint name =" Magento\AdvancedPricingImportExport\Test\Constraint\AssertImportAdvancedPricing" />
53
53
</variation >
54
54
<variation name =" ImportProductsVariation3" ticketId =" MAGETWO-46157" summary =" Delete product tier prices" >
70
70
</item >
71
71
</item >
72
72
</data >
73
- <constraint name =" Magento\AdvancedPricingImportExport \Test\Constraint\AssertImportSuccessMessage" />
73
+ <constraint name =" Magento\ImportExport \Test\Constraint\AssertImportSuccessMessage" />
74
74
<constraint name =" Magento\AdvancedPricingImportExport\Test\Constraint\AssertImportAdvancedPricing" />
75
75
</variation >
76
76
<variation name =" ImportProductsVariation4" ticketId =" MAGETWO-46159" summary =" Replace product tier prices in two websites" >
Original file line number Diff line number Diff line change 9
9
'data_0 ' => [
10
10
'sku ' => '%sku% ' ,
11
11
'tier_price_website ' => "All Websites [USD] " ,
12
- 'tier_price_customer_group ' => ' General ' ,
12
+ 'tier_price_customer_group ' => " NOT LOGGED IN " ,
13
13
'tier_price_qty ' => '10 ' ,
14
- 'tier_price ' => '8 .00 ' ,
14
+ 'tier_price ' => '9 .00 ' ,
15
15
'tier_price_value_type ' => 'Fixed ' ,
16
16
],
17
17
'data_1 ' => [
18
18
'sku ' => '%sku% ' ,
19
19
'tier_price_website ' => "All Websites [USD] " ,
20
- 'tier_price_customer_group ' => " NOT LOGGED IN " ,
20
+ 'tier_price_customer_group ' => ' General ' ,
21
21
'tier_price_qty ' => '10 ' ,
22
- 'tier_price ' => '9 .00 ' ,
22
+ 'tier_price ' => '8 .00 ' ,
23
23
'tier_price_value_type ' => 'Fixed ' ,
24
24
]
25
25
],
Original file line number Diff line number Diff line change 3
3
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
- namespace Magento \AdvancedPricingImportExport \Test \Constraint ;
6
+ namespace Magento \ImportExport \Test \Constraint ;
7
7
8
8
use Magento \ImportExport \Test \Page \Adminhtml \AdminImportIndex ;
9
9
use Magento \Mtf \Constraint \AbstractConstraint ;
Original file line number Diff line number Diff line change @@ -206,15 +206,15 @@ private function preparePlaceHolders()
206
206
$ key = 0 ;
207
207
foreach ($ this ->entities as $ entity ) {
208
208
$ entityData = $ this ->prepareEntityData ($ entity );
209
- foreach ($ this ->csvTemplate ['entity_ ' . $ key ] as $ tierKey => $ tier ) {
210
- $ values = implode ('' , array_values ($ tier ));
209
+ foreach ($ this ->csvTemplate ['entity_ ' . $ key ] as $ entityKey => $ importedEntityData ) {
210
+ $ values = implode ('' , array_values ($ importedEntityData ));
211
211
preg_match_all ('/\%(.*)\%/U ' , $ values , $ indexes );
212
212
foreach ($ indexes [1 ] as $ index ) {
213
213
if (isset ($ entityData [$ index ])) {
214
- $ placeholders ['entity_ ' . $ key ][$ tierKey ]["% {$ index }% " ] = $ entityData [$ index ];
214
+ $ placeholders ['entity_ ' . $ key ][$ entityKey ]["% {$ index }% " ] = $ entityData [$ index ];
215
215
}
216
216
if (isset ($ entityData ['code ' ])) {
217
- $ placeholders ['entity_ ' . $ key ][$ tierKey ][$ entityData ['code ' ]]
217
+ $ placeholders ['entity_ ' . $ key ][$ entityKey ][$ entityData ['code ' ]]
218
218
= isset ($ entityData [$ entityData ['code ' ]])
219
219
? $ entityData [$ entityData ['code ' ]]
220
220
: 'Main Website ' ;
Original file line number Diff line number Diff line change 7
7
-->
8
8
<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../../../vendor/magento/mtf/etc/pages.xsd" >
9
9
<page name =" AdminExportIndex" area =" Adminhtml" mca =" admin/export/index" module =" Magento_ImportExport" >
10
- <block name =" filterExport" class =" Magento\ImportExport\Test\Block\Adminhtml\Export\Filter" locator =" #export_filter_container" strategy =" css selector" />
11
- <block name =" exportForm" class =" Magento\ImportExport\Test\Block\Adminhtml\Export\Edit\Form" locator =" #container" strategy =" css selector" />
10
+ <block name =" filterExport" class =" Magento\ImportExport\Test\Block\Adminhtml\Export\Filter" locator =" #export_filter_container" strategy =" css selector" />
11
+ <block name =" exportForm" class =" Magento\ImportExport\Test\Block\Adminhtml\Export\Edit\Form" locator =" #container" strategy =" css selector" />
12
12
<block name =" messagesBlock" class =" Magento\Backend\Test\Block\Messages" locator =" #messages" strategy =" css selector" />
13
13
</page >
14
14
</config >
Original file line number Diff line number Diff line change 10
10
use Magento \Mtf \Fixture \FixtureFactory ;
11
11
12
12
/**
13
- * Create custom store step.
13
+ * Change currency on custom website step.
14
14
*/
15
15
class ChangeCurrencyOnCustomWebsiteStep implements TestStepInterface
16
16
{
@@ -38,12 +38,12 @@ class ChangeCurrencyOnCustomWebsiteStep implements TestStepInterface
38
38
/**
39
39
* @param FixtureFactory $fixtureFactory
40
40
* @param ImportData $import
41
- * @param bool|null $changeCurrency
41
+ * @param bool $changeCurrency
42
42
*/
43
43
public function __construct (
44
44
FixtureFactory $ fixtureFactory ,
45
45
ImportData $ import ,
46
- $ changeCurrency
46
+ $ changeCurrency = false
47
47
) {
48
48
$ this ->fixtureFactory = $ fixtureFactory ;
49
49
$ this ->import = $ import ;
@@ -53,7 +53,7 @@ public function __construct(
53
53
/**
54
54
* Fill import form.
55
55
*
56
- * @return void
56
+ * @return array
57
57
*/
58
58
public function run ()
59
59
{
You can’t perform that action at this time.
0 commit comments