DOM does not update in test env and capybara is treating incoming HTML as a page

I’m having an issue with Rspec tests after replacing existing old JS method of rendering with turbo frame. It’s working in development mode but existing tests are failing.

After clicking on a link that’s button_to , capybara is receiving the response of the server ant treats it as it’s a separate page and does not instead just update the DOM with the HTML that has been received from the server

Anyone had any similar experiences?

P.s. it’s rails 6 app that I’m working on upgrading to newer technologies such as Turbo