]> git.sur5r.net Git - i3/i3/blob - testcases/t/206-fullscreen-scratchpad.t
Merge branch 'next' into master
[i3/i3] / testcases / t / 206-fullscreen-scratchpad.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Please read the following documents before working on tests:
5 # • https://build.i3wm.org/docs/testsuite.html
6 #   (or docs/testsuite)
7 #
8 # • https://build.i3wm.org/docs/lib-i3test.html
9 #   (alternatively: perldoc ./testcases/lib/i3test.pm)
10 #
11 # • https://build.i3wm.org/docs/ipc.html
12 #   (or docs/ipc)
13 #
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 #   (unless you are already familiar with Perl)
16 #
17 #   Assure that no window is in fullscreen mode after showing a scratchpad window
18 # Bug still in: 4.5.1-54-g0f6b5fe
19
20 use i3test;
21
22 my $tmp = fresh_workspace;
23
24 ##########################################################################################
25 # map two windows in one container, fullscreen one of them and then move it to scratchpad
26 ##########################################################################################
27
28 my $first_win = open_window;
29 my $second_win = open_window;
30
31 # fullscreen the focused window
32 cmd 'fullscreen';
33
34 # see if the window really is in fullscreen mode
35 is_num_fullscreen($tmp, 1, 'amount of fullscreen windows after enabling fullscreen');
36
37 # move window to scratchpad
38 cmd 'move scratchpad';
39
40 ###############################################################################
41 # show the scratchpad window again; it should not be in fullscreen mode anymore
42 ###############################################################################
43
44 # show window from scratchpad
45 cmd 'scratchpad show';
46
47 # switch window back to tiling mode
48 cmd 'floating toggle';
49
50 # see if no window is in fullscreen mode
51 is_num_fullscreen($tmp, 0, 'amount of fullscreen windows after showing previously fullscreened scratchpad window');
52
53 ########################################################################################
54 # move a window to scratchpad, focus parent container, make it fullscreen, focus a child
55 ########################################################################################
56
57 # make layout tabbed
58 cmd 'layout tabbed';
59
60 # move one window to scratchpad
61 cmd 'move scratchpad';
62
63 # focus parent
64 cmd 'focus parent';
65
66 # fullscreen the container
67 cmd 'fullscreen';
68
69 # focus child
70 cmd 'focus child';
71
72 # see if the window really is in fullscreen mode
73 is_num_fullscreen($tmp, 1, 'amount of fullscreen windows after enabling fullscreen on parent');
74
75 ##########################################################################
76 # show a scratchpad window; no window should be in fullscreen mode anymore
77 ##########################################################################
78
79 # show the scratchpad window
80 cmd 'scratchpad show';
81
82 # see if no window is in fullscreen mode
83 is_num_fullscreen($tmp, 0, 'amount of fullscreen windows after showing a scratchpad window while a parent container was in fullscreen mode');
84
85 done_testing;