Commit 16a0fa1
committed
fix(test): use response interception for wrong-password test reliability
Replace unreliable waitForLoadState('networkidle') with explicit
waitForResponse() in the "should reject change with wrong current
password" test. Since the form uses fetch() (AJAX), networkidle can
resolve before the DOM is updated from the response, causing the
#globalMessage visibility check to fail intermittently.
The new approach:
- Intercepts the server response to /user/updatePassword
- Asserts the server correctly returns success=false
- Waits for the #globalMessage div to become visible1 parent c016718 commit 16a0fa1
1 file changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | | - | |
97 | 101 | | |
98 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
99 | 113 | | |
100 | 114 | | |
101 | 115 | | |
| |||
0 commit comments