spec/watirspec/elements/dl_spec.rb in watir-7.0.0.beta1 vs spec/watirspec/elements/dl_spec.rb in watir-7.0.0.beta2
- old
+ new
@@ -53,14 +53,13 @@
describe '#text' do
it 'returns the text of the element' do
expect(browser.dl(id: 'experience-list').text).to include('11 years')
end
- bug 'Safari does not strip text', :safari do
- it 'returns an empty string if the element exists but contains no text' do
- expect(browser.dl(id: 'noop').text).to eq ''
- end
+ it 'returns an empty string if the element exists but contains no text',
+ except: {browser: :safari, reason: 'Safari does not strip text'} do
+ expect(browser.dl(id: 'noop').text).to eq ''
end
it 'raises UnknownObjectException if the element does not exist' do
expect { browser.dl(id: 'no_such_id').text }.to raise_unknown_object_exception
expect { browser.dl(title: 'no_such_title').text }.to raise_unknown_object_exception
@@ -96,17 +95,10 @@
end
describe '#html' do
it 'returns the HTML of the element' do
html = browser.dl(id: 'experience-list').html.downcase
- not_compliant_on :internet_explorer do
- expect(html).to include('<dt class="current-industry">')
- end
-
- deviates_on :internet_explorer do
- expect(html).to include('<dt class=current-industry>')
- end
-
+ expect(html).to match(/<dt class=?"current-industry?">/)
expect(html).to_not include('</body>')
end
end
describe '#to_hash' do