Interaction testing with Rspec (Capybara actions) #1512
-
Hi all, I have followed the discussion thread on (Capybara testing)[https://github.com//discussions/497], and have previews enabled for test environments. I still get the error that click function is not included in the Simple Node. How do I access the Capybara actions? I would be up for ad ing an example to the Testing with Rspec documentation if I can get it working. Thanks in advance for any help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@Jackson200 ViewComponent unit tests do not run in a browser, so they do not support interactions like |
Beta Was this translation helpful? Give feedback.
Thanks for the reply. I'll give it a shot using a System test.
I had seen the
@page
test helperview_component/lib/view_component/test_helpers.rb
Lines 10 to 12 in 92a0f39
and wondering if a helper existed to use Capybara::Node::Actions.
I see now to just use
type: :system
. Thanks for the pointer :)