Sha256: 075cb374676f3811fb75176e466f9748d0b1876bafab2c1312fa9e1eafa523f5

Contents?: true

Size: 723 Bytes

Versions: 17

Compression:

Stored size: 723 Bytes

Contents

require_relative '../unit_helper'

describe Watir::Locators::TextArea::SelectorBuilder do
  include LocatorSpecHelper

  let(:selector_builder) { described_class.new(attributes, query_scope) }

  describe '#build' do
    context 'Always returns value argument' do
      it 'String' do
        selector = {tag_name: 'textarea', value: 'Foo'}
        built = {xpath: ".//*[local-name()='textarea']", value: 'Foo'}

        expect(selector_builder.build(selector)).to eq built
      end

      it 'Regexp' do
        selector = {tag_name: 'textarea', value: /Foo/}
        built = {xpath: ".//*[local-name()='textarea']", value: /Foo/}

        expect(selector_builder.build(selector)).to eq built
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
watir-7.1.0 spec/unit/selector_builder/textarea_spec.rb
watir-7.0.0 spec/unit/selector_builder/textarea_spec.rb
watir-7.0.0.beta5 spec/unit/selector_builder/textarea_spec.rb
watir-7.0.0.beta4 spec/unit/selector_builder/textarea_spec.rb
watir-7.0.0.beta3 spec/unit/selector_builder/textarea_spec.rb
watir-7.0.0.beta2 spec/unit/selector_builder/textarea_spec.rb
watir-7.0.0.beta1 spec/unit/selector_builder/textarea_spec.rb
watir-6.19.1 spec/unit/selector_builder/textarea_spec.rb
watir-6.19.0 spec/unit/selector_builder/textarea_spec.rb
watir-6.18.0 spec/unit/selector_builder/textarea_spec.rb
watir-6.17.0 spec/unit/selector_builder/textarea_spec.rb
watir-6.16.5 spec/unit/selector_builder/textarea_spec.rb
watir-6.16.4 spec/unit/selector_builder/textarea_spec.rb
watir-6.16.3 spec/unit/selector_builder/textarea_spec.rb
watir-6.16.2 spec/unit/selector_builder/textarea_spec.rb
watir-6.16.1 spec/unit/selector_builder/textarea_spec.rb
watir-6.16.0 spec/unit/selector_builder/textarea_spec.rb