Skip to content

Commit

Permalink
Merge branch 'release/0.50.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Haeffner committed Jul 16, 2016
2 parents 4bb4744 + 40f1730 commit 9658c27
Show file tree
Hide file tree
Showing 12 changed files with 144 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The Internet 0.49.5 (April, 11 2016)
# The Internet 0.50.0 (July, 16 2016)
=======

An example application that captures prominent and ugly functionality found on the web. Perfect for writing automated acceptance tests against.
Expand Down Expand Up @@ -27,6 +27,7 @@ Deployed and available at [http://the-internet.herokuapp.com](http://the-interne
+ [Form Authentication](http://the-internet.herokuapp.com/login)
+ [Frames](http://the-internet.herokuapp.com/frames)
+ [Geolocation](http://the-internet.herokuapp.com/geolocation)
+ [Horizontal Slider](http://the-internet.herokuapp.com/horizontal_slider)
+ [Hovers](http://the-internet.herokuapp.com/hovers)
+ [Infinite Scroll](http://the-internet.herokuapp.com/infinite_scroll)
+ [JQuery UI Menus](http://the-internet.herokuapp.com/jqueryui/menu)
Expand Down
2 changes: 1 addition & 1 deletion README.template
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The Internet 0.49.5 (April, 11 2016)
# The Internet 0.50.0 (July, 16 2016)
=======

An example application that captures prominent and ugly functionality found on the web. Perfect for writing automated acceptance tests against.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.49.5
0.50.0
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#0.50.0
+ Pulled in PR for Horizontal Slider (thanks [pittgoose](https://github.com/pittgoose)!)

#0.49.5
+ Removed missed dependency that was causing a production outage

Expand Down
1 change: 1 addition & 0 deletions examples.csv
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ Nested Frames,/nested_frames
Floating Menu,/floating_menu
Infinite Scroll,/infinite_scroll
Exit Intent,/exit_intent
Horizontal Slider,/horizontal_slider
6 changes: 6 additions & 0 deletions spec/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

gem 'selenium-webdriver', '~> 2.53.0'
gem 'eyes_selenium', '~> 2.28.0'
gem 'rspec', '~> 3.4.0'
gem 'rake', '~> 11.1.2'
51 changes: 51 additions & 0 deletions spec/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
GEM
remote: https://rubygems.org/
specs:
childprocess (0.5.9)
ffi (~> 1.0, >= 1.0.11)
chunky_png (1.3.5)
diff-lcs (1.2.5)
eyes_selenium (2.28.0)
faraday
oily_png (>= 1.2)
oj
selenium-webdriver (>= 2.45.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
ffi (1.9.10)
multipart-post (2.0.0)
oily_png (1.2.0)
chunky_png (~> 1.3.1)
oj (2.15.1)
rake (11.1.2)
rspec (3.4.0)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
rspec-mocks (~> 3.4.0)
rspec-core (3.4.4)
rspec-support (~> 3.4.0)
rspec-expectations (3.4.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-mocks (3.4.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
rubyzip (1.2.0)
selenium-webdriver (2.53.3)
childprocess (~> 0.5)
rubyzip (~> 1.0)
websocket (~> 1.0)
websocket (1.2.3)

PLATFORMS
ruby

DEPENDENCIES
eyes_selenium (~> 2.28.0)
rake (~> 11.1.2)
rspec (~> 3.4.0)
selenium-webdriver (~> 2.53.0)

BUNDLED WITH
1.11.2
25 changes: 25 additions & 0 deletions spec/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
require 'securerandom'

desc 'Run tests against each screen resolution we care about'
task :run, :environment do |t, args|
case args[:environment]
when 'localhost'
ENV['base_url'] = 'http://localhost:4567'
when 'production'
ENV['base_url'] = 'http://the-internet.herokuapp.com'
end
RESOLUTIONS = [ { width: '1274', height: '743' },
{ width: '1024', height: '768' },
{ width: '800', height: '600' },
{ width: '360', height: '640' } ]
threads = []
ENV['batch_id'] = SecureRandom.uuid
RESOLUTIONS.each do |resolution|
threads << Thread.new do
ENV['viewport_width'] = resolution[:width]
ENV['viewport_height'] = resolution[:height]
system("rspec walkthrough_spec.rb")
end
end
threads.each { |thread| thread.join }
end
9 changes: 9 additions & 0 deletions spec/lib/batch_info.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'applitools/base/batch_info'

module Applitools::Base
class BatchInfo
def set_id(id)
@id = id
end
end
end
34 changes: 34 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
require 'selenium-webdriver'
require 'eyes_selenium'
require_relative 'lib/batch_info'

RSpec.configure do |config|

config.before(:all) do
Thread.current[:batch] = Applitools::Base::BatchInfo.new('Walkthrough')
Thread.current[:batch].set_id(ENV['batch_id'])
end

config.before(:each) do |example|
@browser = Selenium::WebDriver.for :firefox
@eyes = Applitools::Eyes.new
@eyes.api_key = ENV['APPLITOOLS_API_KEY']
@eyes.batch = Thread.current[:batch]
@driver = @eyes.open(
app_name: 'the-internet',
test_name: example.metadata[:full_description],
viewport_size: { width: ENV['viewport_width'].to_i,
height: ENV['viewport_height'].to_i },
driver: @browser)
end

config.after(:each) do
begin
@eyes.close
ensure
@eyes.abort_if_not_closed
@browser.quit
end
end

end
10 changes: 10 additions & 0 deletions spec/walkthrough_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
require_relative 'spec_helper'

describe 'Walkthrough' do

it 'Homepage' do
@driver.get ENV['base_url']
@eyes.check_window('/')
end

end
1 change: 1 addition & 0 deletions views/examples.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<li><a href='/login'>Form Authentication</a></li>
<li><a href='/frames'>Frames</a></li>
<li><a href='/geolocation'>Geolocation</a></li>
<li><a href='/horizontal_slider'>Horizontal Slider</a></li>
<li><a href='/hovers'>Hovers</a></li>
<li><a href='/infinite_scroll'>Infinite Scroll</a></li>
<li><a href='/jqueryui/menu'>JQuery UI Menus</a></li>
Expand Down

0 comments on commit 9658c27

Please sign in to comment.