tests: fix t/31-stacking-order.t: don’t get focus on workspace level, use get_focused()
This commit is contained in:
parent
5872cbcba6
commit
47fe31f104
|
@ -28,16 +28,13 @@ isnt($first, $second, 'two different containers opened');
|
||||||
##############################################################
|
##############################################################
|
||||||
|
|
||||||
$i3->command('layout stacking')->recv;
|
$i3->command('layout stacking')->recv;
|
||||||
my ($nodes, $focus) = get_ws_content($tmp);
|
is(get_focused($tmp), $second, 'second container still focused');
|
||||||
is($focus->[0], $second, 'second container still focused');
|
|
||||||
|
|
||||||
$i3->command('next v')->recv;
|
$i3->command('next v')->recv;
|
||||||
($nodes, $focus) = get_ws_content($tmp);
|
is(get_focused($tmp), $first, 'first container focused');
|
||||||
is($focus->[0], $first, 'first container focused');
|
|
||||||
|
|
||||||
$i3->command('prev v')->recv;
|
$i3->command('prev v')->recv;
|
||||||
($nodes, $focus) = get_ws_content($tmp);
|
is(get_focused($tmp), $second, 'second container focused again');
|
||||||
is($focus->[0], $second, 'second container focused again');
|
|
||||||
|
|
||||||
##############################################################
|
##############################################################
|
||||||
# now change the orientation to horizontal and cycle
|
# now change the orientation to horizontal and cycle
|
||||||
|
@ -48,12 +45,10 @@ $i3->command('split h')->recv;
|
||||||
$i3->command('level down')->recv;
|
$i3->command('level down')->recv;
|
||||||
|
|
||||||
$i3->command('next v')->recv;
|
$i3->command('next v')->recv;
|
||||||
($nodes, $focus) = get_ws_content($tmp);
|
is(get_focused($tmp), $first, 'first container focused');
|
||||||
is($focus->[0], $first, 'first container focused');
|
|
||||||
|
|
||||||
$i3->command('prev v')->recv;
|
$i3->command('prev v')->recv;
|
||||||
($nodes, $focus) = get_ws_content($tmp);
|
is(get_focused($tmp), $second, 'second container focused again');
|
||||||
is($focus->[0], $second, 'second container focused again');
|
|
||||||
|
|
||||||
|
|
||||||
diag( "Testing i3, Perl $], $^X" );
|
diag( "Testing i3, Perl $], $^X" );
|
||||||
|
|
Loading…
Reference in New Issue