tests: implement sync_with_i3 and use it instead of sleep()

Also use open_standard_window() in a few more places where appropriate
This commit is contained in:
Michael Stapelberg
2011-09-23 20:37:45 +01:00
parent 3167e9ad2d
commit 38a9eabff1
27 changed files with 198 additions and 238 deletions

View File

@ -15,9 +15,9 @@ my $tmp = fresh_workspace;
cmd 'split v';
my $top = open_standard_window($x);
sleep 0.25;
my $bottom = open_standard_window($x);
sleep 0.25;
sync_with_i3($x);
diag("top = " . $top->id . ", bottom = " . $bottom->id);
@ -55,9 +55,7 @@ $tmp = fresh_workspace;
cmd 'split v';
$top = open_standard_window($x);
sleep 0.25;
$bottom = open_standard_window($x);
sleep 0.25;
cmd 'split h';
cmd 'layout stacked';
@ -79,7 +77,6 @@ is($nodes->[1]->{percent}, 0.75, 'bottom window got 75%');
$tmp = fresh_workspace;
$top = open_standard_window($x);
sleep 0.25;
cmd 'floating enable';