]> git.sur5r.net Git - i3/i3/blob - testcases/t/162-regress-dock-urgent.t
tests: replace http:// with https:// where appropriate
[i3/i3] / testcases / t / 162-regress-dock-urgent.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Please read the following documents before working on tests:
5 # • https://build.i3wm.org/docs/testsuite.html
6 #   (or docs/testsuite)
7 #
8 # • https://build.i3wm.org/docs/lib-i3test.html
9 #   (alternatively: perldoc ./testcases/lib/i3test.pm)
10 #
11 # • https://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 setting the urgent hint on dock clients.
18 # found in 4be3178d4d360c2996217d811e61161c84d25898
19 #
20 use i3test;
21
22 my $i3 = i3(get_socket_path());
23
24 my $tmp = fresh_workspace;
25
26 #####################################################################
27 # verify that there is no dock window yet
28 #####################################################################
29
30 # Children of all dockareas
31 my @docked = get_dock_clients;
32
33 is(@docked, 0, 'no dock clients yet');
34
35 # open a dock client
36
37 my $window = open_window(
38     window_type => $x->atom(name => '_NET_WM_WINDOW_TYPE_DOCK'),
39 );
40
41 #####################################################################
42 # check that we can find it in the layout tree at the expected position
43 #####################################################################
44
45 @docked = get_dock_clients;
46 is(@docked, 1, 'one dock client found');
47
48 # verify the height
49 my $docknode = $docked[0];
50
51 is($docknode->{rect}->{height}, 30, 'dock node has unchanged height');
52
53 $window->add_hint('urgency');
54
55 sync_with_i3;
56
57 does_i3_live;
58
59 done_testing;