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

Commit e5a573a

Browse files
committed
Update tests for current schema mutation function
1 parent 840fbed commit e5a573a

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Bundle/AddBundleProductToCartTest.php

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function testAddBundleProductToCart()
8787
{
8888
data:{
8989
sku:"{$sku}"
90-
qty:1
90+
quantity:1
9191
}
9292
bundle_options:[
9393
{
@@ -102,10 +102,9 @@ public function testAddBundleProductToCart()
102102
]
103103
}) {
104104
cart {
105-
cart_id
106105
items {
107106
id
108-
qty
107+
quantity
109108
product {
110109
sku
111110
}
@@ -128,12 +127,11 @@ public function testAddBundleProductToCart()
128127
}
129128
QUERY;
130129

131-
$response = $this->graphQlQuery($query);
130+
$response = $this->graphQlMutation($query);
132131

133132
$this->assertArrayHasKey('addBundleProductsToCart', $response);
134133
$this->assertArrayHasKey('cart', $response['addBundleProductsToCart']);
135134
$cart = $response['addBundleProductsToCart']['cart'];
136-
$this->assertEquals($maskedQuoteId, $cart['cart_id']);
137135
$bundleItem = current($cart['items']);
138136
$this->assertEquals($sku, $bundleItem['product']['sku']);
139137
$bundleItemOption = current($bundleItem['bundle_options']);
@@ -170,7 +168,7 @@ public function testAddBundleToCartWithoutOptions()
170168
{
171169
data:{
172170
sku:"bundle-product"
173-
qty:1
171+
quantity:1
174172
}
175173
bundle_options:[
176174
{
@@ -185,12 +183,32 @@ public function testAddBundleToCartWithoutOptions()
185183
]
186184
}) {
187185
cart {
188-
cart_id
186+
items {
187+
id
188+
quantity
189+
product {
190+
sku
191+
}
192+
... on BundleCartItem {
193+
bundle_options {
194+
id
195+
label
196+
type
197+
values {
198+
id
199+
label
200+
price
201+
quantity
202+
}
203+
}
204+
}
205+
}
189206
}
190207
}
191208
}
192209
QUERY;
193210

194-
$this->graphQlQuery($query);
211+
$response = $this->graphQlMutation($query);
212+
$what = 'is happening';
195213
}
196214
}

0 commit comments

Comments
 (0)