File tree Expand file tree Collapse file tree 4 files changed +11
-7
lines changed
dev/tests/functional/tests/app/Magento
Catalog/Test/Block/Product Expand file tree Collapse file tree 4 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ public function __construct(CheckoutCart $checkoutCart)
37
37
public function run ()
38
38
{
39
39
$ this ->checkoutCart ->open ();
40
- $ this ->checkoutCart ->getCartBlock ()
40
+ $ currentWindow = $ this ->checkoutCart ->getCartBlock ()
41
41
->braintreePaypalCheckout ();
42
- $ this ->checkoutCart ->getBraintreePaypalBlock ()->process ();
42
+ $ this ->checkoutCart ->getBraintreePaypalBlock ()->process ($ currentWindow );
43
43
}
44
44
}
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public function run()
61
61
{
62
62
$ product = reset ($ this ->products );
63
63
$ this ->browser ->open ($ _ENV ['app_frontend_url ' ] . $ product ->getUrlKey () . '.html ' );
64
- $ this ->catalogProductView ->getViewBlock ()->braintreePaypalCheckout ();
65
- $ this ->catalogProductView ->getBraintreePaypalBlock ()->process ();
64
+ $ parentWindow = $ this ->catalogProductView ->getViewBlock ()->braintreePaypalCheckout ();
65
+ $ this ->catalogProductView ->getBraintreePaypalBlock ()->process ($ parentWindow );
66
66
}
67
67
}
Original file line number Diff line number Diff line change @@ -302,11 +302,12 @@ public function inContextPaypalCheckout()
302
302
303
303
/**
304
304
* Press 'Check out with Braintree PayPal' button.
305
- *
306
- * @return void
305
+ *
306
+ * @return string
307
307
*/
308
308
public function braintreePaypalCheckout ()
309
309
{
310
+ $ currentWindow = $ this ->browser ->getCurrentWindow ();
310
311
/** @var \Magento\Checkout\Test\Block\Cart\Sidebar $miniCart */
311
312
$ miniCart = $ this ->blockFactory ->create (
312
313
'\Magento\Checkout\Test\Block\Cart\Sidebar ' ,
@@ -315,6 +316,7 @@ public function braintreePaypalCheckout()
315
316
316
317
$ miniCart ->openMiniCart ();
317
318
$ miniCart ->clickBraintreePaypalButton ();
319
+ return $ currentWindow ;
318
320
}
319
321
320
322
/**
Original file line number Diff line number Diff line change @@ -152,12 +152,14 @@ public function getOnepageLinkBlock()
152
152
/**
153
153
* Click "Check out with Braintree PayPal" button.
154
154
*
155
- * @return void
155
+ * @return string
156
156
*/
157
157
public function braintreePaypalCheckout ()
158
158
{
159
+ $ currentWindow = $ this ->browser ->getCurrentWindow ();
159
160
$ this ->_rootElement ->find ($ this ->braintreePaypalCheckoutButton , Locator::SELECTOR_XPATH )
160
161
->click ();
162
+ return $ currentWindow ;
161
163
}
162
164
163
165
/**
You can’t perform that action at this time.
0 commit comments