From a096f3d9fc68744dd8c8ab07a333f2c3a1bb8d0c Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Thu, 14 Jul 2011 17:31:31 -0700 Subject: [PATCH] Make infinite scroll feature work on any size screen. --- features/infinite_scroll.feature | 3 ++- features/step_definitions/custom_web_steps.rb | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/features/infinite_scroll.feature b/features/infinite_scroll.feature index da2884b0c..8ed79b90a 100644 --- a/features/infinite_scroll.feature +++ b/features/infinite_scroll.feature @@ -6,7 +6,8 @@ Feature: infinite scroll Background: Given many posts from alice for bob - When I sign in as "bob@bob.bob" + And I resize my window to 800x600 + And I sign in as "bob@bob.bob" Scenario: on the main stream by activity Then I should see 15 posts diff --git a/features/step_definitions/custom_web_steps.rb b/features/step_definitions/custom_web_steps.rb index 5b23c1ed8..9bdd48459 100644 --- a/features/step_definitions/custom_web_steps.rb +++ b/features/step_definitions/custom_web_steps.rb @@ -180,3 +180,9 @@ end Then /^the notification dropdown should be visible$/ do find(:css, "#notification_dropdown").should be_visible end + +When /^I resize my window to 800x600$/ do + page.execute_script <<-JS + window.resizeTo(800,600); + JS +end \ No newline at end of file