Testing vue-select with Capybara
I recently wrote some feature tests with Rspec and Capybara for a Rails application that made use of the vue-select component. This needs to be done with a js driver such as headless-chrome activated. This method worked for me:
scenario 'prefill from book', js: true do visit x_path page.find('div.dropdown').click page.find('ul.dropdown-menu li a', text: item.title).click click_button "Submit" expect(page).to have_text('something expected') end
I am available for Ruby on Rails and Vue consulting work – get in touch to learn more!