summaryrefslogtreecommitdiff
path: root/tests/end2end/features
diff options
context:
space:
mode:
authorJimmy <jimmy@spalge.com>2019-06-02 16:38:10 +1200
committerJimmy <jimmy@spalge.com>2020-07-13 13:14:48 +1200
commit3650e26b853382d19dcaf4845ace4e3d19d632cf (patch)
treef4b1b3cd96ab901e9cc3cb22ba7bdf614703d752 /tests/end2end/features
parent6e31a3fd9cc9f64a3c1268a8271f1397ddd502dd (diff)
downloadqutebrowser-3650e26b853382d19dcaf4845ace4e3d19d632cf.tar.gz
qutebrowser-3650e26b853382d19dcaf4845ace4e3d19d632cf.zip
Add "clean the log" BDD command.
For use when you want to check for something in the log that also occurs during the background stage. Like a window being closed when windows from the previous test where closed in the setup.
Diffstat (limited to 'tests/end2end/features')
-rw-r--r--tests/end2end/features/conftest.py5
-rw-r--r--tests/end2end/features/tabs.feature4
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/end2end/features/conftest.py b/tests/end2end/features/conftest.py
index a0c85cb28..0208cce05 100644
--- a/tests/end2end/features/conftest.py
+++ b/tests/end2end/features/conftest.py
@@ -193,6 +193,11 @@ def pdfjs_available(data_tmpdir):
pytest.skip("No pdfjs installation found.")
+@bdd.given('I clear the log')
+def clear_log_lines(quteproc):
+ quteproc.clear_data()
+
+
## When
diff --git a/tests/end2end/features/tabs.feature b/tests/end2end/features/tabs.feature
index ffb2a97c8..da9b6a0ab 100644
--- a/tests/end2end/features/tabs.feature
+++ b/tests/end2end/features/tabs.feature
@@ -899,6 +899,7 @@ Feature: Tab management
# :undo --window
Scenario: Undo the closing of a window
+ Given I clear the log
When I open data/numbers/1.txt
And I open data/numbers/2.txt in a new window
And I run :close
@@ -919,6 +920,7 @@ Feature: Tab management
- url: http://localhost:*/data/numbers/2.txt
Scenario: Undo the closing of a window with multiple tabs
+ Given I clear the log
When I open data/numbers/1.txt
And I open data/numbers/2.txt in a new window
And I open data/numbers/3.txt in a new tab
@@ -942,6 +944,7 @@ Feature: Tab management
- url: http://localhost:*/data/numbers/3.txt
Scenario: Undo the closing of a window with multiple tabs with undo stack
+ Given I clear the log
When I open data/numbers/1.txt
And I open data/numbers/2.txt in a new window
And I open data/numbers/3.txt in a new tab
@@ -967,6 +970,7 @@ Feature: Tab management
- url: http://localhost:*/data/numbers/3.txt
Scenario: Undo the closing of a window with tabs are windows
+ Given I clear the log
When I set tabs.last_close to close
And I set tabs.tabs_are_windows to true
And I open data/numbers/1.txt