I have a simple html.haml file that has a text_field_tag and a label_tag. I'm using jQuery to grab the text_field_tag value and set the label_tag with this value on_change. When I run the page locally it works perfect, I input text and 'Display text input' reflects it, but in my tests it fills up the text_field_tag but never clicks away therefore never triggering the on_change so this test always fails
it 'displays text in label_tag after input' do
@page.fill_in('textFieldTag', with: '420')
expect(@page).to have_content('420')
end
This screenshot was generated by Capybara during the test run
Am I right in believing that the reason this isn't working is because jQuery isn't recognizing the change since it looks like the cursor is still typing? Has anyone encountered this and found a work around?
A lot of the answers I've found involved sleeping or using wait_until but those haven't helped since I believe the on_change isn't registering since it thinks Capybara is still typing.

If you are using default driver, it does not support Javascript. https://github.com/teamcapybara/capybara#drivers
If your page has some interactions using javascript, you need to use another driver like Selenium Webdriver: https://rubygems.org/gems/selenium-webdriver/versions/4.14.0
I used this driver to test my page that adding dynamic inputs with StimulusJS and it works well.