2 # vim:ts=4:sw=4:expandtab
4 # Please read the following documents before working on tests:
5 # • http://build.i3wm.org/docs/testsuite.html
8 # • http://build.i3wm.org/docs/lib-i3test.html
9 # (alternatively: perldoc ./testcases/lib/i3test.pm)
11 # • http://build.i3wm.org/docs/ipc.html
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 # (unless you are already familiar with Perl)
19 my $tmp = fresh_workspace;
21 my $left = open_window;
22 my $mid = open_window;
25 my $bottom = open_window;
27 my ($nodes, $focus) = get_ws_content($tmp);
29 #############################################################################
30 # 1: open a floating window, get it mapped
31 #############################################################################
33 # Create a floating window
34 my $window = open_floating_window;
35 ok($window->mapped, 'Window is mapped');
37 ($nodes, $focus) = get_ws_content($tmp);
38 is(@{$nodes->[1]->{nodes}}, 2, 'two windows in split con');
40 #############################################################################
41 # 2: make it tiling, see where it ends up
42 #############################################################################
44 cmd 'floating toggle';
46 ($nodes, $focus) = get_ws_content($tmp);
48 is(@{$nodes->[1]->{nodes}}, 3, 'three windows in split con after floating toggle');