Skip to content

Commit

Permalink
GraphQL-295: [Place order] Place order mutation
Browse files Browse the repository at this point in the history
-- fixes after merge with mainline
  • Loading branch information
naydav committed Apr 12, 2019
1 parent 98e0f9b commit 1834026
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function testAddProductIfQuantityIsNotAvailable()
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1');

$query = $this->getQuery($maskedQuoteId, $sku, $qty);
$this->graphQlQuery($query);
$this->graphQlMutation($query);
}

/**
Expand All @@ -62,7 +62,7 @@ public function testAddMoreProductsThatAllowed()
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1');

$query = $this->getQuery($maskedQuoteId, $sku, $qty);
$this->graphQlQuery($query);
$this->graphQlMutation($query);
}

/**
Expand All @@ -78,7 +78,7 @@ public function testAddSimpleProductToCartWithNegativeQty()
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1');

$query = $this->getQuery($maskedQuoteId, $sku, $qty);
$this->graphQlQuery($query);
$this->graphQlMutation($query);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function testAddConfigurableProductToCart()
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1');

$query = $this->getQuery($maskedQuoteId, $variantSku, $qty);
$response = $this->graphQlQuery($query);
$response = $this->graphQlMutation($query);

$cartItems = $response['addConfigurableProductsToCart']['cart']['items'];
self::assertEquals($qty, $cartItems[0]['qty']);
Expand All @@ -61,7 +61,7 @@ public function testAddProductIfQuantityIsNotAvailable()
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1');

$query = $this->getQuery($maskedQuoteId, $variantSku, $qty);
$this->graphQlQuery($query);
$this->graphQlMutation($query);
}

/**
Expand All @@ -77,7 +77,7 @@ public function testAddOutOfStockProduct()
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1');

$query = $this->getQuery($maskedQuoteId, $variantSku, $qty);
$this->graphQlQuery($query);
$this->graphQlMutation($query);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function testAddSimpleProductWithOptions()
}
QUERY;

$response = $this->graphQlQuery($query);
$response = $this->graphQlMutation($query);

self::assertArrayHasKey('items', $response['addSimpleProductsToCart']['cart']);
self::assertCount(1, $response['addSimpleProductsToCart']['cart']);
Expand Down Expand Up @@ -148,7 +148,7 @@ public function testAddSimpleProductWithNoRequiredOptionsSet()
'The product\'s required option(s) weren\'t entered. Make sure the options are entered and try again.'
);

$this->graphQlQuery($query);
$this->graphQlMutation($query);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function testAddVirtualProductWithOptions()
}
QUERY;

$response = $this->graphQlQuery($query);
$response = $this->graphQlMutation($query);

self::assertArrayHasKey('items', $response['addVirtualProductsToCart']['cart']);
self::assertCount(1, $response['addVirtualProductsToCart']['cart']);
Expand Down Expand Up @@ -148,7 +148,7 @@ public function testAddVirtualProductWithNoRequiredOptionsSet()
'The product\'s required option(s) weren\'t entered. Make sure the options are entered and try again.'
);

$this->graphQlQuery($query);
$this->graphQlMutation($query);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function testSetDisabledPaymentOnCart()
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');

$query = $this->getQuery($maskedQuoteId, $methodCode);
$this->graphQlQuery($query, [], '', $this->getHeaderMap());
$this->graphQlMutation($query, [], '', $this->getHeaderMap());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ public function testSetShippingMethodOnAnEmptyCart()
$carrierCode,
$quoteAddressId
);
$this->graphQlQuery($query, [], '', $this->getHeaderMap());
$this->graphQlMutation($query, [], '', $this->getHeaderMap());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function testAddSimpleProductToCart()
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_order_1');

$query = $this->getQuery($maskedQuoteId, $sku, $qty);
$response = $this->graphQlQuery($query);
$response = $this->graphQlMutation($query);
self::assertArrayHasKey('cart', $response['addSimpleProductsToCart']);

self::assertEquals($qty, $response['addSimpleProductsToCart']['cart']['items'][0]['qty']);
Expand All @@ -61,7 +61,7 @@ public function testAddProductToNonExistentCart()
$maskedQuoteId = 'non_existent_masked_id';

$query = $this->getQuery($maskedQuoteId, $sku, $qty);
$this->graphQlQuery($query);
$this->graphQlMutation($query);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public function testSetDisabledPaymentOnCart()
$maskedQuoteId = $this->getMaskedQuoteIdByReservedOrderId->execute('test_quote');

$query = $this->getQuery($maskedQuoteId, $methodCode);
$this->graphQlQuery($query);
$this->graphQlMutation($query);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public function testSetShippingMethodOnAnEmptyCart()
$carrierCode,
$quoteAddressId
);
$this->graphQlQuery($query);
$this->graphQlMutation($query);
}

/**
Expand Down

0 comments on commit 1834026

Please sign in to comment.