Sha256: 6785d8ed069ae18b39754e1aa2ae7f55945197a2210d5f42cf6cf444d98282b6
Contents?: true
Size: 993 Bytes
Versions: 12
Compression:
Stored size: 993 Bytes
Contents
require 'spec_helper' require 'druid/elements' describe Druid::Elements::CheckBox do describe "when mapping how to find an element" do it "should map watir types to same" do [:class, :id, :index, :name, :xpath, :value].each do |t| identifier = Druid::Elements::CheckBox.identifier_for t => 'value' expect(identifier.keys.first).to eql t end end end describe "interface" do let(:element) { double 'element' } let(:checkbox) { Druid::Elements::CheckBox.new(element) } it "should check" do expect(element).to receive(:set) checkbox.check end it "should uncheck" do expect(element).to receive(:clear) checkbox.uncheck end it "should know if it is checked" do expect(element).to receive(:set?) checkbox.checked? end it "should register with type :checkbox" do expect(Druid::Elements.element_class_for(:input, :checkbox)).to be Druid::Elements::CheckBox end end end
Version data entries
12 entries across 12 versions & 1 rubygems