Commit 4062365
Wait for DOM selector to exist before interacting with it
The streaming test for 'React Router Sixth Page' was failing with:
Unable to find css "#ServerComponentRouter-react-component-0"
The issue was that 'within(dom_selector)' was being called before the
selector actually existed in the DOM. For streaming renders, the element
may not appear immediately even with increased wait time.
Fix: Add explicit wait for the CSS selector to exist before trying to
interact with it using within(). This ensures Capybara waits for the
streamed content to fully render before attempting to find child elements.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 6ba7660 commit 4062365
File tree
1 file changed
+3
-0
lines changed- react_on_rails_pro/spec/dummy/spec/system
1 file changed
+3
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
0 commit comments