]> git.sur5r.net Git - i3/i3/blob - testcases/t/188-regress-focus-restart.t
Merge branch 'master' into next
[i3/i3] / testcases / t / 188-regress-focus-restart.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Verifies that i3 survives inplace restarts with fullscreen containers
5 #
6 use i3test;
7
8 my $tmp = fresh_workspace;
9
10 open_window(name => 'first');
11 open_window(name => 'second');
12
13 cmd 'focus left';
14
15 my ($nodes, $focus) = get_ws_content($tmp);
16 is(scalar @$nodes, 2, 'two tiling nodes on workspace');
17 is($nodes->[0]->{name}, 'first', 'first node name ok');
18 is($nodes->[1]->{name}, 'second', 'second node name ok');
19 is($focus->[0], $nodes->[0]->{id}, 'first node focused');
20 is($focus->[1], $nodes->[1]->{id}, 'second node second in focus stack');
21
22 cmd 'restart';
23
24 does_i3_live;
25
26 ($nodes, $focus) = get_ws_content($tmp);
27 is(scalar @$nodes, 2, 'still two tiling nodes on workspace');
28 is($nodes->[0]->{name}, 'first', 'first node name ok');
29 is($nodes->[1]->{name}, 'second', 'second node name ok');
30 is($focus->[0], $nodes->[0]->{id}, 'first node focused');
31 is($focus->[1], $nodes->[1]->{id}, 'second node second in focus stack');
32
33 done_testing;