]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/135-floating-focus.t
testcases: fix race conditions in various tests
[i3/i3] / testcases / t / 135-floating-focus.t
index a1ab211e501d59531bb50e8cb8d86a4bf91cc008..b43f0f7ffbfbffd93298a4100ec8e45e8a207d3d 100644 (file)
@@ -49,8 +49,7 @@ cmd 'floating enable';
 # now kill the third one (it's floating). focus should stay unchanged
 cmd '[id="' . $third->id . '"] kill';
 
-# TODO: wait for unmapnotify
-sync_with_i3($x);
+wait_for_unmap($x);
 
 is($x->input_focus, $second->id, 'second con still focused after killing third');
 
@@ -81,15 +80,12 @@ cmd 'floating enable';
 # now kill the second one. focus should fall back to the third one, which is
 # also floating
 cmd 'kill';
-
-# TODO: wait for unmapnotify
-sync_with_i3($x);
+wait_for_unmap($x);
 
 is($x->input_focus, $third->id, 'third con focused');
 
 cmd 'kill';
-# TODO: wait for unmapnotify
-sync_with_i3($x);
+wait_for_unmap($x);
 
 is($x->input_focus, $first->id, 'first con focused after killing all floating cons');
 
@@ -122,15 +118,12 @@ sync_with_i3($x);
 # now kill the second one. focus should fall back to the third one, which is
 # also floating
 cmd 'kill';
-
-# TODO: wait for unmapnotify
-sync_with_i3($x);
+wait_for_unmap($x);
 
 is($x->input_focus, $third->id, 'third con focused');
 
 cmd 'kill';
-# TODO: wait for unmapnotify
-sync_with_i3($x);
+wait_for_unmap($x);
 
 is($x->input_focus, $first->id, 'first con focused after killing all floating cons');