tests: fix a few racy testcases by adding sync_with_i3 calls
This commit is contained in:
@ -151,6 +151,8 @@ my ($absolute_before, $top_before) = $floatwin->rect;
|
||||
|
||||
cmd 'move left';
|
||||
|
||||
sync_with_i3;
|
||||
|
||||
my ($absolute, $top) = $floatwin->rect;
|
||||
|
||||
is($absolute->x, ($absolute_before->x - 10), 'moved 10 px to the left');
|
||||
@ -163,6 +165,8 @@ $top_before = $top;
|
||||
|
||||
cmd 'move right';
|
||||
|
||||
sync_with_i3;
|
||||
|
||||
($absolute, $top) = $floatwin->rect;
|
||||
|
||||
is($absolute->x, ($absolute_before->x + 10), 'moved 10 px to the right');
|
||||
@ -175,6 +179,8 @@ $top_before = $top;
|
||||
|
||||
cmd 'move up';
|
||||
|
||||
sync_with_i3;
|
||||
|
||||
($absolute, $top) = $floatwin->rect;
|
||||
|
||||
is($absolute->x, $absolute_before->x, 'x not changed');
|
||||
@ -187,6 +193,8 @@ $top_before = $top;
|
||||
|
||||
cmd 'move down';
|
||||
|
||||
sync_with_i3;
|
||||
|
||||
($absolute, $top) = $floatwin->rect;
|
||||
|
||||
is($absolute->x, $absolute_before->x, 'x not changed');
|
||||
@ -203,6 +211,8 @@ $top_before = $top;
|
||||
|
||||
cmd 'move left 20 px';
|
||||
|
||||
sync_with_i3;
|
||||
|
||||
($absolute, $top) = $floatwin->rect;
|
||||
|
||||
is($absolute->x, ($absolute_before->x - 20), 'moved 20 px to the left');
|
||||
|
Reference in New Issue
Block a user