]> git.sur5r.net Git - i3/i3/blob - testcases/t/127-regress-floating-parent.t
debian: add 4.1.2-2 upload to changelog
[i3/i3] / testcases / t / 127-regress-floating-parent.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Regression: make a container floating, kill its parent, make it tiling again
5 #
6 use i3test;
7
8 my $tmp = fresh_workspace;
9
10 cmd 'open';
11 my $left = get_focused($tmp);
12 cmd 'open';
13 my $old = get_focused($tmp);
14 cmd 'split v';
15 cmd 'open';
16 my $floating = get_focused($tmp);
17 diag("focused floating: " . get_focused($tmp));
18 cmd 'mode toggle';
19 # TODO: eliminate this race conditition
20 sleep 1;
21
22 # kill old container
23 cmd qq|[con_id="$old"] focus|;
24 is(get_focused($tmp), $old, 'old container focused');
25 cmd 'kill';
26
27 # kill left container
28 cmd qq|[con_id="$left"] focus|;
29 is(get_focused($tmp), $left, 'old container focused');
30 cmd 'kill';
31
32 # focus floating window, make it tiling again
33 cmd qq|[con_id="$floating"] focus|;
34 is(get_focused($tmp), $floating, 'floating window focused');
35
36 sleep 1;
37 cmd 'mode toggle';
38
39 does_i3_live;
40
41 done_testing;