Sha256: 2d1fa0d4255acf098c0f7cc7bc3641d6b6acb736b6d29f5242e3e9e80b4448dc

Contents?: true

Size: 572 Bytes

Versions: 5

Compression:

Stored size: 572 Bytes

Contents

require 'spec_helper'

describe 'Given a SitePrism page object with a select field' do
  let(:page_object) { page_object_klass.new }

  let(:page_object_klass) do
    Class.new(SitePrism::Page) do
      field :type
    end
  end

  before do
    visit 'select'
  end

  it '.set selects options by value' do
    page_object.type_field.set 'public'
    expect(page_object.type_field.value).to eq 'public'
  end

  it '.set selects options by label' do
    page_object.type_field.set 'Public: fluff blargh'
    expect(page_object.type_field.value).to eq 'public'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tedium-0.0.5 spec/features/select_options_by_value_spec.rb
tedium-0.0.4 spec/features/select_options_by_value_spec.rb
tedium-0.0.3 spec/features/select_options_by_value_spec.rb
tedium-0.0.2 spec/features/select_options_by_value_spec.rb
tedium-0.0.1 spec/features/select_options_by_value_spec.rb