Skip to content

Commit ef236db

Browse files
committed
MAGETWO-86549: Unusual behavior with the persistent shopping cart after the session is expired
- Added observer to pass customer data from persistent session to checkout session - Add automated test
1 parent 513f39d commit ef236db

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

app/code/Magento/Persistent/Observer/SetCheckoutSessionPersistentDataObserver.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ public function __construct(
6666
*
6767
* @param \Magento\Framework\Event\Observer $observer
6868
* @return void
69-
* @throws \Magento\Framework\Exception\NoSuchEntityException
70-
* @throws \Magento\Framework\Exception\LocalizedException
7169
*/
7270
public function execute(\Magento\Framework\Event\Observer $observer)
7371
{

app/code/Magento/Persistent/Test/Mftf/Test/StorefrontCheckShoppingCartBehaviorAfterSessionExpiredTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
3838
</after>
3939
<!--Login as a Customer-->
40-
<actionGroup ref="CustomerLoginOnStorefront" stepKey="signUpNewUser">
40+
<actionGroup ref="CustomerLoginOnStorefront" stepKey="loginToStorefrontAccount">
4141
<argument name="customer" value="$$createCustomer$$"/>
4242
</actionGroup>
4343
<!-- Add simple product to cart -->
44-
<actionGroup ref="AddSimpleProductToCart" stepKey="addProductToCart1">
44+
<actionGroup ref="AddSimpleProductToCart" stepKey="addProductToCart">
4545
<argument name="product" value="$$createProduct$$"/>
4646
</actionGroup>
4747
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="goToShoppingCartFromMinicart"/>

app/code/Magento/Persistent/Test/Unit/Observer/SetCheckoutSessionPersistentDataObserverTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ protected function setUp()
8888
* Test execute method when session is not persistent.
8989
*
9090
* @return void
91-
* @throws \Magento\Framework\Exception\LocalizedException
92-
* @throws \Magento\Framework\Exception\NoSuchEntityException
9391
*/
9492
public function testExecuteWhenSessionIsNotPersistent()
9593
{
@@ -113,8 +111,6 @@ public function testExecuteWhenSessionIsNotPersistent()
113111
* Test execute method when session is persistent.
114112
*
115113
* @return void
116-
* @throws \Magento\Framework\Exception\LocalizedException
117-
* @throws \Magento\Framework\Exception\NoSuchEntityException
118114
*/
119115
public function testExecute()
120116
{

0 commit comments

Comments
 (0)