Skip to content

Commit afb752e

Browse files
26117: "Current user does not have an active cart" even when he actually has one
1 parent 5a9fcab commit afb752e

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

app/code/Magento/QuoteGraphQl/Model/Cart/GetCartForUser.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ public function execute(string $cartHash, ?int $customerId, int $storeId): Quote
7272
}
7373

7474
if (false === (bool)$cart->getIsActive()) {
75-
throw new GraphQlNoSuchEntityException(
76-
__('Current user does not have an active cart.')
77-
);
75+
throw new GraphQlNoSuchEntityException(__('This cart isn\'t active.'));
7876
}
7977

8078
if ((int)$cart->getStoreId() !== $storeId) {

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/GetCartTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function testGetNonExistentCart()
162162
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/make_cart_inactive.php
163163
*
164164
* @expectedException Exception
165-
* @expectedExceptionMessage Current user does not have an active cart.
165+
* @expectedExceptionMessage This cart isn't active.
166166
*/
167167
public function testGetInactiveCart()
168168
{

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/MergeCartsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function testMergeGuestWithCustomerCart()
108108
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
109109
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
110110
* @expectedException \Exception
111-
* @expectedExceptionMessage Current user does not have an active cart.
111+
* @expectedExceptionMessage This cart isn't active.
112112
*/
113113
public function testGuestCartExpiryAfterMerge()
114114
{

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/GetCartTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public function testGetNonExistentCart()
119119
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/make_cart_inactive.php
120120
*
121121
* @expectedException Exception
122-
* @expectedExceptionMessage Current user does not have an active cart.
122+
* @expectedExceptionMessage This cart isn't active.
123123
*/
124124
public function testGetInactiveCart()
125125
{

0 commit comments

Comments
 (0)