Skip to content

Commit 60282bf

Browse files
merge magento/2.4-develop into magento-tsg/2.4-develop-pr67
2 parents e4d11d3 + 48d7868 commit 60282bf

File tree

12 files changed

+72
-497
lines changed

12 files changed

+72
-497
lines changed

app/code/Magento/Paypal/Controller/Express/AbstractExpress/Cancel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function execute()
3131
->unsLastSuccessQuoteId()
3232
->unsLastOrderId()
3333
->unsLastRealOrderId();
34+
$this->_getSession()->unsQuoteId(); // clean quote from session that was set in OnAuthorization
3435
$this->messageManager->addSuccessMessage(
3536
__('Express Checkout and Order have been canceled.')
3637
);

app/code/Magento/Paypal/Controller/Express/AbstractExpress/PlaceOrder.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Magento\Paypal\Model\Api\ProcessableException as ApiProcessableException;
1212

1313
/**
14-
* Class PlaceOrder
14+
* Creates order on backend and prepares session to show appropriate next step in flow
1515
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1616
*/
1717
class PlaceOrder extends \Magento\Paypal\Controller\Express\AbstractExpress
@@ -127,6 +127,7 @@ public function execute()
127127
return;
128128
}
129129
$this->_initToken(false); // no need in token anymore
130+
$this->_getSession()->unsQuoteId(); // clean quote from session that was set in OnAuthorization
130131
$this->_redirect('checkout/onepage/success');
131132
return;
132133
} catch (ApiProcessableException $e) {

app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
<waitForPageLoad stepKey="waitForPageLoad"/>
1717
<seeCurrentUrlMatches regex="~\//www.sandbox.paypal.com/~" stepKey="seeCurrentUrlMatchesConfigPath1"/>
1818
<conditionalClick selector="{{PayPalPaymentSection.notYouLink}}" dependentSelector="{{PayPalPaymentSection.notYouLink}}" visible="true" stepKey="selectNotYouSection"/>
19+
<conditionalClick selector="{{PayPalPaymentSection.existingAccountLoginBtn}}" dependentSelector="{{PayPalPaymentSection.existingAccountLoginBtn}}" visible="true" stepKey="skipAccountCreationAndLogin"/>
20+
<waitForPageLoad stepKey="waitForLoginPageLoad"/>
1921
<waitForElement selector="{{PayPalPaymentSection.email}}" stepKey="waitForLoginForm" />
2022
<fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/paypal_sandbox_login_email}}" stepKey="fillEmail"/>
2123
<click selector="{{PayPalPaymentSection.nextButton}}" stepKey="clickNext"/>

app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection/PayPalPaymentSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<section name="PayPalPaymentSection">
1111
<element name="guestCheckout" type="input" selector="#guest"/>
1212
<element name="loginSection" type="input" selector=" #main&gt;#login"/>
13+
<element name="existingAccountLoginBtn" type="input" selector="#loginSection a"/>
1314
<element name="email" type="input" selector="//input[contains(@name, 'email') and not(contains(@style, 'display:none'))]"/>
1415
<element name="password" type="input" selector="//input[contains(@name, 'password') and not(contains(@style, 'display:none'))]"/>
1516
<element name="loginBtn" type="input" selector="button#btnLogin"/>

app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonInCheckoutPageTest.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MC-13690"/>
1919
<group value="paypalExpress"/>
20-
<skip>
21-
<issueId value="MC-35722"/>
22-
</skip>
2320
</annotations>
2421
<before>
2522
<!-- Login -->

app/code/Magento/Paypal/Test/Mftf/Test/StorefrontPaypalSmartButtonWithFranceMerchantCountryTest.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
<severity value="MAJOR"/>
1818
<testCaseId value="MC-33274"/>
1919
<group value="paypalExpress"/>
20-
<skip>
21-
<issueId value="MC-35722"/>
22-
</skip>
2320
</annotations>
2421
<before>
2522
<!--Set price scope global-->

dev/tests/integration/testsuite/Magento/Setup/Model/ConfigOptionsListCollectorTest.php

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
*/
66
namespace Magento\Setup\Model;
77

8+
use Magento\Framework\Component\ComponentRegistrarInterface;
9+
use Magento\Setup\Validator\DbValidator;
10+
use Laminas\ServiceManager\ServiceLocatorInterface;
11+
812
class ConfigOptionsListCollectorTest extends \PHPUnit\Framework\TestCase
913
{
1014
/**
@@ -14,7 +18,7 @@ class ConfigOptionsListCollectorTest extends \PHPUnit\Framework\TestCase
1418

1519
protected function setUp(): void
1620
{
17-
$this->objectManagerProvider = $this->createMock(\Magento\Setup\Model\ObjectManagerProvider::class);
21+
$this->objectManagerProvider = $this->createMock(ObjectManagerProvider::class);
1822
$this->objectManagerProvider
1923
->expects($this->any())
2024
->method('get')
@@ -24,11 +28,13 @@ protected function setUp(): void
2428
public function testCollectOptionsLists()
2529
{
2630
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
27-
$fullModuleListMock = $this->createMock(\Magento\Framework\Module\FullModuleList::class);
28-
$fullModuleListMock->expects($this->once())->method('getNames')->willReturn(['Magento_Backend']);
31+
$componentRegistrar = $this->createMock(ComponentRegistrarInterface::class);
32+
$componentRegistrar->expects($this->once())
33+
->method('getPaths')
34+
->willReturn(['Magento_Backend'=>'app/code/Magento/Backend']);
2935

30-
$dbValidator = $this->createMock(\Magento\Setup\Validator\DbValidator::class);
31-
$configGenerator = $this->createMock(\Magento\Setup\Model\ConfigGenerator::class);
36+
$dbValidator = $this->createMock(DbValidator::class);
37+
$configGenerator = $this->createMock(ConfigGenerator::class);
3238

3339
$setupOptions = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()
3440
->create(
@@ -39,7 +45,7 @@ public function testCollectOptionsLists()
3945
]
4046
);
4147

42-
$serviceLocator = $this->getMockForAbstractClass(\Laminas\ServiceManager\ServiceLocatorInterface::class);
48+
$serviceLocator = $this->getMockForAbstractClass(ServiceLocatorInterface::class);
4349

4450
$serviceLocator->expects($this->once())
4551
->method('get')
@@ -51,7 +57,7 @@ public function testCollectOptionsLists()
5157
\Magento\Setup\Model\ConfigOptionsListCollector::class,
5258
[
5359
'objectManagerProvider' => $this->objectManagerProvider,
54-
'fullModuleList' => $fullModuleListMock,
60+
'componentRegistrar' => $componentRegistrar,
5561
'serviceLocator' => $serviceLocator
5662
]
5763
);

0 commit comments

Comments
 (0)