Sha256: d7ede7fbc28c29be8ab9d59b40ce410b3622142674174911c83d6e39c0d31f67
Contents?: true
Size: 1.71 KB
Versions: 4
Compression:
Stored size: 1.71 KB
Contents
describe "ProMotion::Screen functional" do tests PM::Screen # Override controller to properly instantiate def controller rotate_device to: :portrait, button: :bottom @controller ||= FunctionalScreen.new(nav_bar: true) @controller.main_controller end after do @controller = nil end it "should have a navigation bar" do view("Functional").should.be.kind_of UINavigationItemView end it "should allow setting a left nav bar button" do @controller.set_nav_bar_button :left, title: "Cool", action: :triggered_button tap("Cool") @controller.button_was_triggered.should.be.true end it "should allow setting a right nav bar button" do @controller.set_nav_bar_button :right, title: "Cool2", action: :triggered_button tap("Cool2") @controller.button_was_triggered.should.be.true end it "should allow opening another screen in the same nav bar and have a back button that is operational" do @controller.open BasicScreen wait 0.5 do view("Basic").should.be.kind_of UINavigationItemView view("Functional").should.be.kind_of UINavigationItemButtonView tap("Functional") wait 0.5 do view("Functional").should.be.kind_of UINavigationItemView end end end it "should allow opening and closing a modal screen" do @basic = BasicScreen.new(nav_bar: true) wait 0.1 do @controller.open_modal @basic wait 0.6 do view("Basic").should.be.kind_of UINavigationItemView @basic.close wait 0.6 do @basic = nil view("Functional").should.be.kind_of UINavigationItemView end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems