Sha256: c017397ec2f0029ca4acd381dbce51aaa3e3fdbe3ce9a4ee3509286b9dab2406

Contents?: true

Size: 609 Bytes

Versions: 5

Compression:

Stored size: 609 Bytes

Contents

require 'spec_helper'

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

  let(:page_object_klass) do
    Class.new(SitePrism::Page) do
      date_field :date_of_birth
    end
  end

  before do
    visit 'date'
  end

  it 'fills up all the tokens' do
    page_object.date_of_birth_field.set Date.new(1985, 2, 15)

    expect(page_object.date_of_birth_field.year_element.value).to eq '1985'
    expect(page_object.date_of_birth_field.month_element.value).to eq '2'
    expect(page_object.date_of_birth_field.day_element.value).to eq '15'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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