Sha256: 4b294ed356daa442a397a7712ddb17884af0fe9ffc6eef149698e7232f3a1961
Contents?: true
Size: 1022 Bytes
Versions: 9
Compression:
Stored size: 1022 Bytes
Contents
require 'spec_helper' require 'druid/elements' describe Druid::Elements::RadioButton 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::RadioButton.identifier_for t => 'value' expect(identifier.keys.first).to eql t end end end describe "interface" do let(:element) { double("element") } let(:driver) { double("driver") } let(:radio) { Druid::Elements::RadioButton.new(element)} it "should select" do expect(element).to receive(:set) radio.select end it "should clear" do expect(element).to receive(:clear) radio.clear end it "should know if it is selected" do expect(element).to receive(:set?) radio.selected? end it "should register as type :radio" do expect(Druid::Elements.element_class_for(:input, :radio)).to be Druid::Elements::RadioButton end end end
Version data entries
9 entries across 9 versions & 1 rubygems