From 5a6d387130cd3683de108c688898fb1acf31d771 Mon Sep 17 00:00:00 2001 From: Aaron Friel Date: Wed, 1 Mar 2017 18:21:00 -0600 Subject: [PATCH] Fix overflow test for footer. --- tests/WebSpec.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/WebSpec.hs b/tests/WebSpec.hs index 2590418..7be3f3a 100644 --- a/tests/WebSpec.hs +++ b/tests/WebSpec.hs @@ -68,13 +68,13 @@ mainPageTests = session "main page" $ using [chromeCaps] $ do footer <- select "#footer" (width, height) <- elemSize footer width `shouldBeInRange` (750, 850) - height `shouldBeInRange` (60, 70) + height `shouldBeInRange` (30, 70) + wd "overflows when shrunk" $ do -- and now it shall be overflowing - setWindowSize (700, 500) - waitUntil wait_delay (expect . inRange (90, 140) . snd =<< elemSize footer) - `catch` \(_::ExpectFailed) -> return () - height2 <- snd <$> elemSize footer - height2 `shouldBeInRange` (90, 140) + setWindowSize (600, 500) + footer <- select "#footer" + (_, height) <- elemSize footer + height `shouldBeInRange` (71, 140) categoryTests :: Spec categoryTests = session "categories" $ using [chromeCaps] $ do