Skip to content
This repository has been archived by the owner on Dec 19, 2019. It is now read-only.

Commit

Permalink
GraphQL-470: Creating/getting Cart queries should support Store context
Browse files Browse the repository at this point in the history
  • Loading branch information
naydav committed Apr 8, 2019
1 parent c4acbff commit 9a4ff36
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ public function testGetInactiveCart()
*/
public function testGetCartWithNotDefaultStore()
{
$maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId('test_order_1_not_default_store');
$query = $this->getCartQuery($maskedQuoteId);
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1_not_default_store');
$query = $this->getQuery($maskedQuoteId);

$headerMap = $this->getHeaderMap();
$headerMap['Store'] = 'fixture_second_store';
Expand All @@ -150,8 +150,8 @@ public function testGetCartWithNotDefaultStore()
*/
public function testGetCartWithWrongStore()
{
$maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId('test_order_1');
$query = $this->getCartQuery($maskedQuoteId);
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1');
$query = $this->getQuery($maskedQuoteId);

$headerMap = $this->getHeaderMap();
$headerMap['Store'] = 'fixture_second_store';
Expand All @@ -167,8 +167,8 @@ public function testGetCartWithWrongStore()
*/
public function testGetCartWithNotExistingStore()
{
$maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId('test_order_1_not_default_store');
$query = $this->getCartQuery($maskedQuoteId);
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1_not_default_store');
$query = $this->getQuery($maskedQuoteId);

$headerMap = $this->getHeaderMap();
$headerMap['Store'] = 'not_existing_store';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public function testGetInactiveCart()
*/
public function testGetCartWithNotDefaultStore()
{
$maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId('test_order_1_not_default_store_guest');
$query = $this->getCartQuery($maskedQuoteId);
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1_not_default_store_guest');
$query = $this->getQuery($maskedQuoteId);

$headerMap = ['Store' => 'fixture_second_store'];
$response = $this->graphQlQuery($query, [], '', $headerMap);
Expand All @@ -121,8 +121,8 @@ public function testGetCartWithNotDefaultStore()
*/
public function testGetCartWithWrongStore()
{
$maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId('test_order_1');
$query = $this->getCartQuery($maskedQuoteId);
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1');
$query = $this->getQuery($maskedQuoteId);

$headerMap = ['Store' => 'fixture_second_store'];
$this->graphQlQuery($query, [], '', $headerMap);
Expand All @@ -137,10 +137,10 @@ public function testGetCartWithWrongStore()
*/
public function testGetCartWithNotExistingStore()
{
$maskedQuoteId = $this->getMaskedQuoteIdByReversedQuoteId('test_order_1_not_default_store_guest');
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1_not_default_store_guest');

$headerMap['Store'] = 'not_existing_store';
$query = $this->getCartQuery($maskedQuoteId);
$query = $this->getQuery($maskedQuoteId);

$this->graphQlQuery($query, [], '', $headerMap);
}
Expand Down

0 comments on commit 9a4ff36

Please sign in to comment.