Repository navigation
Commit 4363d95
User
Fix flaky test_component_view_to_iframe_* tests
view_to_iframe renders the iframe with loading="lazy", so the browser only fetches the iframe's document once it is scrolled close to the viewport. These iframes sit well below the fold of the home page and the shared browser page is (usually) already sitting on /, so navigate_to_page performs no navigation and the page is never scrolled. Left alone, the browser can defer the iframe's document fetch long enough that the test's 30 second wait_for times out (observed intermittently on slow CI runners, e.g. test_component_view_to_iframe_sync_func on windows-latest).
Scrolling the container into view is the browser's documented trigger for a lazy load, so the document is fetched immediately and the test is not at the mercy of the browser's load-timing heuristics. A small shared helper applies this to each of the iframe component tests.
Co-authored-by: User <user@example.com>1 parent 4fd0434 commit 4363d95
1 file changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
185 | 202 | | |
186 | 203 | | |
| 204 | + | |
187 | 205 | | |
188 | 206 | | |
189 | 207 | | |
190 | 208 | | |
191 | 209 | | |
192 | 210 | | |
| 211 | + | |
193 | 212 | | |
194 | 213 | | |
195 | 214 | | |
196 | 215 | | |
197 | 216 | | |
198 | 217 | | |
| 218 | + | |
199 | 219 | | |
200 | 220 | | |
201 | 221 | | |
202 | 222 | | |
203 | 223 | | |
204 | 224 | | |
| 225 | + | |
205 | 226 | | |
206 | 227 | | |
207 | 228 | | |
208 | 229 | | |
209 | 230 | | |
210 | 231 | | |
| 232 | + | |
211 | 233 | | |
212 | 234 | | |
213 | 235 | | |
214 | 236 | | |
215 | 237 | | |
216 | 238 | | |
| 239 | + | |
217 | 240 | | |
218 | 241 | | |
219 | 242 | | |
| |||
0 commit comments