* allow youtube_spec to be excluded by build server
This commit is contained in:
parent
03e8b1e036
commit
7c70a36d80
|
|
@ -2,7 +2,7 @@ require 'spec_helper'
|
|||
require 'google_client'
|
||||
require 'rest_client'
|
||||
|
||||
describe "YouTube", :slow=>true, :js=>true, :type => :feature, :capybara_feature => true do
|
||||
describe "YouTube", :slow=>true, :js=>true, :type => :feature, :capybara_feature => true, dev_env_only: true do
|
||||
subject { page }
|
||||
|
||||
# Authenticate with a test google account. This should create
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ RecordedTrack.observers.disable :all # only a few tests want this observer activ
|
|||
require "test/unit"
|
||||
Test::Unit::AutoRunner.need_auto_run = false
|
||||
|
||||
IS_BUILD_SERVER = !ENV['BUILD_SERVER'].nil?
|
||||
|
||||
# a way to kill tests if they aren't running. capybara is hanging intermittently, I think
|
||||
tests_started = false
|
||||
|
||||
|
|
@ -175,6 +177,8 @@ bputs "before register capybara"
|
|||
config.filter_run_excluding slow: true unless ENV['RUN_SLOW_TESTS'] == "1" || ENV['SLOW'] == "1" || ENV['ALL_TESTS'] == "1"
|
||||
config.filter_run_excluding aws: true unless ENV['RUN_AWS_TESTS'] == "1" || ENV['AWS'] == "1" || ENV['ALL_TESTS'] == "1"
|
||||
|
||||
config.filter_run_excluding dev_env_only: true if IS_BUILD_SERVER
|
||||
|
||||
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
||||
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ def authorize_google_user(youtube_client, user, google_password)
|
|||
end
|
||||
|
||||
url = youtube_client.get_login_url(user.email)
|
||||
puts("Login URL: #{url}")
|
||||
#puts("Login URL: #{url}")
|
||||
visit url
|
||||
sleep(1)
|
||||
|
||||
|
|
@ -103,6 +103,7 @@ def authorize_google_user(youtube_client, user, google_password)
|
|||
|
||||
# Wait for submit to enable and then click it:
|
||||
sleep(5)
|
||||
save_screenshot("about_to_submit.png")
|
||||
find('#submit_approve_access').trigger(:click)
|
||||
sleep(5)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue