spec/unit/tables/table_searchable_spec.rb in ProMotion-2.7.1 vs spec/unit/tables/table_searchable_spec.rb in ProMotion-2.8.0
- old
+ new
@@ -6,22 +6,25 @@
it "should be searchable" do
@screen.class.get_searchable.should == true
end
- it "should create a search header" do
- @screen.tableView.tableHeaderView.should.be.kind_of UISearchBar
- end
+ # Older than iOS 11 tests
+ if TestHelper.lt_ios11
+ it "should create a search header" do
+ @screen.tableView.tableHeaderView.should.be.kind_of UISearchBar
+ end
- it "should not hide the search bar initally by default" do
- @screen.tableView.contentOffset.should == CGPointMake(0,0)
- end
+ it "should not hide the search bar initally by default" do
+ @screen.tableView.contentOffset.should == CGPointMake(0,0)
+ end
- it "should allow hiding the search bar initally" do
- class HiddenSearchScreen < TableScreenSearchable
- searchable hide_initially: true
+ it "should allow hiding the search bar initally" do
+ class HiddenSearchScreen < TableScreenSearchable
+ searchable hide_initially: true
+ end
+ screen = HiddenSearchScreen.new
+ screen.on_load
+ screen.tableView.contentOffset.should == CGPointMake(0, screen.tableView.tableHeaderView.frame.size.height)
end
- screen = HiddenSearchScreen.new
- screen.on_load
- screen.tableView.contentOffset.should == CGPointMake(0, screen.tableView.tableHeaderView.frame.size.height)
end
end