Sha256: 1d15501637765bd84d05dfa4f135e071083468f6f7322932d781ac2bde0f3750

Contents?: true

Size: 1.3 KB

Versions: 52

Compression:

Stored size: 1.3 KB

Contents

# frozen_string_literal: true

require 'spec_helper'
require 'selenium-webdriver'

require 'sauce_whisk'
# require 'shared_selenium_session'
# require 'shared_selenium_node'
# require 'rspec/shared_spec_matchers'

Capybara.register_driver :sauce_chrome do |app|
  options = {
    selenium_version: '3.141.59',
    platform: 'macOS 10.12',
    browser_name: 'chrome',
    version: '65.0',
    name: 'Capybara test',
    build: ENV['TRAVIS_REPO_SLUG'] || "Ruby-RSpec-Selenium: Local-#{Time.now.to_i}",
    username: ENV['SAUCE_USERNAME'],
    access_key: ENV['SAUCE_ACCESS_KEY']
  }

  options.delete(:browser_name)

  capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(options)
  url = 'https://ondemand.saucelabs.com:443/wd/hub'

  Capybara::Selenium::Driver.new(app,
                                 browser: :remote, url: url,
                                 desired_capabilities: capabilities,
                                 options: Selenium::WebDriver::Chrome::Options.new(args: ['']))
end

CHROME_REMOTE_DRIVER = :sauce_chrome

module TestSessions
  Chrome = Capybara::Session.new(CHROME_REMOTE_DRIVER, TestApp)
end

skipped_tests = %i[response_headers status_code trigger download]

Capybara::SpecHelper.run_specs TestSessions::Chrome, CHROME_REMOTE_DRIVER.to_s, capybara_skip: skipped_tests do |example|
end

Version data entries

52 entries across 39 versions & 4 rubygems

Version Path
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/capybara-3.36.0/spec/sauce_spec_chrome.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/capybara-3.36.0/spec/sauce_spec_chrome.rb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/capybara-3.36.0/spec/sauce_spec_chrome.rb
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/capybara-3.35.3/spec/sauce_spec_chrome.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/capybara-3.36.0/spec/sauce_spec_chrome.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/capybara-3.36.0/spec/sauce_spec_chrome.rb
capybara-3.36.0 spec/sauce_spec_chrome.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/capybara-3.35.3/spec/sauce_spec_chrome.rb
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/capybara-3.35.3/spec/sauce_spec_chrome.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/capybara-3.35.3/spec/sauce_spec_chrome.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/capybara-3.34.0/spec/sauce_spec_chrome.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/capybara-3.35.3/spec/sauce_spec_chrome.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/capybara-3.35.3/spec/sauce_spec_chrome.rb
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/capybara-3.35.3/spec/sauce_spec_chrome.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/capybara-3.34.0/spec/sauce_spec_chrome.rb
tdiary-5.1.5 vendor/bundle/ruby/2.7.0/gems/capybara-3.35.3/spec/sauce_spec_chrome.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/capybara-3.34.0/spec/sauce_spec_chrome.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/capybara-3.34.0/spec/sauce_spec_chrome.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/capybara-3.35.3/spec/sauce_spec_chrome.rb
capybara-3.35.3 spec/sauce_spec_chrome.rb