spec/watirspec/elements/checkbox_spec.rb in watir-6.14.0 vs spec/watirspec/elements/checkbox_spec.rb in watir-6.15.0

- old
+ new

@@ -9,10 +9,12 @@ describe '#exists?' do it 'returns true if the checkbox button exists' do expect(browser.checkbox(id: 'new_user_interests_books')).to exist expect(browser.checkbox(id: /new_user_interests_books/)).to exist + expect(browser.checkbox(label: 'Cars')).to exist + expect(browser.checkbox(label: /Cars/)).to exist expect(browser.checkbox(name: 'new_user_interests')).to exist expect(browser.checkbox(name: /new_user_interests/)).to exist expect(browser.checkbox(value: 'books')).to exist expect(browser.checkbox(value: /books/)).to exist # not sure what :text is supposed to represent here @@ -68,24 +70,9 @@ expect { browser.checkbox(id: 3.14).exists? }.to raise_error(TypeError) end end # Attribute methods - - describe '#class_name' do - it 'returns the class name if the checkbox exists and has an attribute' do - expect(browser.checkbox(id: 'new_user_interests_dancing').class_name).to eq 'fun' - end - - it "returns an empty string if the checkbox exists and the attribute doesn't" do - expect(browser.checkbox(id: 'new_user_interests_books').class_name).to eq '' - end - - it "raises UnknownObjectException if the checkbox doesn't exist" do - expect { browser.checkbox(id: 'no_such_id').class_name }.to raise_unknown_object_exception - end - end - describe '#id' do it 'returns the id attribute if the checkbox exists and has an attribute' do expect(browser.checkbox(index: 0).id).to eq 'new_user_interests_books' end