Sha256: 2ee37a56b01be8627d502f2794cbc1bdc15a0d696da56adb42eee9fc50ff6e28

Contents?: true

Size: 1.65 KB

Versions: 9

Compression:

Stored size: 1.65 KB

Contents

describe "Split screen functional" do
  tests PM::SplitViewController

  # Override controller to properly instantiate
  def controller
    @app ||= TestDelegate.new
    @master = MasterScreen.new(nav_bar: true)
    @detail = DetailScreen.new(nav_bar: true)
    @controller ||= @app.create_split_screen @master, @detail
  end

  before do
    rotate_device to: :landscape, button: :right
  end

  after do
    rotate_device to: :portrait, button: :bottom
  end

  it "should allow opening a detail view from the master view" do

    @master.open BasicScreen.new(nav_bar: true), in_detail: true

    wait 0.75 do
      view("Master").should.be.kind_of UINavigationItemView
      view("Basic").should.be.kind_of UINavigationItemView
      views(UINavigationItemView).each { |v| v.title.should.not == "Detail" }
    end

  end

  it "should allow opening another view from the master view" do

    @master.open BasicScreen

    wait 0.75 do
      view("Basic").should.be.kind_of UINavigationItemView
      view("Detail").should.be.kind_of UINavigationItemView
    end

  end

  it "should allow opening a master view from the detail view" do

    @detail.open BasicScreen.new(nav_bar: true), in_master: true

    wait 0.75 do
      view("Basic").should.be.kind_of UINavigationItemView
      view("Detail").should.be.kind_of UINavigationItemView
      views(UINavigationItemView).each { |v| v.title.should.not == "Master" }
    end

  end

  it "should allow opening another view from the detail view" do

    @detail.open BasicScreen

    wait 0.75 do
      view("Basic").should.be.kind_of UINavigationItemView
      view("Master").should.be.kind_of UINavigationItemView
    end

  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ProMotion-1.0.4 spec/functional/func_split_screen_spec.rb
ProMotion-1.0.3 spec/functional/func_split_screen_spec.rb
ProMotion-1.0.2 spec/functional/func_split_screen_spec.rb
ProMotion-1.0.1 spec/functional/func_split_screen_spec.rb
ProMotion-1.0.0 spec/functional/func_split_screen_spec.rb
ProMotion-0.7.8 spec/functional/func_split_screen_spec.rb
ProMotion-0.7.6 spec/functional/func_split_screen_spec.rb
ProMotion-0.7.5 spec/functional/func_split_screen_spec.rb
ProMotion-0.7.4 spec/functional/func_split_screen_spec.rb