summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoofar <toofar@spalge.com>2024-01-29 22:11:12 +1300
committerpylbrecht <pylbrecht@mailbox.org>2024-02-07 20:22:21 +0100
commitaf9e13690e8cff1423fb5dd70867c4f8c99be961 (patch)
tree79eff19d92f1f686fa009468be5ed133e0302b10
parent77591f3359059a27d1582c014988a398ed955af5 (diff)
downloadqutebrowser-af9e13690e8cff1423fb5dd70867c4f8c99be961.tar.gz
qutebrowser-af9e13690e8cff1423fb5dd70867c4f8c99be961.zip
Finish end2end tests for :tab-close --recursive
Background section: * use the new Given I open ... to open a new window after enabling tree tabs, so we can actually test with a tree tabbed window * an alternative is to change the "fresh instance" given step to take -s settings, but that seems a little more expense * move "clean up open tabs" to after we've opened a new window Scenario section: * change to opening related tabs so that they are nested and get closed recursively (also "I open" doesn't know about siblings yet) Other: * add a test_treetabs_bdd.py file - don't we need these to run the features? Maybe I'm missing something and have been doing it wrong... TODO: * do we need to clean up the tabs.tree_tabs setting? If so how? Or do we get a new instance for each Feature file? * why is `set tabs.tabs_are_windows to false` there? Do we need that? Lets see in CI I guess Co-authored-by: pylbrecht <pylbrecht@mailbox.org>
-rw-r--r--tests/end2end/features/test_treetabs_bdd.py6
-rw-r--r--tests/end2end/features/treetabs.feature12
2 files changed, 13 insertions, 5 deletions
diff --git a/tests/end2end/features/test_treetabs_bdd.py b/tests/end2end/features/test_treetabs_bdd.py
new file mode 100644
index 000000000..9cbb315d7
--- /dev/null
+++ b/tests/end2end/features/test_treetabs_bdd.py
@@ -0,0 +1,6 @@
+# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
+#
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+import pytest_bdd as bdd
+bdd.scenarios("treetabs.feature")
diff --git a/tests/end2end/features/treetabs.feature b/tests/end2end/features/treetabs.feature
index 78439e373..bc6fad45c 100644
--- a/tests/end2end/features/treetabs.feature
+++ b/tests/end2end/features/treetabs.feature
@@ -1,16 +1,18 @@
Feature: Tree tab management
- Tests for various :tab-* commands.
+ Tests for various :tree-tab-* commands.
Background:
- Given I clean up open tabs
- And I set tabs.tabs_are_windows to false
+ # Open a new tree tab enabled window, close everything else
+ Given I set tabs.tabs_are_windows to false
And I set tabs.tree_tabs to true
+ And I open about:blank?starting%20page in a new window
+ And I clean up open tabs
And I clear the log
Scenario: :tab-close --recursive
When I open data/numbers/1.txt
- And I open data/numbers/2.txt in a new tab as a sibling
- And I open data/numbers/3.txt in a new tab as a sibling
+ And I open data/numbers/2.txt in a new related tab
+ And I open data/numbers/3.txt in a new related tab
And I open data/numbers/4.txt in a new tab
And I run :tab-focus 1
And I run :tab-close --recursive