Sha256: 1dbaf51d1a61e5277a3caf24c3e02c88c6e7a5a0b92246134856c30990827155

Contents?: true

Size: 1.01 KB

Versions: 14

Compression:

Stored size: 1.01 KB

Contents

require 'spec_helper'

describe Uia::Patterns::Table do
  Given(:data_grid) do
    until (form = Uia.find_element(name: 'DataEntryForm'))
      Uia.find_element(id: /MainForm/).find(name: 'Data Entry Form').as(:invoke).invoke
    end

    form.find(name: 'Add Many').as(:invoke).invoke
    form.find(id: 'personListView').as(:table)
  end

  context 'properties' do
    Then { data_grid.row_count == 52 }
    Then { data_grid.column_count == 3 }
  end

  context '#headers' do
    Then { data_grid.headers.map(&:control_type) == [:header_item] * 3 }
    Then { data_grid.headers.map(&:name) == ['Full Name', 'Date of birth', 'State'] }
  end

  context '#rows' do
    Then { data_grid.rows.count == data_grid.row_count }

    context 'row' do
      Given(:row) { data_grid.rows[0] }

      context '#items' do
        Then { row.items.map(&:name) == ['John Doe', '12/15/1967', 'FL'] }
      end
    end
  end

  context '#row_at' do
    Then { data_grid.row_at(1).items[1].name == '3/4/1975'}
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
uia-1.0 spec/uia/patterns/table_spec.rb
uia-0.8 spec/uia/patterns/table_spec.rb
uia-0.7 spec/uia/patterns/table_spec.rb
uia-0.7.alpha.1 spec/uia/patterns/table_spec.rb
uia-0.6 spec/uia/patterns/table_spec.rb
uia-0.5 spec/uia/patterns/table_spec.rb
uia-0.4.4 spec/uia/patterns/table_spec.rb
uia-0.4.3 spec/uia/patterns/table_spec.rb
uia-0.4.2 spec/uia/patterns/table_spec.rb
uia-0.4.1 spec/uia/patterns/table_spec.rb
uia-0.4 spec/uia/patterns/table_spec.rb
uia-0.3.3 spec/uia/patterns/table_spec.rb
uia-0.3.2 spec/uia/patterns/table_spec.rb
uia-0.3.1 spec/uia/patterns/table_spec.rb