summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Gadanidis <tim@gadanidis.ca>2021-11-21 00:00:22 -0500
committerTim Gadanidis <tim@gadanidis.ca>2021-11-21 00:00:22 -0500
commita50f6dc2ea6baffcbaef2c7bc3c890e18631802f (patch)
tree2c2161b9078eb66cdaf9e515ab560c555e84f7da
parent47f6bd85af4bf6d65b4a0ef0e460e1e557226264 (diff)
downloadqutebrowser-a50f6dc2ea6baffcbaef2c7bc3c890e18631802f.tar.gz
qutebrowser-a50f6dc2ea6baffcbaef2c7bc3c890e18631802f.zip
Add tests for closing last tab when giving/taking
-rw-r--r--tests/end2end/features/tabs.feature35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/end2end/features/tabs.feature b/tests/end2end/features/tabs.feature
index c9d983755..dae19e445 100644
--- a/tests/end2end/features/tabs.feature
+++ b/tests/end2end/features/tabs.feature
@@ -1349,6 +1349,24 @@ Feature: Tab management
And I run :tab-take 0/1
Then the error "Can't take tabs when using windows as tabs" should be shown
+ Scenario: Close the last tab of a window when taken by another window
+ Given I have a fresh instance
+ When I open data/numbers/1.txt
+ And I run :tab-only
+ And I open data/numbers/2.txt in a new window
+ And I set tabs.last_close to ignore
+ And I run :tab-take 1/1
+ And I wait until data/numbers/2.txt is loaded
+ Then the session should look like:
+ windows:
+ - tabs:
+ - history:
+ - url: about:blank
+ - url: http://localhost:*/data/numbers/1.txt
+ - active: true
+ history:
+ - url: http://localhost:*/data/numbers/2.txt
+
# :tab-give
@xfail_norun # Needs qutewm
@@ -1406,6 +1424,23 @@ Feature: Tab management
And I run :tab-give 0
Then the error "Can't give tabs when using windows as tabs" should be shown
+ Scenario: Close the last tab of a window when given to another window
+ Given I have a fresh instance
+ When I open data/numbers/1.txt
+ And I run :tab-only
+ And I open data/numbers/2.txt in a new window
+ And I set tabs.last_close to ignore
+ And I run :tab-give 1
+ And I wait until data/numbers/1.txt is loaded
+ Then the session should look like:
+ windows:
+ - tabs:
+ - active: true
+ history:
+ - url: http://localhost:*/data/numbers/2.txt
+ - history:
+ - url: http://localhost:*/data/numbers/1.txt
+
# Other
Scenario: Using :tab-next after closing last tab (#1448)