Commit c0f3b98
authored
fix:
# why
- this PR fixes an issue where `waitForDomNetworkQuiet()` does not
resolve
- this issue is caused by 2-3 underlying issues:
- the first issue is that `frame.waitForLoadState()` was not listening
for the correct lifecycle events from CDP. instead of listening for
`DOMContentLoaded`, it was listening for `domcontentloaded`
- the second issue is that `frame.waitForLoadState()` did not accept a
timeout parameter
- the third issue is that `waitForDomNetworkQuiet()` did not include the
call to `frame.waitForLoadState()` as part of the total time that it
waits for
# what changed
- added string normalization of incoming lifecycle events from CDP in
`frame.waitForLoadState()` (fixes the first issue)
- added a timeout parameter to `frame.waitForLoadState()`
- within `waitForDomNetworkQuiet()`, I included the call to
`frame.waitForLoadState()` as part of the total time that it waits for
# test plan
- existing unit tests & regression evals should be okwaitForDomNetworkQuiet() can hang forever (#1284)1 parent fa18cfd commit c0f3b98
File tree
3 files changed
+54
-8
lines changed- .changeset
- packages/core/lib/v3
- handlers/handlerUtils
- understudy
3 files changed
+54
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
531 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
532 | 535 | | |
| 536 | + | |
533 | 537 | | |
534 | 538 | | |
535 | 539 | | |
| |||
539 | 543 | | |
540 | 544 | | |
541 | 545 | | |
542 | | - | |
543 | | - | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
544 | 556 | | |
545 | 557 | | |
546 | 558 | | |
| |||
653 | 665 | | |
654 | 666 | | |
655 | 667 | | |
656 | | - | |
| 668 | + | |
657 | 669 | | |
658 | 670 | | |
659 | 671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
246 | 247 | | |
247 | 248 | | |
248 | | - | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
249 | 264 | | |
250 | | - | |
251 | | - | |
252 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
253 | 271 | | |
254 | 272 | | |
255 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
256 | 285 | | |
257 | 286 | | |
258 | 287 | | |
| |||
0 commit comments