mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
Merge pull request #1030 from twalpole/capybara_latest
Updates for latest Capybara
This commit is contained in:
commit
da13973bae
15 changed files with 98 additions and 82 deletions
10
.travis.yml
10
.travis.yml
|
@ -3,8 +3,8 @@ dist: trusty
|
|||
language: ruby
|
||||
rvm:
|
||||
- 1.9.3
|
||||
- 2.1
|
||||
- 2.2
|
||||
- 2.4
|
||||
- jruby-19mode
|
||||
notifications:
|
||||
email: false
|
||||
|
@ -25,18 +25,14 @@ addons:
|
|||
matrix:
|
||||
include:
|
||||
- rvm: 1.9.3
|
||||
gemfile: gemfiles/2.7.gemfile
|
||||
env: QMAKE=/usr/lib/x86_64-linux-gnu/qt4/bin/qmake
|
||||
- rvm: 1.9.3
|
||||
gemfile: gemfiles/2.13.gemfile
|
||||
gemfile: gemfiles/2.15.gemfile
|
||||
env: QMAKE=/usr/lib/x86_64-linux-gnu/qt4/bin/qmake
|
||||
- rvm: 2.3.3
|
||||
gemfile: gemfiles/master.gemfile
|
||||
allow_failures:
|
||||
- gemfile: gemfiles/master.gemfile
|
||||
gemfile:
|
||||
- gemfiles/2.7.gemfile
|
||||
- gemfiles/2.13.gemfile
|
||||
- gemfiles/2.15.gemfile
|
||||
before_install:
|
||||
- gem install bundler
|
||||
install: bundle
|
||||
|
|
11
Appraisals
11
Appraisals
|
@ -1,12 +1,5 @@
|
|||
appraise "2.7" do
|
||||
gem "capybara", "~> 2.7.0"
|
||||
gem "rspec", "~> 2.14.0"
|
||||
gem 'addressable', '< 2.5.0', :platforms=>[:ruby_19, :jruby_19] # 2.5 requires public_suffix which requires ruby 2.0
|
||||
gem 'nokogiri', '< 1.7.0', :platforms=>[:ruby_19, :jruby_19] # 1.7.0 requires ruby 2.1+
|
||||
end
|
||||
|
||||
appraise "2.13" do
|
||||
gem "capybara", "~> 2.13.0"
|
||||
appraise "2.15" do
|
||||
gem "capybara", "~> 2.15.0"
|
||||
gem 'addressable', '< 2.5.0', :platforms=>[:ruby_19, :jruby_19] # 2.5 requires public_suffix which requires ruby 2.0
|
||||
gem 'nokogiri', '< 1.7.0', :platforms=>[:ruby_19, :jruby_19] # 1.7.0 requires ruby 2.1+
|
||||
end
|
||||
|
|
79
Gemfile.lock
79
Gemfile.lock
|
@ -2,20 +2,21 @@ PATH
|
|||
remote: .
|
||||
specs:
|
||||
capybara-webkit (1.14.0)
|
||||
capybara (>= 2.3.0, < 2.14.0)
|
||||
capybara (~> 2.3)
|
||||
json
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.5.1)
|
||||
public_suffix (~> 2.0, >= 2.0.2)
|
||||
appraisal (0.4.1)
|
||||
addressable (2.5.2)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
appraisal (2.2.0)
|
||||
bundler
|
||||
rake
|
||||
capybara (2.13.0)
|
||||
thor (>= 0.14.0)
|
||||
capybara (2.15.4)
|
||||
addressable
|
||||
mime-types (>= 1.16)
|
||||
mini_mime (>= 0.1.3)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-test (>= 0.5.4)
|
||||
|
@ -30,41 +31,45 @@ GEM
|
|||
addressable (~> 2.3)
|
||||
spoon (~> 0.0.1)
|
||||
mime-types (2.99.3)
|
||||
mini_magick (4.7.0)
|
||||
mini_portile (0.6.2)
|
||||
nokogiri (1.6.6.4)
|
||||
mini_portile (~> 0.6.0)
|
||||
nokogiri (1.6.6.4-java)
|
||||
nokogiri (1.6.6.4-x86-mingw32)
|
||||
mini_portile (~> 0.6.0)
|
||||
public_suffix (2.0.5)
|
||||
rack (1.6.5)
|
||||
rack-protection (1.5.3)
|
||||
mini_magick (4.8.0)
|
||||
mini_mime (0.1.4)
|
||||
mini_portile2 (2.3.0)
|
||||
mustermann (1.0.1)
|
||||
nokogiri (1.8.1)
|
||||
mini_portile2 (~> 2.3.0)
|
||||
nokogiri (1.8.1-java)
|
||||
nokogiri (1.8.1-x86-mingw32)
|
||||
mini_portile2 (~> 2.3.0)
|
||||
public_suffix (3.0.0)
|
||||
rack (2.0.3)
|
||||
rack-protection (2.0.0)
|
||||
rack
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
rack-test (0.7.0)
|
||||
rack (>= 1.0, < 3)
|
||||
rake (11.3.0)
|
||||
rspec (3.5.0)
|
||||
rspec-core (~> 3.5.0)
|
||||
rspec-expectations (~> 3.5.0)
|
||||
rspec-mocks (~> 3.5.0)
|
||||
rspec-core (3.5.4)
|
||||
rspec-support (~> 3.5.0)
|
||||
rspec-expectations (3.5.0)
|
||||
rspec (3.7.0)
|
||||
rspec-core (~> 3.7.0)
|
||||
rspec-expectations (~> 3.7.0)
|
||||
rspec-mocks (~> 3.7.0)
|
||||
rspec-core (3.7.0)
|
||||
rspec-support (~> 3.7.0)
|
||||
rspec-expectations (3.7.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.5.0)
|
||||
rspec-mocks (3.5.0)
|
||||
rspec-support (~> 3.7.0)
|
||||
rspec-mocks (3.7.0)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.5.0)
|
||||
rspec-support (3.5.0)
|
||||
sinatra (1.4.8)
|
||||
rack (~> 1.5)
|
||||
rack-protection (~> 1.4)
|
||||
tilt (>= 1.3, < 3)
|
||||
rspec-support (~> 3.7.0)
|
||||
rspec-support (3.7.0)
|
||||
sinatra (2.0.0)
|
||||
mustermann (~> 1.0)
|
||||
rack (~> 2.0)
|
||||
rack-protection (= 2.0.0)
|
||||
tilt (~> 2.0)
|
||||
spoon (0.0.6)
|
||||
ffi
|
||||
tilt (2.0.7)
|
||||
xpath (2.0.0)
|
||||
thor (0.20.0)
|
||||
tilt (2.0.8)
|
||||
xpath (2.1.0)
|
||||
nokogiri (~> 1.3)
|
||||
|
||||
PLATFORMS
|
||||
|
@ -73,7 +78,7 @@ PLATFORMS
|
|||
x86-mingw32
|
||||
|
||||
DEPENDENCIES
|
||||
appraisal (~> 0.4.0)
|
||||
appraisal
|
||||
capybara-webkit!
|
||||
json (< 2.0)
|
||||
launchy
|
||||
|
@ -84,4 +89,4 @@ DEPENDENCIES
|
|||
sinatra
|
||||
|
||||
BUNDLED WITH
|
||||
1.14.6
|
||||
1.15.4
|
||||
|
|
|
@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|||
|
||||
s.requirements << "Qt >= 4.8"
|
||||
|
||||
s.add_runtime_dependency("capybara", ">= 2.3.0", "< 2.15.0")
|
||||
s.add_runtime_dependency("capybara", "~>2.3")
|
||||
s.add_runtime_dependency("json")
|
||||
|
||||
s.add_development_dependency("rspec", "~> 3.5")
|
||||
|
@ -29,7 +29,7 @@ Gem::Specification.new do |s|
|
|||
s.add_development_dependency("sinatra")
|
||||
s.add_development_dependency("mini_magick")
|
||||
s.add_development_dependency("rake", "< 12.0.0")
|
||||
s.add_development_dependency("appraisal", "~> 0.4.0")
|
||||
s.add_development_dependency("appraisal")
|
||||
s.add_development_dependency("launchy")
|
||||
end
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
# This file was generated by Appraisal
|
||||
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "mime-types", "< 3.0", :platforms=>[:ruby_19, :jruby_19]
|
||||
gem "json", "< 2.0", :platforms=>[:ruby_19, :jruby_19]
|
||||
gem "capybara", "~> 2.13.0"
|
||||
gem "addressable", "< 2.5.0", :platforms=>[:ruby_19, :jruby_19]
|
||||
gem "nokogiri", "< 1.7.0", :platforms=>[:ruby_19, :jruby_19]
|
||||
|
||||
gemspec :path=>"../"
|
11
gemfiles/2.15.gemfile
Normal file
11
gemfiles/2.15.gemfile
Normal file
|
@ -0,0 +1,11 @@
|
|||
# This file was generated by Appraisal
|
||||
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "mime-types", "< 3.0", platforms: [:ruby_19, :jruby_19]
|
||||
gem "json", "< 2.0", platforms: [:ruby_19, :jruby_19]
|
||||
gem "capybara", "~> 2.15.0"
|
||||
gem "addressable", "< 2.5.0", platforms: [:ruby_19, :jruby_19]
|
||||
gem "nokogiri", "< 1.7.0", platforms: [:ruby_19, :jruby_19]
|
||||
|
||||
gemspec path: "../"
|
|
@ -1,12 +0,0 @@
|
|||
# This file was generated by Appraisal
|
||||
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "mime-types", "< 3.0", :platforms=>[:ruby_19, :jruby_19]
|
||||
gem "json", "< 2.0", :platforms=>[:ruby_19, :jruby_19]
|
||||
gem "capybara", "~> 2.7.0"
|
||||
gem "rspec", "~> 2.14.0"
|
||||
gem "addressable", "< 2.5.0", :platforms=>[:ruby_19, :jruby_19]
|
||||
gem "nokogiri", "< 1.7.0", :platforms=>[:ruby_19, :jruby_19]
|
||||
|
||||
gemspec :path=>"../"
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "mime-types", "< 3.0", :platforms=>[:ruby_19, :jruby_19]
|
||||
gem "json", "< 2.0", :platforms=>[:ruby_19, :jruby_19]
|
||||
gem "capybara", :github=>"jnicklas/capybara"
|
||||
gem "mime-types", "< 3.0", platforms: [:ruby_19, :jruby_19]
|
||||
gem "json", "< 2.0", platforms: [:ruby_19, :jruby_19]
|
||||
gem "capybara", github: "jnicklas/capybara"
|
||||
|
||||
gemspec :path=>"../"
|
||||
gemspec path: "../"
|
||||
|
|
|
@ -289,6 +289,10 @@ https://github.com/thoughtbot/capybara-webkit/wiki/Reporting-Crashes
|
|||
command("GoForward")
|
||||
end
|
||||
|
||||
def refresh
|
||||
command("Refresh")
|
||||
end
|
||||
|
||||
def allow_url(url)
|
||||
command("AllowUrl", url)
|
||||
end
|
||||
|
|
|
@ -241,6 +241,10 @@ module Capybara::Webkit
|
|||
@browser.go_forward
|
||||
end
|
||||
|
||||
def refresh
|
||||
@browser.refresh
|
||||
end
|
||||
|
||||
def accept_modal(type, options={})
|
||||
options = modal_action_options_for_browser(options)
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "WindowMaximize.h"
|
||||
#include "GoBack.h"
|
||||
#include "GoForward.h"
|
||||
#include "Refresh.h"
|
||||
#include "AcceptAlert.h"
|
||||
#include "FindModal.h"
|
||||
#include "SetUnknownUrlMode.h"
|
||||
|
|
12
src/Refresh.cpp
Normal file
12
src/Refresh.cpp
Normal file
|
@ -0,0 +1,12 @@
|
|||
#include "Refresh.h"
|
||||
#include "SocketCommand.h"
|
||||
#include "WebPage.h"
|
||||
#include "WebPageManager.h"
|
||||
|
||||
Refresh::Refresh(WebPageManager *manager, QStringList &arguments, QObject *parent) : SocketCommand(manager, arguments, parent) {
|
||||
}
|
||||
|
||||
void Refresh::start() {
|
||||
page()->triggerAction(QWebPage::Reload);
|
||||
finish(true);
|
||||
}
|
10
src/Refresh.h
Normal file
10
src/Refresh.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#include "SocketCommand.h"
|
||||
|
||||
class Refresh : public SocketCommand {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Refresh(WebPageManager *, QStringList &arguments, QObject *parent = 0);
|
||||
virtual void start();
|
||||
};
|
||||
|
|
@ -48,6 +48,7 @@ CHECK_COMMAND(WindowSize)
|
|||
CHECK_COMMAND(WindowMaximize)
|
||||
CHECK_COMMAND(GoBack)
|
||||
CHECK_COMMAND(GoForward)
|
||||
CHECK_COMMAND(Refresh)
|
||||
CHECK_COMMAND(AcceptAlert)
|
||||
CHECK_COMMAND(FindModal)
|
||||
CHECK_COMMAND(SetUnknownUrlMode)
|
||||
|
|
|
@ -17,6 +17,7 @@ HEADERS = \
|
|||
AcceptAlert.h \
|
||||
GoForward.h \
|
||||
GoBack.h \
|
||||
Refresh.h \
|
||||
WindowMaximize.h \
|
||||
WindowSize.h \
|
||||
WindowCommand.h \
|
||||
|
@ -100,6 +101,7 @@ SOURCES = \
|
|||
AcceptAlert.cpp \
|
||||
GoForward.cpp \
|
||||
GoBack.cpp \
|
||||
Refresh.cpp \
|
||||
WindowMaximize.cpp \
|
||||
WindowSize.cpp \
|
||||
WindowCommand.cpp \
|
||||
|
|
Loading…
Add table
Reference in a new issue