capybara-webkit

How to test a Select2 element with capybara DSL?

元气小坏坏 提交于 2019-11-27 15:50:03
问题 I have a Select2 element on a page that loads results via ajax. Would like to test this with capybara/rspec (using the poltergeist driver), but since the Select2 element actually starts out as a hidden field, and then populates a <ul> once results are processed, none of the normal select , fill_in or choose helpers will work. What I have now is something like it "should have a search field for events" do click_link "Select an Event" # this works as expected within('.select2-container') do #

Can I use homebrew's qt5 with capybara-webkit?

為{幸葍}努か 提交于 2019-11-27 13:43:26
问题 I want to use qt5's QtWebKit with capybara-webkit . brew uninstall qt Uninstalling /usr/local/Cellar/qt/4.8.4... brew install qt5 This formula is keg-only: so it was not symlinked into /usr/local. 🍺 /usr/local/Cellar/qt5/5.0.2: 3103 files, 140M, built in 60.9 minutes If I force brew to create the symlinks for qt5 I can build the native extension for capybara-webkit .. brew link --force qt5 Linking /usr/local/Cellar/qt5/5.0.2... 122 symlinks created gem install capybara-webkit -v '1.0.0'

Why does adding “sleep 1” in an after hook cause this Rspec/Capybara test to pass?

时光怂恿深爱的人放手 提交于 2019-11-27 09:42:28
I'm using rails 4.0.5, rspec 2.14.1, capybara 2.2.1, capybara-webkit 1.1.0 and database_cleaner 1.2.0. I'm seeing some weird behavior with the following feature test (which simulates a user viewing a comment on a post, hovering over an icon to make a menu appear, and clicking a menu item to delete the comment): let(:user){create(:user)} let(:post){create(:post, author: user)} let!(:comment){create(:comment, post: post, author: user)} ... it "can delete a comment" do assert(page.has_css? "#comment-#{comment.id}") find("#comment-#{comment.id}-controls").trigger(:mouseover) find("#comment-#

ERROR: Error installing capybara-webkit:

时光怂恿深爱的人放手 提交于 2019-11-27 09:20:14
问题 Any suggestions on how to fix? gem install capybara-webkit -v '0.11.0' Building native extensions. This could take a while... ERROR: Error installing capybara-webkit: ERROR: Failed to build gem native extension. /home/durrantm/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb sh: qmake: not found Gem files will remain installed in /home/durrantm/.rvm/gems/ruby-1.9.3-p194/gems/capybara-webkit-0.11.0 for inspection. Results logged to /home/durrantm/.rvm/gems/ruby-1.9.3-p194/gems/capybara-webkit-0