bdd: Add tests with very big counts.

This commit is contained in:
Florian Bruhin 2015-11-16 07:17:43 +01:00
parent fe08cb24f8
commit 6a4ea944cf
3 changed files with 36 additions and 0 deletions

View File

@ -79,6 +79,14 @@ Feature: Going back and forward.
- url: http://localhost:*/data/backforward/2.txt
- url: http://localhost:*/data/backforward/3.txt
Scenario: Going back with very big count.
Given I open data/backforward/1.txt
When I run :back with count 99999999999
# Make sure it doesn't hang
And I run :message-info "Still alive!"
Then the error "At beginning of history." should be shown.
And the message "Still alive!" should be shown.
Scenario: Going back in a new window
Given I have a fresh instance
When I open data/backforward/1.txt

View File

@ -37,6 +37,10 @@ Feature: Scrolling
When I run :scroll-px -10 0
Then the page should not be scrolled.
Scenario: :scroll-px with a very big value
When I run :scroll-px 99999999999 0
Then the error "Numeric argument is too large for internal int representation." should be shown.
## :scroll
Scenario: Scrolling down
@ -106,6 +110,12 @@ Feature: Scrolling
And I run :scroll left
Then the page should not be scrolled.
Scenario: Scrolling down with a very big count
When I run :scroll down with count 99999999999
# Make sure it doesn't hang
And I run :message-info "Still alive!"
Then the message "Still alive!" should be shown.
## :scroll-perc
Scenario: Scrolling to bottom with :scroll-perc
@ -156,6 +166,10 @@ Feature: Scrolling
When I run :scroll-perc with count 50
Then the page should be scrolled vertically.
Scenario: :scroll-perc with a very big value
When I run :scroll-perc 99999999999
Then no crash should happen
## :scroll-page
Scenario: Scrolling down with :scroll-page
@ -190,3 +204,7 @@ Feature: Scrolling
Scenario: :scroll-page with --top-navigate
When I run :scroll-page --top-navigate prev 0 -1
Then data/hello2.txt should be loaded
Scenario: :scroll-page with a very big value
When I run :scroll-page 99999999999 99999999999
Then the error "Numeric argument is too large for internal int representation." should be shown.

View File

@ -20,6 +20,12 @@ Feature: Zooming in and out
Then the message "Zoom level: 120%" should be shown.
And the zoom should be 120%
# https://github.com/The-Compiler/qutebrowser/issues/1118
Scenario: Zooming in with very big count
When I run :zoom-in with count 99999999999
Then the message "Zoom level: 100%" should be shown.
And the zoom should be 100%
Scenario: Zooming out with count
When I run :zoom-out with count 2
Then the message "Zoom level: 50%" should be shown.
@ -45,3 +51,7 @@ Feature: Zooming in and out
Scenario: Setting zoom to invalid value
When I run :zoom -1
Then the error "Can't zoom -1%!" should be shown.
Scenario: Setting zoom with very big count
When I run :zoom with count 99999999999
Then the message "Zoom level: 99999999999%" should be shown.