Sha256: 301112b75658baa4fd51ae368ba5277bdb511f87e83072310017d44de873dec1

Contents?: true

Size: 1.12 KB

Versions: 3

Compression:

Stored size: 1.12 KB

Contents

describe "Searchable table spec" do
  tests TableScreenSearchable

  # Override controller to properly instantiate
  def controller
    @controller ||= TableScreenSearchable.new(nav_bar: true)
    @controller.on_load
    @controller.navigation_controller
  end

  it "should be rotated in portrait mode" do
    rotate_device to: :portrait, button: :bottom
    true.should == true
  end

  it "should show all 50 states" do
    @controller.tableView(@controller.tableView, numberOfRowsInSection:0).should == 50
  end

  it "should allow searching for all the 'New' states" do
    @controller.searchDisplayController(@controller, shouldReloadTableForSearchString:"New")
    @controller.tableView(@controller.tableView, numberOfRowsInSection:0).should == 4
  end

  it "should allow ending searches" do
    @controller.searchDisplayController(@controller, shouldReloadTableForSearchString:"North")
    @controller.tableView(@controller.tableView, numberOfRowsInSection:0).should == 2
    @controller.searchDisplayControllerWillEndSearch(@controller)
    @controller.tableView(@controller.tableView, numberOfRowsInSection:0).should == 50
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ProMotion-1.0.2 spec/functional/func_searchable_table_spec.rb
ProMotion-1.0.1 spec/functional/func_searchable_table_spec.rb
ProMotion-1.0.0 spec/functional/func_searchable_table_spec.rb