Capybara webkit does not pass parameters from angular

I am trying to port the selenium test suite to capybara-webkit. The Rails application has an angular application built into rails views and does not behave as expected using webkit.

The test is this:

spec_helper required

feature 'Editing company profiles' do
  before do
    @user = create(:employee)
    @company = Company.find(@user.employer.id)
    sign_in_as! @user
  end

  scenario 'successfully', js: true do
    click_link 'Dashboard'
    click_link @company.name
    click_button 'Edit'
    fill_in 'company_name', with: 'new name'
    click_button 'Save'

    expect(page).to have_content "Your company profile has been updated!"
  end
end

Will pass without problems in selenium, but with webkitI get an error

 Failure/Error: Unable to find matching line from backtrace
 ActionController::ParameterMissing:
   param is missing or the value is empty: company
 # ./app/controllers/api/v1/companies_controller.rb:23:in `company_params'
 # ./app/controllers/api/v1/companies_controller.rb:10:in `update'

, , - , angular , , . capybara-angular, . capybara, , PATCH webkit, ? poltergeist.

- rspec angular + ? , , ?

+4
1

, , , capybara -webkit gem .

, PATCH ( ), .

PUT POST, . , , , .

. , PATCH, ( ) http - , http . . rubyonrails.org .

+8

Source: https://habr.com/ru/post/1570231/


All Articles