calebhearth / formulaic

Simplify form filling with Capybara
MIT License
552 stars 29 forks source link

Instructions for Capybara Test Helpers #75

Closed ElMassimo closed 2 years ago

ElMassimo commented 3 years ago

Hi there!

I wanted to ask if you would be willing to accept a pull request to add instructions on how to setup formulaic when using Capybara Test Helpers.

It would be a quick snippet:

# test_helpers/base_test_helper.rb
class BaseTestHelper < Capybara::TestHelper
  include Formulaic::Dsl
end

or alternatively delegating the needed methods:

# test_helpers/base_test_helper.rb
class BaseTestHelper < Capybara::TestHelper
  delegate_to_test_context(:fill_form, :input, :submit, :fill_form_and_submit)
end

Cheers!

calebhearth commented 3 years ago

Sure, if it’s confusing we can document it.

On November 27, 2020, GitHub notifications@github.com wrote:

Hi there!

I wanted to ask if you would be willing to accept a pull request to add instructions on how to setup formulaic when using Capybara Test Helpers https://capybara-test-helpers.netlify.app/.

It would be a quick snippet:

test_helpers/base_test_helper.rb class BaseTestHelper <

Capybara::TestHelper include Formulaic::Dsl end or alternatively delegating the needed methods:

test_helpers/base_test_helper.rb class BaseTestHelper <

Capybara::TestHelper delegate_to_test_context(:fill_form, :input, :submit, :fill_form_and_submit) end Cheers!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/thoughtbot/formulaic/issues/75, or unsubscribe https://github.com/notifications/unsubscribe- auth/AAFNYJJ4FY4PU4DESYS6LETSSAHTFANCNFSM4UFJUNMQ.

ElMassimo commented 2 years ago

Closed by #76