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

Commit 4328497

Browse files
committed
Adjusted API-functional tests for new limits
1 parent 6392294 commit 4328497

File tree

1 file changed

+121
-11
lines changed

1 file changed

+121
-11
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Framework/QueryComplexityLimiterTest.php

Lines changed: 121 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testQueryComplexityIsLimited()
2424
$query
2525
= <<<QUERY
2626
{
27-
category(id: 2) {
27+
category(id: 2) {
2828
products {
2929
items {
3030
name
@@ -52,9 +52,15 @@ public function testQueryComplexityIsLimited()
5252
new_from_date
5353
tier_price
5454
manufacturer
55-
thumbnail
55+
thumbnail {
56+
url
57+
label
58+
}
5659
sku
57-
image
60+
image {
61+
url
62+
label
63+
}
5864
canonical_url
5965
updated_at
6066
created_at
@@ -76,12 +82,18 @@ public function testQueryComplexityIsLimited()
7682
special_from_date
7783
special_to_date
7884
new_to_date
79-
thumbnail
85+
thumbnail {
86+
url
87+
label
88+
}
8089
new_from_date
8190
tier_price
8291
manufacturer
8392
sku
84-
image
93+
image {
94+
url
95+
label
96+
}
8597
canonical_url
8698
updated_at
8799
created_at
@@ -111,9 +123,15 @@ public function testQueryComplexityIsLimited()
111123
new_from_date
112124
tier_price
113125
manufacturer
114-
thumbnail
126+
thumbnail {
127+
url
128+
label
129+
}
115130
sku
116-
image
131+
image {
132+
url
133+
label
134+
}
117135
canonical_url
118136
updated_at
119137
created_at
@@ -139,7 +157,10 @@ public function testQueryComplexityIsLimited()
139157
tier_price
140158
manufacturer
141159
sku
142-
image
160+
image {
161+
url
162+
label
163+
}
143164
canonical_url
144165
updated_at
145166
created_at
@@ -160,13 +181,101 @@ public function testQueryComplexityIsLimited()
160181
name
161182
special_from_date
162183
special_to_date
184+
price {
185+
minimalPrice {
186+
amount {
187+
value
188+
currency
189+
}
190+
}
191+
maximalPrice {
192+
amount {
193+
value
194+
currency
195+
}
196+
}
197+
regularPrice {
198+
amount {
199+
value
200+
currency
201+
}
202+
}
203+
}
204+
tier_price
205+
special_price
206+
tier_prices {
207+
customer_group_id
208+
qty
209+
percentage_value
210+
website_id
211+
}
212+
tier_prices {
213+
customer_group_id
214+
qty
215+
percentage_value
216+
website_id
217+
}
218+
tier_prices {
219+
customer_group_id
220+
qty
221+
percentage_value
222+
website_id
223+
}
224+
tier_prices {
225+
customer_group_id
226+
qty
227+
percentage_value
228+
website_id
229+
}
230+
tier_prices {
231+
customer_group_id
232+
qty
233+
percentage_value
234+
website_id
235+
}
236+
tier_prices {
237+
customer_group_id
238+
qty
239+
percentage_value
240+
website_id
241+
}
242+
tier_prices {
243+
customer_group_id
244+
qty
245+
percentage_value
246+
website_id
247+
}
248+
tier_prices {
249+
customer_group_id
250+
qty
251+
percentage_value
252+
website_id
253+
}
254+
tier_prices {
255+
customer_group_id
256+
qty
257+
percentage_value
258+
website_id
259+
}
260+
tier_prices {
261+
customer_group_id
262+
qty
263+
percentage_value
264+
website_id
265+
}
163266
new_to_date
164267
new_from_date
165268
tier_price
166269
manufacturer
167270
sku
168-
image
169-
thumbnail
271+
image {
272+
url
273+
label
274+
}
275+
thumbnail {
276+
url
277+
label
278+
}
170279
canonical_url
171280
updated_at
172281
created_at
@@ -221,9 +330,10 @@ public function testQueryComplexityIsLimited()
221330
}
222331
}
223332
}
333+
224334
QUERY;
225335

226-
self::expectExceptionMessageRegExp('/Max query complexity should be 160 but got 169/');
336+
self::expectExceptionMessageRegExp('/Max query complexity should be 250 but got 252/');
227337
$this->graphQlQuery($query);
228338
}
229339

0 commit comments

Comments
 (0)