Closed kayo-campos closed 2 years ago
I'm not familiar with System Test. Puffing-billy is implemented as a browser proxy so it should work as long as the driver supports adding proxy configuration. You can use the Billy proxy directly in your driver config using Billy.proxy.host
and Billy.proxy.port
and see if it works.
I'm working on another feature on the code that does not need puffing-billy to be tested, but as soon as I get time I'll try to setup System Test to work with puffing-billy and give an update to this issue. Thanks a lot!
It didn't work for me as system test, only with feature
tests. I ended up creating a custom example group to set all the specifics for puffing_billy though.
# spec/support/example_groups/puffing_billy_example_group.rb
module PuffingBillyExampleGroup
extend ActiveSupport::Concern
RSpec.configure do |config|
config.include self, type: :puffing_billy
config.include Capybara::DSL, type: :puffing_billy
config.include Capybara::RSpecMatchers, type: :puffing_billy
#other config specifics
end
end
and then
RSpec.describe 'Custom test', type: :puffing_billy do
# things
end
im running into he same issue, has anyone got this to work?
Stale issue, closing. Feel free to reopen if this is still desired.
I'm new to testing stuff with Rails and I had to mock some browser requisitions (such as images), then I found puffing-billy but couldn't find how to set it up with System Test in the docs. Does it work with System Test?