1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
teamcapybara--capybara/spec/selenium_spec_ie.rb
2018-03-31 14:26:01 -07:00

31 lines
1 KiB
Ruby

# frozen_string_literal: true
require 'spec_helper'
require "selenium-webdriver"
require 'shared_selenium_session'
require 'rspec/shared_spec_matchers'
Capybara.register_driver :selenium_ie do |app|
# ::Selenium::WebDriver.logger.level = "debug"
Capybara::Selenium::Driver.new(
app,
browser: :ie,
desired_capabilities: ::Selenium::WebDriver::Remote::Capabilities.ie('requireWindowFocus': true)
)
end
module TestSessions
SeleniumIE = Capybara::Session.new(:selenium_ie, TestApp)
end
skipped_tests = %i[response_headers status_code trigger modals form_attribute]
$stdout.puts `#{Selenium::WebDriver::IE.driver_path} --version` if ENV['CI']
Capybara::SpecHelper.run_specs TestSessions::SeleniumIE, "selenium", capybara_skip: skipped_tests
RSpec.describe "Capybara::Session with Internet Explorer", capybara_skip: skipped_tests do
include Capybara::SpecHelper
include_examples "Capybara::Session", TestSessions::SeleniumIE, :selenium_ie
include_examples Capybara::RSpecMatchers, TestSessions::SeleniumIE, :selenium_ie
end