Sha256: 67dc2faf6e1c4fda087cb39bbbf74ba8f09ec50a3cbfde4b69d8d91398e2ded4
Contents?: true
Size: 990 Bytes
Versions: 2
Compression:
Stored size: 990 Bytes
Contents
require 'spec_helper' require 'druid/elements' describe Druid::Elements::TextField do describe "when mapping how to find an element" do it "should map watir types to same" do [:class, :id, :index, :name, :tag_name, :text, :css, :xpath, :title].each do |t| identifier = Druid::Elements::TextField.identifier_for t => 'value' expect(identifier.keys.first).to eql t end end end describe "interface" do let(:element) { double 'element' } let(:text_field) { Druid::Elements::TextField.new(element) } it "should set its' value" do expect(element).to receive(:set).with('test') text_field.value = 'test' end it "should register with type :text" do expect(Druid::Elements.element_class_for(:input, :text)).to be Druid::Elements::TextField end it "should register with type :password" do expect(Druid::Elements.element_class_for(:input, :password)).to be Druid::Elements::TextField end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
druid-ts-1.1.1 | spec/druid/elements/text_field_spec.rb |
druid-ts-1.1.0 | spec/druid/elements/text_field_spec.rb |