summaryrefslogtreecommitdiff
path: root/tests/end2end/features
diff options
context:
space:
mode:
authorJimmy <jimmy@spalge.com>2019-05-26 15:45:32 +1200
committerJimmy <jimmy@spalge.com>2020-07-13 13:14:48 +1200
commita0cb53b4180cb8035015dfcdda82d86b49369c1e (patch)
tree785ea24819be42b020453c658b2ca053e6a5ab08 /tests/end2end/features
parenta69e6903389d39c997b046868b35028ef44c05dd (diff)
downloadqutebrowser-a0cb53b4180cb8035015dfcdda82d86b49369c1e.tar.gz
qutebrowser-a0cb53b4180cb8035015dfcdda82d86b49369c1e.zip
Add end2end tests for undoing window closure.
Diffstat (limited to 'tests/end2end/features')
-rw-r--r--tests/end2end/features/tabs.feature85
1 files changed, 85 insertions, 0 deletions
diff --git a/tests/end2end/features/tabs.feature b/tests/end2end/features/tabs.feature
index 49b9fc51b..01aea50fc 100644
--- a/tests/end2end/features/tabs.feature
+++ b/tests/end2end/features/tabs.feature
@@ -896,6 +896,91 @@ Feature: Tab management
- data/numbers/2.txt
- data/numbers/3.txt
+ # :undo --window
+
+ Scenario: Undo the closing of a window
+ When I open data/numbers/1.txt
+ And I open data/numbers/2.txt in a new window
+ And I run :close
+ And I run :undo -w
+ Then the session should look like:
+ windows:
+ - tabs:
+ - active: true
+ history:
+ - url: about:blank
+ - url: http://localhost:*/data/numbers/1.txt
+ - active: true
+ tabs:
+ - active: true
+ history:
+ - url: http://localhost:*/data/numbers/2.txt
+
+ Scenario: Undo the closing of a window with multiple tabs
+ 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
+ And I run :close
+ And I run :undo -w
+ Then the session should look like:
+ windows:
+ - tabs:
+ - active: true
+ history:
+ - url: about:blank
+ - url: http://localhost:*/data/numbers/1.txt
+ - active: true
+ tabs:
+ - history:
+ - url: http://localhost:*/data/numbers/2.txt
+ - active: true
+ history:
+ - url: http://localhost:*/data/numbers/3.txt
+
+ Scenario: Undo the closing of a window with multiple tabs with undo stack
+ 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
+ And I run :tab-close
+ And I run :close
+ And I run :undo -w
+ And I run :undo
+ Then the session should look like:
+ windows:
+ - tabs:
+ - active: true
+ history:
+ - url: about:blank
+ - url: http://localhost:*/data/numbers/1.txt
+ - active: true
+ tabs:
+ - history:
+ - url: http://localhost:*/data/numbers/2.txt
+ - active: true
+ history:
+ - url: http://localhost:*/data/numbers/3.txt
+
+ Scenario: Undo the closing of a window with tabs are windows
+ When I set tabs.last_close to close
+ And I set tabs.tabs_are_windows to true
+ And I open data/numbers/1.txt
+ And I open data/numbers/2.txt in a new tab
+ And I run :tab-close
+ And I run :undo -w
+ Then the session should look like:
+ windows:
+ - tabs:
+ - active: true
+ history:
+ - url: about:blank
+ - url: http://localhost:*/data/numbers/1.txt
+ - active: true
+ tabs:
+ - active: true
+ history:
+ - url: http://localhost:*/data/numbers/2.txt
+
+
# tabs.last_close
# FIXME:qtwebengine