Commit 27612aa
committed
Fix bug where a GET triggered by a test, is processed after the test
Sporadically, I was noticing the GET below happening during the teardown
of the test:
"/api/tenants?filter[]=name=&expand=resources"
It turns out we have a form validation for the name field that gets a list of
tenant names on form load to prevent the user from providing a duplicate name.
For the edit tenant form, we ALSO have an API tenant data request that occurs BEFORE
the tenant form loads. Because of this, we need to wait on the single form
validation API request for the add form and for the edit form, we need to wait
for the load API request first, then, the same validation API request.
This should fix the following issue that was happening sporadically locally and
in CI:
```
Validate Child Tenant operations: Add, Edit, Add Project, Manage Quotas
Validate Add child tenant function
✖(Attempt 1 of 10) Validate Add child tenant form elements
✖(Attempt 2 of 10) Validate Add child tenant form elements
✖(Attempt 3 of 10) Validate Add child tenant form elements
✖(Attempt 4 of 10) Validate Add child tenant form elements
✖(Attempt 5 of 10) Validate Add child tenant form elements
✖(Attempt 6 of 10) Validate Add child tenant form elements
✖(Attempt 7 of 10) Validate Add child tenant form elements
✖(Attempt 8 of 10) Validate Add child tenant form elements
✖(Attempt 9 of 10) Validate Add child tenant form elements
✖(Attempt 10 of 10) "before each" hook for "Validate Add child tenant form elements"
✖ "before each" hook for "Validate Add child tenant form elements" (30358ms)
6 passing (4m)
1 failing
1) Automate Tenant form operations: Settings > Application Settings > Access Control > Tenants
Validate Child Tenant operations: Add, Edit, Add Project, Manage Quotas
Validate Add child tenant function
"before each" hook for "Validate Add child tenant form elements":
CypressError: `cy.visit()` failed trying to load:
http://localhost:3000/
We attempted to make an http request to this URL but the request failed without a response.
We received this error at the network level:
> Error: ESOCKETTIMEDOUT
```1 parent c09cd18 commit 27612aa
1 file changed
+33
-8
lines changedLines changed: 33 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
71 | 96 | | |
72 | 97 | | |
73 | 98 | | |
| |||
162 | 187 | | |
163 | 188 | | |
164 | 189 | | |
165 | | - | |
| 190 | + | |
166 | 191 | | |
167 | 192 | | |
168 | 193 | | |
| |||
186 | 211 | | |
187 | 212 | | |
188 | 213 | | |
189 | | - | |
| 214 | + | |
190 | 215 | | |
191 | 216 | | |
192 | 217 | | |
| |||
229 | 254 | | |
230 | 255 | | |
231 | 256 | | |
232 | | - | |
| 257 | + | |
233 | 258 | | |
234 | 259 | | |
235 | 260 | | |
| |||
275 | 300 | | |
276 | 301 | | |
277 | 302 | | |
278 | | - | |
| 303 | + | |
279 | 304 | | |
280 | 305 | | |
281 | 306 | | |
| |||
347 | 372 | | |
348 | 373 | | |
349 | 374 | | |
350 | | - | |
| 375 | + | |
351 | 376 | | |
352 | 377 | | |
353 | 378 | | |
| |||
364 | 389 | | |
365 | 390 | | |
366 | 391 | | |
367 | | - | |
| 392 | + | |
368 | 393 | | |
369 | 394 | | |
370 | 395 | | |
| |||
387 | 412 | | |
388 | 413 | | |
389 | 414 | | |
390 | | - | |
| 415 | + | |
391 | 416 | | |
392 | 417 | | |
393 | 418 | | |
| |||
401 | 426 | | |
402 | 427 | | |
403 | 428 | | |
404 | | - | |
| 429 | + | |
405 | 430 | | |
406 | 431 | | |
407 | 432 | | |
| |||
0 commit comments