diff options
author | Florian Bruhin <git@the-compiler.org> | 2016-06-10 13:20:58 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2016-06-10 13:20:58 +0200 |
commit | e0acda403f6613b4372cc7518b03f0a9aebcfd68 (patch) | |
tree | 49cfdca275367175409ddc8a0f53518fe86336fc | |
parent | a0fd0960384fd2e4110afed9c06ef79149d25d0a (diff) | |
download | qutebrowser-e0acda403f6613b4372cc7518b03f0a9aebcfd68.tar.gz qutebrowser-e0acda403f6613b4372cc7518b03f0a9aebcfd68.zip |
Add an end-to-end test for :history-clear
-rw-r--r-- | tests/end2end/features/history.feature | 5 | ||||
-rw-r--r-- | tests/end2end/features/test_history_bdd.py | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/end2end/features/history.feature b/tests/end2end/features/history.feature index 7eebb063f..66567b90c 100644 --- a/tests/end2end/features/history.feature +++ b/tests/end2end/features/history.feature @@ -45,3 +45,8 @@ Feature: Page history And I wait for "Error while loading http://localhost:*/status/404: NOT FOUND" in the log Then the history file should contain: http://localhost:(port)/status/404 Error loading page: http://localhost:(port)/status/404 + + Scenario: Clearing history + When I open data/title.html + And I run :history-clear + Then the history file should be empty diff --git a/tests/end2end/features/test_history_bdd.py b/tests/end2end/features/test_history_bdd.py index 6ab8e5fbc..c0f41a0ed 100644 --- a/tests/end2end/features/test_history_bdd.py +++ b/tests/end2end/features/test_history_bdd.py @@ -42,3 +42,8 @@ def check_history(quteproc, httpbin, expected): lines.append(line) assert lines == expected + + +@bdd.then("the history file should be empty") +def check_history_empty(quteproc, httpbin): + check_history(quteproc, httpbin, '') |