From 4172e3904577ebc63bc6aece5939e6f712580174 Mon Sep 17 00:00:00 2001 From: Jan Verbeek Date: Sat, 2 Jul 2016 01:42:47 +0200 Subject: [PATCH] Move :repeat-command tests to scroll.feature --- tests/end2end/features/misc.feature | 23 ----------------------- tests/end2end/features/scroll.feature | 20 ++++++++++++++++++++ tests/end2end/features/test_misc_bdd.py | 2 -- 3 files changed, 20 insertions(+), 25 deletions(-) diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index e11d87121..bd54960bd 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -464,26 +464,3 @@ Feature: Various utility commands. And I wait until cookies is loaded And I open cookies in a new tab Then the cookie qute-test should be set to 42 - - Scenario: :repeat-command - Given I open data/scroll.html - When I run :scroll down - And I run :repeat-command - And I run :scroll up - Then the page should be scrolled vertically - - Scenario: :repeat-command with count - Given I open data/scroll.html - When I run :scroll down with count 3 - And I run :scroll up - And I run :repeat-command with count 2 - Then the page should not be scrolled - - Scenario: :repeat-command with not-normal command inbetween - Given I open data/scroll.html - When I run :scroll down with count 3 - And I run :scroll up - And I run :prompt-accept - And I run :repeat-command with count 2 - Then the page should not be scrolled - And the error "prompt-accept: This command is only allowed in prompt/yesno mode." should be shown diff --git a/tests/end2end/features/scroll.feature b/tests/end2end/features/scroll.feature index 676cd0890..508a2c2e5 100644 --- a/tests/end2end/features/scroll.feature +++ b/tests/end2end/features/scroll.feature @@ -241,3 +241,23 @@ Feature: Scrolling When I open data/hello.txt And I run :scroll-page 1 1 Then no crash should happen + + Scenario: :repeat-command + When I run :scroll down + And I run :repeat-command + And I run :scroll up + Then the page should be scrolled vertically + + Scenario: :repeat-command with count + When I run :scroll down with count 3 + And I run :scroll up + And I run :repeat-command with count 2 + Then the page should not be scrolled + + Scenario: :repeat-command with not-normal command inbetween + When I run :scroll down with count 3 + And I run :scroll up + And I run :prompt-accept + And I run :repeat-command with count 2 + Then the page should not be scrolled + And the error "prompt-accept: This command is only allowed in prompt/yesno mode." should be shown diff --git a/tests/end2end/features/test_misc_bdd.py b/tests/end2end/features/test_misc_bdd.py index 03c1f0ff1..35bf6753e 100644 --- a/tests/end2end/features/test_misc_bdd.py +++ b/tests/end2end/features/test_misc_bdd.py @@ -29,8 +29,6 @@ import qutebrowser from qutebrowser.utils import docutils from qutebrowser.browser import pdfjs -from end2end.features.test_scroll_bdd import check_scrolled, check_not_scrolled - bdd.scenarios('misc.feature')