Skip to content

Commit c061d5c

Browse files
committed
Merge remote-tracking branch 'origin/MC-32270' into honeycombined24
2 parents dbb7dec + 3abebcd commit c061d5c

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

app/code/Magento/Quote/i18n/en_US.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Subtotal,Subtotal
3131
"Cart %1 does not contain item %2","Cart %1 does not contain item %2"
3232
"Could not save quote","Could not save quote"
3333
"Cart %1 doesn't contain item %2","Cart %1 doesn't contain item %2"
34+
"The cart doesn't contain the item","The cart doesn't contain the item"
3435
"Could not remove item from quote","Could not remove item from quote"
3536
"The qty value is required to update quote item.","The qty value is required to update quote item."
3637
"Minimum order amount is %1","Minimum order amount is %1"

app/code/Magento/QuoteGraphQl/Model/Resolver/RemoveItemFromCart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
6565
try {
6666
$this->cartItemRepository->deleteById((int)$cart->getId(), $itemId);
6767
} catch (NoSuchEntityException $e) {
68-
throw new GraphQlNoSuchEntityException(__($e->getMessage()), $e);
68+
throw new GraphQlNoSuchEntityException(__('The cart doesn\'t contain the item'));
6969
} catch (LocalizedException $e) {
7070
throw new GraphQlInputException(__($e->getMessage()), $e);
7171
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function testRemoveNonExistentItem()
8484
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');
8585
$notExistentItemId = 999;
8686

87-
$this->expectExceptionMessage("Cart doesn't contain the {$notExistentItemId} item.");
87+
$this->expectExceptionMessage("The cart doesn't contain the item");
8888

8989
$query = $this->getQuery($maskedQuoteId, $notExistentItemId);
9090
$this->graphQlMutation($query, [], '', $this->getHeaderMap());
@@ -106,7 +106,7 @@ public function testRemoveItemIfItemIsNotBelongToCart()
106106
'virtual-product'
107107
);
108108

109-
$this->expectExceptionMessage("Cart doesn't contain the {$secondQuoteItemId} item.");
109+
$this->expectExceptionMessage("The cart doesn't contain the item");
110110

111111
$query = $this->getQuery($firstQuoteMaskedId, $secondQuoteItemId);
112112
$this->graphQlMutation($query, [], '', $this->getHeaderMap());

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function testRemoveNonExistentItem()
7474
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');
7575
$notExistentItemId = 999;
7676

77-
$this->expectExceptionMessage("Cart doesn't contain the {$notExistentItemId} item.");
77+
$this->expectExceptionMessage("The cart doesn't contain the item");
7878

7979
$query = $this->getQuery($maskedQuoteId, $notExistentItemId);
8080
$this->graphQlMutation($query);
@@ -95,7 +95,7 @@ public function testRemoveItemIfItemIsNotBelongToCart()
9595
'virtual-product'
9696
);
9797

98-
$this->expectExceptionMessage("Cart doesn't contain the {$secondQuoteItemId} item.");
98+
$this->expectExceptionMessage("The cart doesn't contain the item");
9999

100100
$query = $this->getQuery($firstQuoteMaskedId, $secondQuoteItemId);
101101
$this->graphQlMutation($query);

0 commit comments

Comments
 (0)