I’m testing an XHR, and until I discovered :chained_replace_html , the
test wasn’t seeing that a was being hidden.
=== map_filter.rjs
22 page[‘map-filter-errors’].hide
Why does line 433 above fail?:
=== neighbourhoods_controller_spec.rb
432 do_xhr @xhr_params
433 assert_select_rjs :hide
=== The test’s output
No RJS statement that replaces or inserts HTML content.
But when I change the test to this, the test succeeds:
=== neighbourhoods_controller_spec.rb
432 do_xhr @xhr_params
433 assert_select_rjs :chained_replace_html
I’ve googled around, read the source for #assert_select_rjs , but
can’t figure out what :chained_replace_html is, means, when it should
be used, etc.
So, I have three questions:
- Why does passing :hide to #assert_select_rjs fail to see the RJS
change?
- What is :chained_replace_html ?
- When should :chained_replace_html be used?
Thanks!
Nick
=== map_filter.rjs
22 page[‘map-filter-errors’].hide
Why does line 433 above fail?:
=== neighbourhoods_controller_spec.rb
432 do_xhr @xhr_params
433 assert_select_rjs :hide
=== The test’s output
No RJS statement that replaces or inserts HTML content.
But when I change the test to this, the test succeeds:
=== neighbourhoods_controller_spec.rb
432 do_xhr @xhr_params
433 assert_select_rjs :chained_replace_html
I’ve googled around, read the source for #assert_select_rjs , but
can’t figure out what :chained_replace_html is, means, when it should
be used, etc.
So, I have three questions:
- Why does passing :hide to #assert_select_rjs fail to see the RJS
change? - What is :chained_replace_html ?
- When should :chained_replace_html be used?
Thanks!
Nick