File tree Expand file tree Collapse file tree 1 file changed +54
-54
lines changed
lib/internal/Magento/Framework/GraphQl/Test/Unit/Query Expand file tree Collapse file tree 1 file changed +54
-54
lines changed Original file line number Diff line number Diff line change @@ -26,31 +26,31 @@ public function setQueryDataProvider()
2626 return [
2727 'mutation without variables ' => [
2828 'query ' => ['query ' => 'mutation {
29- addProductsToCart(
30- cartId: "8k0Q4MpH2IGahWrTRtqM61YV2MtLPApz "
31- cartItems: [
32- {
33- quantity: 1
34- sku: "24-MB04 "
35- }
36- ]
37- ) {
38- cart {
39- items {
40- product {
41- name
42- sku
43- }
44- quantity
45- }
46- }
47- user_errors {
48- code
49- message
50- }
51- }
52- }
53- ' ],
29+ addProductsToCart(
30+ cartId: "123 "
31+ cartItems: [
32+ {
33+ quantity: 1
34+ sku: "sku1 "
35+ }
36+ ]
37+ ) {
38+ cart {
39+ items {
40+ product {
41+ name
42+ sku
43+ }
44+ quantity
45+ }
46+ }
47+ user_errors {
48+ code
49+ message
50+ }
51+ }
52+ }
53+ ' ],
5454 'variables ' => [],
5555 'expected ' => [
5656 'addProductsToCart ' => 'addProductsToCart ' ,
@@ -69,35 +69,35 @@ public function setQueryDataProvider()
6969 ],
7070 'mutation with variables ' => [
7171 'query ' => ['query ' => 'mutation ($cartId: String!, $products: [CartItemInput!]!) {
72- addProductsToCart(cartId: $cartId, cartItems: $products) {
73- cart {
74- id
75- items {
76- uid
77- quantity
78- product {
79- sku
80- name
81- thumbnail {
82- url
83- __typename
84- }
85- __typename
86- }
87- prices {
88- price {
89- value
90- currency
91- }
92- }
93- }
94- }
95- user_errors {
96- code
97- message
98- }
99- }
100- } ' ],
72+ addProductsToCart(cartId: $cartId, cartItems: $products) {
73+ cart {
74+ id
75+ items {
76+ uid
77+ quantity
78+ product {
79+ sku
80+ name
81+ thumbnail {
82+ url
83+ __typename
84+ }
85+ __typename
86+ }
87+ prices {
88+ price {
89+ value
90+ currency
91+ }
92+ }
93+ }
94+ }
95+ user_errors {
96+ code
97+ message
98+ }
99+ }
100+ } ' ],
101101 'variables ' => [
102102 'cartId ' => '123 ' ,
103103 'products ' => [
You can’t perform that action at this time.
0 commit comments