Commit 4c1fb66
test: Fix _top/_parent navigation crashing WTR in CI
WTR runs tests inside an iframe. Clicking links with target="_top" or
target="_parent" targets the WTR runner frame (canIntercept=false), so
calling e.intercept() unconditionally throws and lets the navigation
escape — crashing the entire test session.
Fix by:
- Checking canIntercept before calling e.intercept() in test handlers
- Skipping _top/_parent tests (like _blank) since they can't be
meaningfully tested in an iframe context
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c77a900 commit 4c1fb66
1 file changed
+5
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
578 | | - | |
579 | 578 | | |
580 | 579 | | |
581 | 580 | | |
| 581 | + | |
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
| |||
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
618 | | - | |
619 | | - | |
620 | 618 | | |
621 | 619 | | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
627 | 623 | | |
628 | 624 | | |
629 | 625 | | |
| |||
649 | 645 | | |
650 | 646 | | |
651 | 647 | | |
652 | | - | |
653 | 648 | | |
654 | 649 | | |
655 | 650 | | |
| 651 | + | |
656 | 652 | | |
657 | 653 | | |
658 | 654 | | |
| |||
0 commit comments