From b8156a0c32a26f264466272a2d0d575a3517ea66 Mon Sep 17 00:00:00 2001 From: Sebastian Frysztak Date: Thu, 6 Oct 2016 21:02:15 +0200 Subject: [PATCH 1/6] BDD tests for :command-history-prev/next ref #999 --- tests/end2end/features/misc.feature | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index c24f0ea9f..7aaf82930 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -671,3 +671,38 @@ Feature: Various utility commands. And I wait until the scroll position changed And I run :click-element id link Then the error "Element position is out of view!" should be shown + + ## :command-history-{prev,next} + + Scenario: Calling previous command + When I run :set-cmd-text :message-info blah + And I run :command-accept + And I wait for "blah" in the log + And I run :set-cmd-text : + And I run :command-history-prev + And I run :command-accept + Then the message "blah" should be shown + + Scenario: Browsing through commands + When I run :set-cmd-text :message-info blarg + And I run :command-accept + And I wait for "blarg" in the log + And I run :set-cmd-text : + And I run :command-history-prev + And I run :command-history-prev + And I run :command-history-next + And I run :command-accept + Then the message "blarg" should be shown + + Scenario: Calling previous command when history is empty + Given I have a fresh instance + When I run :set-cmd-text : + And I run :command-history-prev + And I run :command-accept + Then the error "No command given" should be shown + + Scenario: Calling next command when there's no next command + When I run :set-cmd-text : + And I run :command-history-next + And I run :command-accept + Then the error "No command given" should be shown From 5eed5eb7f737da50006a8f19cb1b1f3f5de1edf0 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 7 Oct 2016 09:44:54 +0200 Subject: [PATCH 2/6] commit 5708bb0306fb28549fc47e686790d006398c27fa Author: Florian Bruhin Date: Fri Oct 7 07:44:54 2016 +0200 Turn off private browsing in misc.feature tests --- tests/end2end/features/misc.feature | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index 7aaf82930..930da91dc 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -549,6 +549,7 @@ Feature: Various utility commands. And I open cookies/set?qute-test=42 without waiting And I wait until cookies is loaded And I open cookies in a new tab + And I set general -> private-browsing to false Then the cookie qute-test should be set to 42 ## https://github.com/The-Compiler/qutebrowser/issues/1742 @@ -557,6 +558,7 @@ Feature: Various utility commands. Scenario: Private browsing is activated in QtWebKit without restart When I set general -> private-browsing to true And I open data/javascript/localstorage.html + And I set general -> private-browsing to false Then the page should contain the plaintext "Local storage status: not working" Scenario: :repeat-command From a8847eacbef0c40a082a933ea9ea00b56bed00bc Mon Sep 17 00:00:00 2001 From: Sebastian Frysztak Date: Sat, 8 Oct 2016 18:14:37 +0200 Subject: [PATCH 3/6] Cover HistoryEndReachedError in command_history_next(). --- tests/end2end/features/misc.feature | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index 930da91dc..bac6125a7 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -693,6 +693,7 @@ Feature: Various utility commands. And I run :command-history-prev And I run :command-history-prev And I run :command-history-next + And I run :command-history-next And I run :command-accept Then the message "blarg" should be shown From 40eb875fb6c7ca26b2cdade7e7f1586de64ff60b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 10 Oct 2016 07:33:59 +0200 Subject: [PATCH 4/6] Add a test for private-browsing mode --- tests/end2end/features/misc.feature | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index 933c698c2..f58dcf9e2 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -709,3 +709,16 @@ Feature: Various utility commands. And I run :command-history-next And I run :command-accept Then the error "No command given" should be shown + + Scenario: Calling previous command with private-browsing mode + When I run :set-cmd-text :message-info blah + And I run :command-accept + And I set general -> private-browsing to true + And I run :set-cmd-text :message-error This should only be shown once + And I run :command-accept + And I wait for the error "This should only be shown once" + And I run :set-cmd-text : + And I run :command-history-prev + And I run :command-accept + And I set general -> private-browsing to false + Then the message "blah" should be shown From 03c0eb244e49ba524e71eff79a0596d5c497a5d8 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 10 Oct 2016 07:34:22 +0200 Subject: [PATCH 5/6] Remove whitespace at EOL --- tests/end2end/features/misc.feature | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index f58dcf9e2..e90ea8a60 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -675,7 +675,7 @@ Feature: Various utility commands. Then the error "Element position is out of view!" should be shown ## :command-history-{prev,next} - + Scenario: Calling previous command When I run :set-cmd-text :message-info blah And I run :command-accept @@ -684,7 +684,7 @@ Feature: Various utility commands. And I run :command-history-prev And I run :command-accept Then the message "blah" should be shown - + Scenario: Browsing through commands When I run :set-cmd-text :message-info blarg And I run :command-accept @@ -696,14 +696,14 @@ Feature: Various utility commands. And I run :command-history-next And I run :command-accept Then the message "blarg" should be shown - + Scenario: Calling previous command when history is empty Given I have a fresh instance When I run :set-cmd-text : And I run :command-history-prev And I run :command-accept Then the error "No command given" should be shown - + Scenario: Calling next command when there's no next command When I run :set-cmd-text : And I run :command-history-next From cc74c87a4c7a147fae4604b2f6e56be793d4affc Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 10 Oct 2016 07:34:32 +0200 Subject: [PATCH 6/6] Regenerate authors --- README.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.asciidoc b/README.asciidoc index 34f9f8656..5cd602d1b 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -185,6 +185,7 @@ Contributors, sorted by the number of commits in descending order: * Julian Weigt * Jonas Schürmann * error800 +* Sebastian Frysztak * Michael Hoang * Liam BEGUIN * skinnay @@ -198,7 +199,6 @@ Contributors, sorted by the number of commits in descending order: * rikn00 * kanikaa1234 * haitaka -* Sebastian Frysztak * Nick Ginther * Michał Góral * Michael Ilsaas