]> git.sur5r.net Git - i3/i3/blob - testcases/t/154-regress-multiple-dock.t
add boilerplate to all testcases with documentation references
[i3/i3] / testcases / t / 154-regress-multiple-dock.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Please read the following documents before working on tests:
5 # • http://build.i3wm.org/docs/testsuite.html
6 #   (or docs/testsuite)
7 #
8 # • http://build.i3wm.org/docs/lib-i3test.html
9 #   (alternatively: perldoc ./testcases/lib/i3test.pm)
10 #
11 # • http://build.i3wm.org/docs/ipc.html
12 #   (or docs/ipc)
13 #
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 #   (unless you are already familiar with Perl)
16 #
17 # Regression test for closing one of multiple dock clients
18 #
19 use i3test;
20
21 my $tmp = fresh_workspace;
22
23 #####################################################################
24 # verify that there is no dock window yet
25 #####################################################################
26
27 # Children of all dockareas
28 my @docked = get_dock_clients;
29
30 is(@docked, 0, 'no dock clients yet');
31
32 #####################################################################
33 # open a dock client
34 #####################################################################
35
36 my $first = open_window({
37         background_color => '#FF0000',
38         window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
39     });
40
41 #####################################################################
42 # Open a second dock client
43 #####################################################################
44
45 my $second = open_window({
46         background_color => '#FF0000',
47         window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
48     });
49
50 #####################################################################
51 # Kill the second dock client
52 #####################################################################
53 cmd "nop destroying dock client";
54 $second->destroy;
55
56 #####################################################################
57 # Now issue a focus command
58 #####################################################################
59 cmd 'focus right';
60
61 does_i3_live;
62
63 done_testing;