Sha256: 7811b6f3d57fa2271bc4025fac61c43306fc3704111102a9364cde64a23d2326

Contents?: true

Size: 543 Bytes

Versions: 3

Compression:

Stored size: 543 Bytes

Contents

describe "Element#hidden?" do
  
  before(:all) do
    elem = Element.new :div, :id => "element_hidden_spec"
  
    elem.html = [
      "<div id='testing_hidden' style='display: none;'></div>",
      "<div id='testing_not_hidden'></div>"
    ].join("")
    
    Document.body << elem
  end
  
  it "should correctly identify elements that are hidden" do
    Document[:testing_hidden].hidden?.should == true
    Document[:testing_not_hidden].hidden?.should == false
  end
  
  after :all do
    Document[:element_hidden_spec].remove
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
opal-0.2.2 opals/opal/browser/spec/element/hidden_spec.rb
opal-0.2.0 opals/opal/browser/spec/element/hidden_spec.rb
opal-0.1.0 opals/browser/spec/element/hidden_spec.rb