File tree Expand file tree Collapse file tree 3 files changed +21
-7
lines changed
dev/tests/functional/tests/app/Magento/Vault/Test Expand file tree Collapse file tree 3 files changed +21
-7
lines changed Original file line number Diff line number Diff line change 6
6
*/
7
7
-->
8
8
<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" ../../../../../../vendor/magento/mtf/etc/pages.xsd" >
9
- <page name =" CheckoutOnepage" mca =" checkout" module = " Magento_Checkout " >
9
+ <page name =" CheckoutOnepage" mca =" checkout/index " >
10
10
<block name =" vaultPaymentBlock" class =" Magento\Vault\Test\Block\Onepage\Payment\Method\Vault" locator =" #checkout-step-payment" strategy =" css selector" />
11
+ <block name =" paymentBlock" >
12
+ <render name =" braintree" class =" Magento\Braintree\Test\Block\Form\BraintreeCc" />
13
+ </block >
11
14
</page >
12
15
</config >
Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ public function test(
96
96
if ($ key >= 2 ) { // if this order will be placed via stored credit card
97
97
$ this ->useSavedCreditCard ($ payment ['vault ' ]);
98
98
} else {
99
- $ this ->selectPaymentMethod ($ payment , $ payment ['creditCard ' ]);
99
+ $ arguments = isset ($ payment ['arguments ' ]) ? $ payment ['arguments ' ] : [];
100
+ $ this ->selectPaymentMethod ($ payment , $ payment ['creditCard ' ], $ arguments );
100
101
$ this ->saveCreditCard ($ payment , $ creditCardSave );
101
102
}
102
103
$ this ->placeOrder ();
@@ -249,16 +250,20 @@ protected function fillShippingMethod(array $shipping)
249
250
*
250
251
* @param array $payment
251
252
* @param array $creditCard
253
+ * @param array $arguments
252
254
* @return void
253
255
*/
254
- protected function selectPaymentMethod (array $ payment , array $ creditCard )
256
+ protected function selectPaymentMethod (array $ payment , array $ creditCard, array $ arguments )
255
257
{
256
258
$ selectPaymentMethodStep = ObjectManager::getInstance ()->create (
257
259
\Magento \Checkout \Test \TestStep \SelectPaymentMethodStep::class,
258
- [
259
- 'payment ' => $ payment ,
260
- 'creditCard ' => $ creditCard ,
261
- ]
260
+ array_merge (
261
+ [
262
+ 'payment ' => $ payment ,
263
+ 'creditCard ' => $ creditCard ,
264
+ ],
265
+ $ arguments
266
+ )
262
267
);
263
268
$ selectPaymentMethodStep ->run ();
264
269
}
Original file line number Diff line number Diff line change 17
17
<data name =" payments" xsi : type =" array" >
18
18
<item name =" 0" xsi : type =" array" >
19
19
<item name =" method" xsi : type =" string" >braintree</item >
20
+ <item name =" arguments" xsi : type =" array" >
21
+ <item name =" paymentForm" xsi : type =" string" >braintree</item >
22
+ </item >
20
23
<item name =" creditCard" xsi : type =" array" >
21
24
<item name =" dataset" xsi : type =" string" >visa_default</item >
22
25
<item name =" data" xsi : type =" array" >
35
38
</item >
36
39
<item name =" 2" xsi : type =" array" >
37
40
<item name =" method" xsi : type =" string" >braintree</item >
41
+ <item name =" arguments" xsi : type =" array" >
42
+ <item name =" paymentForm" xsi : type =" string" >braintree</item >
43
+ </item >
38
44
<item name =" creditCard" xsi : type =" array" >
39
45
<item name =" dataset" xsi : type =" string" >visa_default</item >
40
46
<item name =" data" xsi : type =" array" >
You can’t perform that action at this time.
0 commit comments