From c7fb99878fc9963adfeb3eb773c329c43d1aec6b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 10 Nov 2016 06:51:59 +0100 Subject: [PATCH] Move macro tests to keyinput.feature --- tests/end2end/features/keyinput.feature | 41 +++++++++++++++++++++++++ tests/end2end/features/misc.feature | 39 ----------------------- 2 files changed, 41 insertions(+), 39 deletions(-) diff --git a/tests/end2end/features/keyinput.feature b/tests/end2end/features/keyinput.feature index c60cb0a17..886c70761 100644 --- a/tests/end2end/features/keyinput.feature +++ b/tests/end2end/features/keyinput.feature @@ -196,3 +196,44 @@ Feature: Keyboard input When I run :fake-key -g x And I wait for "got keypress in mode KeyMode.normal - delegating to " in the log Then no crash should happen + + # Macros + + Scenario: Recording a simple macro + Given I open data/scroll/simple.html + And I run :tab-only + When I run :scroll down with count 6 + And I run :record-macro + And I press the key "a" + And I run :scroll up + And I run :scroll up + And I run :record-macro + And I run :run-macro with count 2 + And I press the key "a" + Then the page should not be scrolled + + Scenario: Recording a named macro + Given I open data/scroll/simple.html + And I run :tab-only + When I run :scroll down with count 6 + And I run :record-macro foo + And I run :scroll up + And I run :scroll up + And I run :record-macro foo + And I run :run-macro foo with count 2 + Then the page should not be scrolled + + Scenario: Running an invalid macro + Given I open data/scroll/simple.html + And I run :tab-only + When I run :run-macro + And I press the key "b" + Then the error "No macro recorded in 'b'!" should be shown + And no crash should happen + + Scenario: Running an invalid named macro + Given I open data/scroll/simple.html + And I run :tab-only + When I run :run-macro bar + Then the error "No macro recorded in 'bar'!" should be shown + And no crash should happen diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index c193a1379..46e4dc287 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -530,45 +530,6 @@ Feature: Various utility commands. history: - url: http://localhost:*/data/hello3.txt - Scenario: Recording a simple macro - Given I open data/scroll/simple.html - And I run :tab-only - When I run :scroll down with count 6 - And I run :record-macro - And I press the key "a" - And I run :scroll up - And I run :scroll up - And I run :record-macro - And I run :run-macro with count 2 - And I press the key "a" - Then the page should not be scrolled - - Scenario: Recording a named macro - Given I open data/scroll/simple.html - And I run :tab-only - When I run :scroll down with count 6 - And I run :record-macro foo - And I run :scroll up - And I run :scroll up - And I run :record-macro foo - And I run :run-macro foo with count 2 - Then the page should not be scrolled - - Scenario: Running an invalid macro - Given I open data/scroll/simple.html - And I run :tab-only - When I run :run-macro - And I press the key "b" - Then the error "No macro recorded in 'b'!" should be shown - And no crash should happen - - Scenario: Running an invalid named macro - Given I open data/scroll/simple.html - And I run :tab-only - When I run :run-macro bar - Then the error "No macro recorded in 'bar'!" should be shown - And no crash should happen - ## Variables Scenario: {url} as part of an argument