X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=testcases%2Ft%2F206-fullscreen-scratchpad.t;h=95245099332f991f736f36868a74d591c62f5ac4;hb=759e05137467c6f768a3164de9fe783e1a37aece;hp=c098f23fbe6e7036a27fe5185216859cf4ea729c;hpb=2592c63603081dd44c7bccf6014b55a253e14003;p=i3%2Fi3 diff --git a/testcases/t/206-fullscreen-scratchpad.t b/testcases/t/206-fullscreen-scratchpad.t index c098f23f..95245099 100644 --- a/testcases/t/206-fullscreen-scratchpad.t +++ b/testcases/t/206-fullscreen-scratchpad.t @@ -21,15 +21,6 @@ use i3test; my $tmp = fresh_workspace; -sub fullscreen_windows { - my $ws = $tmp; - $ws = shift if @_; - - my $nodes = scalar grep { $_->{fullscreen_mode} != 0 } @{get_ws_content($ws)->[0]->{nodes}}; - my $cons = scalar grep { $_->{fullscreen_mode} != 0 } @{get_ws_content($ws)}; - return $nodes + $cons; -} - ########################################################################################## # map two windows in one container, fullscreen one of them and then move it to scratchpad ########################################################################################## @@ -41,7 +32,7 @@ my $second_win = open_window; cmd 'fullscreen'; # see if the window really is in fullscreen mode -is(fullscreen_windows(), 1, 'amount of fullscreen windows after enabling fullscreen'); +is_num_fullscreen($tmp, 1, 'amount of fullscreen windows after enabling fullscreen'); # move window to scratchpad cmd 'move scratchpad'; @@ -57,7 +48,7 @@ cmd 'scratchpad show'; cmd 'floating toggle'; # see if no window is in fullscreen mode -is(fullscreen_windows(), 0, 'amount of fullscreen windows after showing previously fullscreened scratchpad window'); +is_num_fullscreen($tmp, 0, 'amount of fullscreen windows after showing previously fullscreened scratchpad window'); ######################################################################################## # move a window to scratchpad, focus parent container, make it fullscreen, focus a child @@ -79,7 +70,7 @@ cmd 'fullscreen'; cmd 'focus child'; # see if the window really is in fullscreen mode -is(fullscreen_windows(), 1, 'amount of fullscreen windows after enabling fullscreen on parent'); +is_num_fullscreen($tmp, 1, 'amount of fullscreen windows after enabling fullscreen on parent'); ########################################################################## # show a scratchpad window; no window should be in fullscreen mode anymore @@ -89,6 +80,6 @@ is(fullscreen_windows(), 1, 'amount of fullscreen windows after enabling fullscr cmd 'scratchpad show'; # see if no window is in fullscreen mode -is(fullscreen_windows(), 0, 'amount of fullscreen windows after showing a scratchpad window while a parent container was in fullscreen mode'); +is_num_fullscreen($tmp, 0, 'amount of fullscreen windows after showing a scratchpad window while a parent container was in fullscreen mode'); done_testing;