spec/watirspec/elements/element_spec.rb in watir-7.1.0 vs spec/watirspec/elements/element_spec.rb in watir-7.2.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require 'watirspec_helper' describe 'Element' do before :each do @c = Selenium::WebDriver::Platform.mac? ? :command : :control @@ -202,11 +204,11 @@ end end describe '#focused?', except: {browser: :firefox, - remote: true, + driver: :remote_driver, reason: 'https://github.com/SeleniumHQ/selenium/issues/2555'} do it 'knows if the element is focused' do expect(browser.element(id: 'new_user_first_name')).to be_focused expect(browser.element(id: 'new_user_last_name')).to_not be_focused end @@ -403,9 +405,15 @@ it 'matches multiple with a negation' do e = browser.div(class: ['a', '!c', 'b']) expect(e).to exist expect(e.class_name).to eq 'a b' + end + + it 'matches with any whitespace' do + e = browser.div(class: %w[newline tabbed]) + expect(e).to exist + expect(e.class_name).to eq "first\nnewline\ttabbed last" end end end context 'attribute presence' do