Sha256: 7ddcb8d32ed38c27a4b06e66667e6fc2a38d046918d10ef7d9a1451488271e25
Contents?: true
Size: 910 Bytes
Versions: 7
Compression:
Stored size: 910 Bytes
Contents
require "spec_helper" RSpec.describe "Element display methods" do html <<-HTML <div id="shown"></div> <div id="hidden" style="display: none"></div> HTML it "hides an element" do element = Element.find('#shown') element.css('display').should == 'block' element.hide element.css('display').should == 'none' end it "shows an element" do element = Element.find('#hidden') element.css('display').should == 'none' element.show element.css('display').should == 'block' end it "toggles on a hidden element" do element = Element.find('#hidden') element.css('display').should == 'none' element.toggle element.css('display').should == 'block' end it "toggles off a displayed element" do element = Element.find('#shown') element.css('display').should == 'block' element.toggle element.css('display').should == 'none' end end
Version data entries
7 entries across 7 versions & 1 rubygems