Sha256: 29f3d10c5e0c4ce4f072a6a5744ce332ae349cde1c4d6df66ea56ebecd8bbfb9

Contents?: true

Size: 553 Bytes

Versions: 3

Compression:

Stored size: 553 Bytes

Contents

describe "Element#visible?" do
  
  before(:all) do
    elem = Element.new :div, :id => "element_visible_spec"
  
    elem.html = [
      "<div id='testing_visible'></div>",
      "<div id='testing_not_visible' style='display: none;'></div>"
    ].join("")
    
    Document.body << elem
  end
  
  it "should correctly identify elements that are visible" do
    Document[:testing_visible].visible?.should == true
    Document[:testing_not_visible].visible?.should == false
  end
  
  after :all do
    Document[:element_visible_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/visible_spec.rb
opal-0.2.0 opals/opal/browser/spec/element/visible_spec.rb
opal-0.1.0 opals/browser/spec/element/visible_spec.rb