Skip to content

Commit f36f0fd

Browse files
committed
ACP2E-2520: Once Cart Become Virtual Cart after removing physical products it still returns shipping method and address in Cart Quote Graphql response
1 parent 2100cc7 commit f36f0fd

File tree

1 file changed

+2
-27
lines changed

1 file changed

+2
-27
lines changed

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

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ public function testGetShippingAddressForVirtualCart()
4949
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');
5050
$query = $this->getQuery($maskedQuoteId);
5151
$response = $this->graphQlQuery($query);
52-
$responce1= $this->graphQlQuery($query);
53-
echo json_encode($response);
54-
echo "\n";
55-
echo "\n";
56-
echo "\n";
57-
5852
$itemId = $this->getQuoteItemIdByReservedQuoteIdAndSku->execute('test_quote', 'simple_product');
5953

6054
$expectedShippingAddressData = [
@@ -78,42 +72,23 @@ public function testGetShippingAddressForVirtualCart()
7872
'__typename' => 'ShippingCartAddress',
7973
];
8074

81-
82-
8375
$this->assertArrayHasKey('cart', $response);
8476
$this->assertArrayHasKey('is_virtual', $response['cart']);
8577
$this->assertFalse($response['cart']['is_virtual']);
8678
$this->assertArrayHasKey('shipping_addresses', $response['cart']);
8779
$this->assertEquals($expectedShippingAddressData, current($response['cart']['shipping_addresses']));
8880

8981
$query2 = $this->getQueryForItemRemove($maskedQuoteId, $itemId);
90-
$response = $this->graphQlMutation($query2);
91-
92-
// $query = $this->getQuery($maskedQuoteId);
82+
$this->graphQlMutation($query2);
9383
$response = $this->graphQlQuery($query);
9484

95-
echo json_encode($response);
96-
echo "\n";
97-
echo "\n";
98-
echo "\n";
99-
echo '$maskedQuoteId = ' . $maskedQuoteId . "\n";
100-
101-
$expectedShippingAddressData = [];
102-
103-
$this->assertNotEquals($response, $responce1);
104-
10585
$this->assertArrayHasKey('cart', $response);
10686
$this->assertArrayHasKey('is_virtual', $response['cart']);
10787
$this->assertTrue($response['cart']['is_virtual']);
10888
$this->assertArrayHasKey('shipping_addresses', $response['cart']);
109-
$this->assertEquals($expectedShippingAddressData, current($response['cart']['shipping_addresses']));
110-
111-
112-
113-
89+
$this->assertFalse(current($response['cart']['shipping_addresses']));
11490
}
11591

116-
11792
/**
11893
* @param string $maskedQuoteId
11994
* @return string

0 commit comments

Comments
 (0)