Commit 1b8e964
Fix console replay test to handle multiple script tags
When multiple React components with replay_console are rendered on the same page,
each creates its own <script id="consoleReplayLog"> tag. Nokogiri's .text method
concatenates text from all matching elements without separators, causing console
log statements to be joined without newlines.
Fixed by explicitly mapping over all script tags and joining their text with
newlines before parsing.
This fix avoids adding runtime complexity or requiring users to call new helper
methods. The existing behavior (multiple script tags per component) is preserved.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 345f8f3 commit 1b8e964
File tree
1 file changed
+6
-2
lines changed- react_on_rails_pro/spec/dummy/spec/requests
1 file changed
+6
-2
lines changedLines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
0 commit comments