]> git.sur5r.net Git - i3/i3/blob - testcases/t/299-regress-scratchpad-focus.t
504ecd32dc35b6ea2f74665e40d7d238fc802a5d
[i3/i3] / testcases / t / 299-regress-scratchpad-focus.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 # Regression test: verify that a scratchpad container that was open in another
18 # workspace and is moved to the current workspace after a 'scratchpad show' is
19 # focused.
20 # Ticket: #3361
21 # Bug still in: 4.15-190-g4b3ff9cd
22 use i3test;
23
24 my $expected_focus = open_window;
25 cmd 'move to scratchpad';
26 cmd 'scratchpad show';
27 my $ws = fresh_workspace;
28 open_window;
29 cmd 'scratchpad show';
30 sync_with_i3;
31 is($x->input_focus, $expected_focus->id, 'scratchpad window brought from other workspace is focused');
32
33 done_testing;