From e0acda403f6613b4372cc7518b03f0a9aebcfd68 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 10 Jun 2016 13:20:58 +0200 Subject: [PATCH] Add an end-to-end test for :history-clear --- tests/end2end/features/history.feature | 5 +++++ tests/end2end/features/test_history_bdd.py | 5 +++++ 2 files changed, 10 insertions(+) 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, '')