Skip to content

Commit 0230f20

Browse files
committed
MAGETWO-94067: [FT] Magento\Braintree\Test\TestCase\InvoicePayPalBraintreeTest unstable on Bamboo
1 parent 3ed2f4d commit 0230f20

File tree

1 file changed

+11
-0
lines changed
  • dev/tests/functional/tests/app/Magento/Checkout/Test/Block

1 file changed

+11
-0
lines changed

dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Cart.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,19 @@ public function getOnepageLinkBlock()
172172
public function braintreePaypalCheckout()
173173
{
174174
$currentWindow = $this->browser->getCurrentWindow();
175+
// $this->_rootElement->find($this->braintreePaypalCheckoutButton, Locator::SELECTOR_XPATH)
176+
// ->click();
177+
// Button can be enabled/disabled few times.
178+
sleep(2);
179+
180+
$windowsCount = count($this->browser->getWindowHandles());
175181
$this->_rootElement->find($this->braintreePaypalCheckoutButton, Locator::SELECTOR_XPATH)
176182
->click();
183+
$browser = $this->browser;
184+
$this->browser->waitUntil(function () use ($browser, $windowsCount) {
185+
return count($browser->getWindowHandles()) === ($windowsCount + 1) ? true: null;
186+
});
187+
177188
return $currentWindow;
178189
}
179190

0 commit comments

Comments
 (0)