Skip to content

Commit 9751461

Browse files
committed
MAGETWO-72466: [Backport][2.1.x] PayPal.js error on checkout downloadable product
1 parent dfed389 commit 9751461

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Login.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ class Login extends Form
4949
*/
5050
protected $loadingMask = '.loading-mask';
5151

52+
private $emailSelector = '[name="username"]';
53+
5254
/**
5355
* Select how to perform checkout whether guest or registered customer.
5456
*
@@ -98,8 +100,7 @@ public function loginCustomer(FixtureInterface $customer)
98100
*/
99101
public function fillGuestFields(FixtureInterface $customer)
100102
{
101-
$mapping = $this->dataMapping();
102-
$this->_rootElement->find($mapping['email']['selector'], $mapping['email']['strategy'])
103+
$this->_rootElement->find($this->emailSelector)
103104
->setValue($customer->getEmail());
104105
}
105106

dev/tests/functional/tests/app/Magento/Checkout/Test/TestStep/SelectCheckoutMethodStep.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,8 @@ public function run()
8282
{
8383
if ($this->checkoutMethod === 'login') {
8484
$this->checkoutOnepage->getLoginBlock()->loginCustomer($this->customer);
85-
} elseif ($this->checkoutMethod === 'guest') {
86-
if (empty($this->shipping)) {
87-
$this->checkoutOnepage->getLoginBlock()->fillGuestFields($this->customer);
88-
}
85+
} elseif (($this->checkoutMethod === 'guest') && empty($this->shipping)) {
86+
$this->checkoutOnepage->getLoginBlock()->fillGuestFields($this->customer);
8987
}
9088
}
9189

0 commit comments

Comments
 (0)