Skip to content

Commit 510b6b3

Browse files
committed
Fixed tests with Firefox 35.1 and grape-swagger 0.7.2 + grape 0.9.0.
1 parent 28aa5af commit 510b6b3

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ rvm:
1414
env:
1515
- GRAPE_SWAGGER_VERSION=0.7.2
1616
- GRAPE_SWAGGER_VERSION=0.8.0
17+
- GRAPE_SWAGGER_VERSION=0.9.0
1718
- GRAPE_SWAGGER_VERSION=HEAD
1819

1920
matrix:

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ gemspec
55
case version = ENV['GRAPE_SWAGGER_VERSION'] || '~> 0.9.0'
66
when 'HEAD'
77
gem 'grape-swagger', github: 'tim-vandecasteele/grape-swagger'
8+
when '0.7.2'
9+
gem 'grape', '0.9.0'
10+
gem 'grape-swagger', '0.7.2'
811
else
912
gem 'grape-swagger', version
1013
end

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ Or install it yourself as:
2020

2121
$ gem install grape-swagger-rails
2222

23+
## Compatibility
24+
25+
GrapeSwaggerRails is compatible with the following versions of grape and grape-swagger.
26+
27+
grape | grape-swagger
28+
---------------------
29+
0.9.0 | 0.7.2
30+
2331
## Usage
2432

2533
Add this line to `./config/routes.rb`:

spec/features/swagger_spec.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
visit '/swagger'
3838
end
3939
it 'adds an Authorization header' do
40-
fill_in 'apiKey', with: 'username:password'
40+
page.execute_script("$('#input_apiKey').val('username:password')")
41+
page.execute_script("$('#input_apiKey').trigger('change')")
4142
find('#endpointListTogger_headers', visible: true).click
4243
first('a[href="#!/headers/GET_api_headers_format"]', visible: true).click
4344
click_button 'Try it out!'
@@ -53,7 +54,8 @@
5354
visit '/swagger'
5455
end
5556
it 'adds an Authorization header' do
56-
fill_in 'apiKey', with: 'token'
57+
page.execute_script("$('#input_apiKey').val('token')")
58+
page.execute_script("$('#input_apiKey').trigger('change')")
5759
find('#endpointListTogger_headers', visible: true).click
5860
first('a[href="#!/headers/GET_api_headers_format"]', visible: true).click
5961
click_button 'Try it out!'
@@ -68,7 +70,8 @@
6870
visit '/swagger'
6971
end
7072
it 'adds an api_token query parameter' do
71-
fill_in 'apiKey', with: 'dummy'
73+
page.execute_script("$('#input_apiKey').val('dummy')")
74+
page.execute_script("$('#input_apiKey').trigger('change')")
7275
find('#endpointListTogger_params', visible: true).click
7376
first('a[href="#!/params/GET_api_params_format"]', visible: true).click
7477
click_button 'Try it out!'

0 commit comments

Comments
 (0)