Sha256: d6b288ea556a88ef48872ae092ee01b5dd5c644880ce948f5fe348b68f0044b8

Contents?: true

Size: 754 Bytes

Versions: 1

Compression:

Stored size: 754 Bytes

Contents

# frozen_string_literal: true

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

1 entries across 1 versions & 1 rubygems

Version Path
watir-7.2.0 spec/unit/selector_builder/textarea_spec.rb