285-sticky.t: Use kill_all_windows
This commit is contained in:
parent
dfe89cc4f1
commit
ba8c64c4d9
|
@ -25,41 +25,41 @@ my ($ws, $tmp, $focused);
|
||||||
# nothing happens.
|
# nothing happens.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
fresh_workspace;
|
fresh_workspace;
|
||||||
open_window(wm_class => 'findme');
|
open_window;
|
||||||
cmd 'sticky enable';
|
cmd 'sticky enable';
|
||||||
$ws = fresh_workspace;
|
$ws = fresh_workspace;
|
||||||
|
|
||||||
is(@{get_ws($ws)->{nodes}}, 0, 'tiling sticky container did not move');
|
is(@{get_ws($ws)->{nodes}}, 0, 'tiling sticky container did not move');
|
||||||
is(@{get_ws($ws)->{floating_nodes}}, 0, 'tiling sticky container did not move');
|
is(@{get_ws($ws)->{floating_nodes}}, 0, 'tiling sticky container did not move');
|
||||||
cmd '[class="findme"] kill';
|
kill_all_windows;
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# 2: Given a sticky floating container, when the workspace is switched, then
|
# 2: Given a sticky floating container, when the workspace is switched, then
|
||||||
# the container moves to the new workspace.
|
# the container moves to the new workspace.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
$ws = fresh_workspace;
|
$ws = fresh_workspace;
|
||||||
open_floating_window(wm_class => 'findme');
|
open_floating_window;
|
||||||
$focused = get_focused($ws);
|
$focused = get_focused($ws);
|
||||||
cmd 'sticky enable';
|
cmd 'sticky enable';
|
||||||
$ws = fresh_workspace;
|
$ws = fresh_workspace;
|
||||||
|
|
||||||
is(@{get_ws($ws)->{floating_nodes}}, 1, 'floating sticky container moved to new workspace');
|
is(@{get_ws($ws)->{floating_nodes}}, 1, 'floating sticky container moved to new workspace');
|
||||||
is(get_focused($ws), $focused, 'sticky container has focus');
|
is(get_focused($ws), $focused, 'sticky container has focus');
|
||||||
cmd '[class="findme"] kill';
|
kill_all_windows;
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# 3: Given two sticky floating containers, when the workspace is switched,
|
# 3: Given two sticky floating containers, when the workspace is switched,
|
||||||
# then both containers move to the new workspace.
|
# then both containers move to the new workspace.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
fresh_workspace;
|
fresh_workspace;
|
||||||
open_floating_window(wm_class => 'findme');
|
open_floating_window;
|
||||||
cmd 'sticky enable';
|
cmd 'sticky enable';
|
||||||
open_floating_window(wm_class => 'findme');
|
open_floating_window;
|
||||||
cmd 'sticky enable';
|
cmd 'sticky enable';
|
||||||
$ws = fresh_workspace;
|
$ws = fresh_workspace;
|
||||||
|
|
||||||
is(@{get_ws($ws)->{floating_nodes}}, 2, 'multiple sticky windows can be used at the same time');
|
is(@{get_ws($ws)->{floating_nodes}}, 2, 'multiple sticky windows can be used at the same time');
|
||||||
cmd '[class="findme"] kill';
|
kill_all_windows;
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# 4: Given an unfocused sticky floating container and a tiling container on the
|
# 4: Given an unfocused sticky floating container and a tiling container on the
|
||||||
|
@ -70,13 +70,13 @@ $ws = fresh_workspace;
|
||||||
open_window;
|
open_window;
|
||||||
$focused = get_focused($ws);
|
$focused = get_focused($ws);
|
||||||
fresh_workspace;
|
fresh_workspace;
|
||||||
open_floating_window(wm_class => 'findme');
|
open_floating_window;
|
||||||
cmd 'sticky enable';
|
cmd 'sticky enable';
|
||||||
open_window;
|
open_window;
|
||||||
cmd 'workspace ' . $ws;
|
cmd 'workspace ' . $ws;
|
||||||
|
|
||||||
is(get_focused($ws), $focused, 'the tiling container has focus');
|
is(get_focused($ws), $focused, 'the tiling container has focus');
|
||||||
cmd '[class="findme"] kill';
|
kill_all_windows;
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# 5: Given a focused sticky floating container and a tiling container on the
|
# 5: Given a focused sticky floating container and a tiling container on the
|
||||||
|
@ -86,13 +86,13 @@ cmd '[class="findme"] kill';
|
||||||
$ws = fresh_workspace;
|
$ws = fresh_workspace;
|
||||||
open_window;
|
open_window;
|
||||||
$tmp = fresh_workspace;
|
$tmp = fresh_workspace;
|
||||||
open_floating_window(wm_class => 'findme');
|
open_floating_window;
|
||||||
$focused = get_focused($tmp);
|
$focused = get_focused($tmp);
|
||||||
cmd 'sticky enable';
|
cmd 'sticky enable';
|
||||||
cmd 'workspace ' . $ws;
|
cmd 'workspace ' . $ws;
|
||||||
|
|
||||||
is(get_focused($ws), $focused, 'the sticky container has focus');
|
is(get_focused($ws), $focused, 'the sticky container has focus');
|
||||||
cmd '[class="findme"] kill';
|
kill_all_windows;
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# 6: Given a floating container on a non-visible workspace, when the window
|
# 6: Given a floating container on a non-visible workspace, when the window
|
||||||
|
@ -100,13 +100,13 @@ cmd '[class="findme"] kill';
|
||||||
# visible workspace.
|
# visible workspace.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
fresh_workspace;
|
fresh_workspace;
|
||||||
open_floating_window(wm_class => 'findme');
|
open_floating_window;
|
||||||
cmd 'mark sticky';
|
cmd 'mark sticky';
|
||||||
$ws = fresh_workspace;
|
$ws = fresh_workspace;
|
||||||
cmd '[con_mark=sticky] sticky enable';
|
cmd '[con_mark=sticky] sticky enable';
|
||||||
|
|
||||||
is(@{get_ws($ws)->{floating_nodes}}, 1, 'the sticky window jumps to the front');
|
is(@{get_ws($ws)->{floating_nodes}}, 1, 'the sticky window jumps to the front');
|
||||||
cmd '[class="findme"] kill';
|
kill_all_windows;
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue