]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/167-workspace_layout.t
Merge pull request #1698 from Airblader/feature-1696
[i3/i3] / testcases / t / 167-workspace_layout.t
index 697d04bb8e0788af0c029c8a50d5a14d077e10fa..033a31f2665e025ea86188b275c8c832707bcd5a 100644 (file)
@@ -1,6 +1,19 @@
 #!perl
 # vim:ts=4:sw=4:expandtab
 #
+# Please read the following documents before working on tests:
+# • http://build.i3wm.org/docs/testsuite.html
+#   (or docs/testsuite)
+#
+# • http://build.i3wm.org/docs/lib-i3test.html
+#   (alternatively: perldoc ./testcases/lib/i3test.pm)
+#
+# • http://build.i3wm.org/docs/ipc.html
+#   (or docs/ipc)
+#
+# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
+#   (unless you are already familiar with Perl)
+#
 # Tests the workspace_layout config option.
 #
 
@@ -114,6 +127,24 @@ is($content[1]->{layout}, 'stacked', 'layout stacked');
 is(@content, 1, 'one con on target workspace');
 is($content[0]->{layout}, 'stacked', 'layout stacked');
 
+#####################################################################
+# 7: toggle floating mode and check that we have a stacked con when
+# re-inserting a floating container.
+#####################################################################
+
+$tmp = fresh_workspace;
+
+$first = open_window;
+cmd 'floating toggle';
+cmd 'floating toggle';
+
+$second = open_window;
+
+is($x->input_focus, $second->id, 'second window focused');
+@content = @{get_ws_content($tmp)};
+ok(@content == 1, 'one con at workspace level');
+is($content[0]->{layout}, 'stacked', 'layout stacked');
+
 exit_gracefully($pid);
 
 done_testing;