Skip to content

Commit 70bb245

Browse files
author
Prabhu Ram
committed
MC-22213: Implementation - Merge cart
- review fixes
1 parent 12de071 commit 70bb245

File tree

1 file changed

+3
-32
lines changed

1 file changed

+3
-32
lines changed

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

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -135,35 +135,6 @@ public function testGuestCartExpiryAfterMerge()
135135
);
136136
}
137137

138-
/**
139-
* @magentoApiDataFixture Magento/Customer/_files/customer.php
140-
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
141-
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
142-
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
143-
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/make_cart_inactive.php
144-
* @expectedException \Exception
145-
* @expectedExceptionMessage Current user does not have an active cart.
146-
*/
147-
public function testMergeTwoCustomerCarts()
148-
{
149-
$firstQuote = $this->quoteFactory->create();
150-
$this->quoteResource->load($firstQuote, 'test_quote', 'reserved_order_id');
151-
$firstMaskedId = $this->quoteIdToMaskedId->execute((int)$firstQuote->getId());
152-
153-
$createCartResponse = $this->graphQlMutation(
154-
$this->getCreateEmptyCartMutation(),
155-
[],
156-
'',
157-
$this->getHeaderMap()
158-
);
159-
self::assertArrayHasKey('createEmptyCart', $createCartResponse);
160-
$secondMaskedId = $createCartResponse['createEmptyCart'];
161-
$this->addSimpleProductToCart($secondMaskedId, $this->getHeaderMap());
162-
163-
$query = $this->getCartMergeMutation($firstMaskedId, $secondMaskedId);
164-
$this->graphQlMutation($query, [], '', $this->getHeaderMap());
165-
}
166-
167138
/**
168139
* @magentoApiDataFixture Magento/Customer/_files/two_customers.php
169140
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
@@ -172,12 +143,12 @@ public function testMergeTwoCustomerCarts()
172143
* @expectedException \Exception
173144
* @expectedExceptionMessage The current user cannot perform operations on cart
174145
*/
175-
public function testMergeOtherCustomerCart()
146+
public function testMergeTwoCustomerCarts()
176147
{
177148
$firstQuote = $this->quoteFactory->create();
178149
$this->quoteResource->load($firstQuote, 'test_quote', 'reserved_order_id');
179-
180150
$firstMaskedId = $this->quoteIdToMaskedId->execute((int)$firstQuote->getId());
151+
181152
$createCartResponse = $this->graphQlMutation(
182153
$this->getCreateEmptyCartMutation(),
183154
[],
@@ -186,7 +157,7 @@ public function testMergeOtherCustomerCart()
186157
);
187158
self::assertArrayHasKey('createEmptyCart', $createCartResponse);
188159
$secondMaskedId = $createCartResponse['createEmptyCart'];
189-
$this->addSimpleProductToCart($secondMaskedId, $this->getHeaderMap('customer_two@example.com'));
160+
$this->addSimpleProductToCart($secondMaskedId, $this->getHeaderMap());
190161

191162
$query = $this->getCartMergeMutation($firstMaskedId, $secondMaskedId);
192163
$this->graphQlMutation($query, [], '', $this->getHeaderMap());

0 commit comments

Comments
 (0)