tests: fix t/31-stacking-order.t: don’t get focus on workspace level, use get_focused()

This commit is contained in:
Michael Stapelberg 2010-11-28 21:28:44 +01:00
parent 5872cbcba6
commit 47fe31f104
1 changed files with 5 additions and 10 deletions

View File

@ -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" );