Merge lp:~aacid/unity-2d/unity-2d_test_dash_launcher_close into lp:unity-2d

Proposed by Albert Astals Cid
Status: Merged
Approved by: Gerry Boland
Approved revision: 897
Merged at revision: 898
Proposed branch: lp:~aacid/unity-2d/unity-2d_test_dash_launcher_close
Merge into: lp:unity-2d
Diff against target: 109 lines (+76/-1)
3 files modified
tests/launcher/autohide_show_tests.rb (+8/-0)
tests/launcher/autohide_show_tests_common.rb (+60/-1)
tests/launcher/autohide_show_tests_rtl.rb (+8/-0)
To merge this branch: bzr merge lp:~aacid/unity-2d/unity-2d_test_dash_launcher_close
Reviewer Review Type Date Requested Status
Gerry Boland Pending
Review via email: mp+91780@code.launchpad.net

Description of the change

[test] Two more tests for launcher behaviour

Check that closing the dash hides the launcher immediately if the mouse is not over it and keeps it open if the mouse is over it

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/launcher/autohide_show_tests.rb'
2--- tests/launcher/autohide_show_tests.rb 2012-02-03 17:55:04 +0000
3+++ tests/launcher/autohide_show_tests.rb 2012-02-07 09:37:23 +0000
4@@ -170,4 +170,12 @@
5 test_launcher_does_not_hide_on_esc_after_alt_f1_with_overlapping_window()
6 end
7
8+ test "Launcher hides immediately on Esc after Super with overlapping window" do
9+ test_launcher_hides_immediatel_on_esc_after_super_with_overlapping_window()
10+ end
11+
12+ test "Launcher does not hide on Esc after Super with overlapping window and mouse on BFB" do
13+ test_launcher_does_not_hide_on_esc_after_Super_with_overlapping_window_mouse_on_bfb()
14+ end
15+
16 end
17
18=== modified file 'tests/launcher/autohide_show_tests_common.rb'
19--- tests/launcher/autohide_show_tests_common.rb 2012-02-03 17:55:04 +0000
20+++ tests/launcher/autohide_show_tests_common.rb 2012-02-07 09:37:23 +0000
21@@ -469,7 +469,7 @@
22 end
23
24 # Test case objectives:
25-# * Launcher does not hide on Esc after Alt+F1 with overlapping window
26+# * Launcher does not hide on Esc after Alt+F1 with overlapping window and mouse on the bfb
27 # Pre-conditions
28 # * Desktop with no running applications
29 # Test steps
30@@ -496,3 +496,62 @@
31 }
32 xid.close!
33 end
34+
35+# Test case objectives:
36+# * Launcher hides immediately on Esc after Alt+F1 with overlapping window
37+# Pre-conditions
38+# * Desktop with no running applications
39+# Test steps
40+# * Move mouse outside the launcher
41+# * Open application in position overlapping Launcher
42+# * Verify Launcher hiding
43+# * Press Super
44+# * Verify Launcher showing
45+# * Press Esc
46+# * Verify Launcher hides in less than 1 second
47+# Post-conditions
48+# * None
49+# References
50+# * None
51+def test_launcher_hides_immediatel_on_esc_after_super_with_overlapping_window
52+ XDo::Mouse.move(300, 300, 0, true)
53+ xid = open_overlapping_window()
54+ verify_launcher_hidden(TIMEOUT, 'Launcher visible with window in the way, should be hidden')
55+ XDo::Keyboard.simulate('{SUPER}')
56+ verify_launcher_visible(TIMEOUT, 'Launcher hidden after pressing Supper, should be visible')
57+ XDo::Keyboard.escape
58+ sleep 0.8
59+ verify_launcher_hidden(0, 'Launcher visible after 0.8 seconds, should be hidden immediately')
60+ xid.close!
61+end
62+
63+# Test case objectives:
64+# * Launcher does not hide on Esc after Super with overlapping window and mouse on the bfb
65+# Pre-conditions
66+# * Desktop with no running applications
67+# Test steps
68+# * Move mouse outside the launcher
69+# * Open application in position overlapping Launcher
70+# * Verify Launcher hiding
71+# * Press Super
72+# * Verify Launcher showing
73+# * Move mouse to the bfb
74+# * Press Esc
75+# * Verify Launcher does not hide
76+# Post-conditions
77+# * None
78+# References
79+# * None
80+def test_launcher_does_not_hide_on_esc_after_Super_with_overlapping_window_mouse_on_bfb
81+ XDo::Mouse.move(300, 300, 0, true)
82+ xid = open_overlapping_window()
83+ verify_launcher_hidden(TIMEOUT, 'Launcher visible with window in the way, should be hidden')
84+ XDo::Keyboard.simulate('{SUPER}')
85+ bfb = @app.LauncherList( :name => 'main' ).LauncherList( :isBfb => true );
86+ bfb.move_mouse()
87+ XDo::Keyboard.escape
88+ verify_not(0, 'Launcher hiding after on Esc after Alt+F1 with mouse over bfb') {
89+ verify_launcher_hidden(2)
90+ }
91+ xid.close!
92+end
93
94=== modified file 'tests/launcher/autohide_show_tests_rtl.rb'
95--- tests/launcher/autohide_show_tests_rtl.rb 2012-02-03 17:55:04 +0000
96+++ tests/launcher/autohide_show_tests_rtl.rb 2012-02-07 09:37:23 +0000
97@@ -171,4 +171,12 @@
98 test_launcher_does_not_hide_on_esc_after_alt_f1_with_overlapping_window()
99 end
100
101+ test "Launcher hides immediately on Esc after Super with overlapping window" do
102+ test_launcher_hides_immediatel_on_esc_after_super_with_overlapping_window()
103+ end
104+
105+ test "Launcher does not hide on Esc after Super with overlapping window and mouse on BFB" do
106+ test_launcher_does_not_hide_on_esc_after_Super_with_overlapping_window_mouse_on_bfb()
107+ end
108+
109 end

Subscribers

People subscribed via source and target branches