]> git.sur5r.net Git - i3/i3/blob - testcases/t/191-resize-levels.t
tests: replace http:// with https:// where appropriate
[i3/i3] / testcases / t / 191-resize-levels.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 # Verifies that you can resize across different levels of containers even when
18 # they are all of the same orientation.
19 # (Ticket #754)
20 use i3test;
21
22 my $tmp = fresh_workspace;
23
24 open_window;
25 open_window;
26 cmd 'split v';
27 my $middle = open_window;
28 open_window;
29 cmd 'focus parent';
30 cmd 'split h';
31 open_window;
32
33 cmd '[id="' . $middle->id . '"] focus';
34 is($x->input_focus, $middle->id, 'middle window focused');
35
36 cmd 'resize grow left 10px or 25ppt';
37
38 my ($nodes, $focus) = get_ws_content($tmp);
39
40 cmp_float($nodes->[0]->{percent}, 0.25, 'left container got only 25%');
41 cmp_float($nodes->[1]->{percent}, 0.75, 'right container got 75%');
42
43 done_testing;