2 # vim:ts=4:sw=4:expandtab
4 # Please read the following documents before working on tests:
5 # • https://build.i3wm.org/docs/testsuite.html
8 # • https://build.i3wm.org/docs/lib-i3test.html
9 # (alternatively: perldoc ./testcases/lib/i3test.pm)
11 # • https://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)
17 # Verifies that command or config criteria does not match dock clients
18 # Bug still in: 4.12-38-ge690e3d
19 use i3test i3_config => <<EOT;
21 for_window [class="dock"] move workspace current
24 # Disable i3bar, which is also a dock client.
29 my $ws = fresh_workspace();
32 ## command criteria should not match dock windows
34 window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
38 is(get_dock_clients, 1, "created one docked client");
39 is_num_children($ws, 0, 'no container on the current workspace');
41 cmd '[class="^x$"] move workspace current';
44 is(get_dock_clients, 1, "one docked client after move");
45 is_num_children($ws, 0, 'no container on the current workspace');
47 cmd '[class="^x$"] fullscreen';
50 is(get_dock_clients, 1, "one docked client after fullscreen");
51 is_num_children($ws, 0, 'no container on the current workspace');
53 cmd '[class="^x$"] kill';
56 is(get_dock_clients, 1, "one docked client after kill");
57 is_num_children($ws, 0, 'no container on the current workspace');
60 ## config criteria should not match dock windows
62 window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
67 is(get_dock_clients, 2, "created second docked client");
68 is_num_children($ws, 0, 'no container on the current workspace');