Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Capybara and Selenium-Webdriver. #65

Merged
merged 2 commits into from
Aug 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,16 @@ matrix:
services:
- mongodb

addons:
firefox: 54.0

before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- wget https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-linux64.tar.gz
- mkdir geckodriver
- tar -xzf geckodriver-v0.18.0-linux64.tar.gz -C geckodriver
- export PATH=$PATH:$PWD/geckodriver

script:
- bundle exec rake
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

#### 0.6.2 (Next)

* Your contribution here.
* [#60](https://github.com/slack-ruby/slack-ruby-bot-server/pull/60): Log caught Standard::Error backtrace at debug-level - [@alexagranov](https://github.com/alexagranov).
* [#65](https://github.com/slack-ruby/slack-ruby-bot-server/pull/65): Updated Capybara and selenium-webdriver - [@dblock](https://github.com/dblock).
* Your contribution here.

#### 0.6.1 (3/29/2017)

Expand Down
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ when 'mongoid' then
gem 'mongoid-scroll'
when 'activerecord' then
gem 'pg'
gem 'activerecord'
gem 'otr-activerecord'
gem 'activerecord', '~> 5.0.0'
gem 'otr-activerecord', '~> 1.2.1'
gem 'cursor_pagination'
when nil then
warn "Missing ENV['DATABASE_ADAPTER']."
Expand All @@ -34,8 +34,8 @@ group :development, :test do
gem 'faker'
gem 'database_cleaner'
gem 'hyperclient'
gem 'capybara'
gem 'selenium-webdriver', '~> 2.5'
gem 'capybara', '~> 2.15.1'
gem 'selenium-webdriver', '~> 3.4.4'
end

group :test do
Expand Down
4 changes: 2 additions & 2 deletions sample_apps/sample_app_activerecord/Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
source 'https://rubygems.org'

gem 'pg'
gem 'activerecord', require: 'active_record'
gem 'activerecord', '~> 5.0.0', require: 'active_record'
gem 'slack-ruby-bot-server', path: '../../'
gem 'newrelic-slack-ruby-bot'
gem 'rack-server-pages'
gem 'rack-test'
gem 'otr-activerecord'
gem 'otr-activerecord', '~> 1.2.1'

group :development, :test do
gem 'standalone_migrations'
Expand Down
12 changes: 6 additions & 6 deletions spec/api/cors_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@
context 'CORS' do
it 'supports options' do
options '/api', {},
'HTTP_ORIGIN' => 'http://cors.example.com',
'HTTP_ORIGIN' => '*',
'HTTP_ACCESS_CONTROL_REQUEST_HEADERS' => 'Origin, Accept, Content-Type',
'HTTP_ACCESS_CONTROL_REQUEST_METHOD' => 'GET'

expect(last_response.status).to eq 200
expect(last_response.headers['Access-Control-Allow-Origin']).to eq 'http://cors.example.com'
expect(last_response.headers['Access-Control-Allow-Origin']).to eq '*'
expect(last_response.headers['Access-Control-Expose-Headers']).to eq ''
end
it 'includes Access-Control-Allow-Origin in the response' do
get '/api', {}, 'HTTP_ORIGIN' => 'http://cors.example.com'
get '/api', {}, 'HTTP_ORIGIN' => '*'
expect(last_response.status).to eq 200
expect(last_response.headers['Access-Control-Allow-Origin']).to eq 'http://cors.example.com'
expect(last_response.headers['Access-Control-Allow-Origin']).to eq '*'
end
it 'includes Access-Control-Allow-Origin in errors' do
get '/api/invalid', {}, 'HTTP_ORIGIN' => 'http://cors.example.com'
get '/api/invalid', {}, 'HTTP_ORIGIN' => '*'
expect(last_response.status).to eq 404
expect(last_response.headers['Access-Control-Allow-Origin']).to eq 'http://cors.example.com'
expect(last_response.headers['Access-Control-Allow-Origin']).to eq '*'
end
end
end
5 changes: 0 additions & 5 deletions spec/api/endpoints/root_endpoint_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,4 @@
expect(last_response.status).to eq 302
expect(last_response.headers['Location']).to eq '/api/teams/'
end
it 'rewrites unencoded HAL links to make them clickable' do
get '/api/teams/%7B?cursor,size}'
expect(last_response.status).to eq 302
expect(last_response.headers['Location']).to eq '/api/teams/'
end
end
1 change: 1 addition & 0 deletions spec/support/capybara.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'capybara/rspec'

Capybara.configure do |config|
config.app = SlackRubyBotServer::Api::Middleware.instance
config.server_port = 9293
Expand Down