This patch adds assert_select_rjs support for replace/replace_html when a page is rendered with chained selector calls. Before you COULD NOT make the following assert_select calls given the page[id] calls:
render_rjs do |page|
page["test1"].replace "<div id=\"1\">foo</div>"
page["test2"].replace_html "<div id=\"2\">foo</div>"
end
# Replace.
assert_select_rjs :replace
assert_select_rjs :replace, "test1"
# Replace HTML.
assert_select_rjs :replace_html
assert_select_rjs :replace_html, "test2"
You can work around this by using :chained_replace and :chained_replace_html selector calls but this is unintuitive and pointless for the developer. "replace" and "replace_html" should work regardless of if the developer calls "page[id]" or "page id".