From 4bb38f1488905d814f43e3b874fa3db851aebede Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 6 Jan 2016 18:08:00 +0100 Subject: [PATCH] bdd: Handle some more corner cases in commands.py. --- tests/integration/features/backforward.feature | 15 +++++++++++++++ tests/integration/features/zoom.feature | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/tests/integration/features/backforward.feature b/tests/integration/features/backforward.feature index 70a448e2f..4b7cf247b 100644 --- a/tests/integration/features/backforward.feature +++ b/tests/integration/features/backforward.feature @@ -92,6 +92,13 @@ Feature: Going back and forward. - url: http://localhost:*/data/backforward/2.txt - url: http://localhost:*/data/backforward/3.txt + Scenario: Going back too much with count. + Given I open data/backforward/1.txt + When I open data/backforward/2.txt + And I open data/backforward/3.txt + And I run :back with count 3 + Then the error "At beginning of history." should be shown + Scenario: Going back with very big count. Given I open data/backforward/1.txt When I run :back with count 99999999999 @@ -132,3 +139,11 @@ Feature: Going back and forward. Given I open data/backforward/1.txt When I run :forward Then the error "At end of history." should be shown + + Scenario: Going forward too much with count. + Given I open data/backforward/1.txt + When I open data/backforward/2.txt + And I open data/backforward/3.txt + And I run :back with count 2 + And I run :forward with count 3 + Then the error "At end of history." should be shown diff --git a/tests/integration/features/zoom.feature b/tests/integration/features/zoom.feature index d0dd4494e..4b0b1800b 100644 --- a/tests/integration/features/zoom.feature +++ b/tests/integration/features/zoom.feature @@ -55,3 +55,7 @@ Feature: Zooming in and out Scenario: Setting zoom with very big count When I run :zoom with count 99999999999 Then the message "Zoom level: 99999999999%" should be shown + + Scenario: Setting zoom with argument and count + When I run :zoom 50 with count 60 + Then the error "Both count and argument given!" should be shown