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

Proposed by Albert Astals Cid
Status: Merged
Approved by: Gerry Boland
Approved revision: 869
Merged at revision: 868
Proposed branch: lp:~aacid/unity-2d/unity-2d_test_launcher_pushes_itself
Merge into: lp:unity-2d
Diff against target: 34 lines (+26/-0)
1 file modified
tests/launcher/always_visible_tests.rb (+26/-0)
To merge this branch: bzr merge lp:~aacid/unity-2d/unity-2d_test_launcher_pushes_itself
Reviewer Review Type Date Requested Status
Gerry Boland (community) Needs Fixing
Michał Sawicz functional Approve
Review via email: mp+90095@code.launchpad.net

Description of the change

[test] Check the Launcher does not push itself

To post a comment you must log in.
Revision history for this message
Michał Sawicz (saviq) :
review: Approve (functional)
Revision history for this message
Gerry Boland (gerboland) wrote :

Please don't use "system", use $SUT.execute_shell_command

Otherwise good. We need to figure out simpler way to write these nested verify calls :)

review: Needs Fixing
Revision history for this message
Albert Astals Cid (aacid) wrote :

Fixed, sorry copy&pasted from wrong branch

869. By Albert Astals Cid

do not use system but execute_shell_command

Revision history for this message
Gerry Boland (gerboland) wrote :

Thank you!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/launcher/always_visible_tests.rb'
2--- tests/launcher/always_visible_tests.rb 2012-01-24 14:54:32 +0000
3+++ tests/launcher/always_visible_tests.rb 2012-01-25 16:14:24 +0000
4@@ -95,4 +95,30 @@
5 }
6 xid.close!
7 end
8+
9+ # Test case objectives:
10+ # * Check the Launcher does not push itself
11+ # Pre-conditions
12+ # * Desktop with no running applications
13+ # Test steps
14+ # * Set the visibility behaviour to intellihide
15+ # * Verify launcher x is 0
16+ # * Set the visibility behaviour to always visible
17+ # * Verify launcher x is not different than 0 for 1 continued second
18+ # Post-conditions
19+ # * None
20+ # References
21+ # * None
22+ test "Launcher does not push itself" do
23+ $SUT.execute_shell_command 'gsettings set com.canonical.Unity2d.Launcher hide-mode 2'
24+ verify_equal( 0, TIMEOUT, 'Launcher hiding on empty desktop, should be visible' ) {
25+ @app.Launcher()['x_absolute'].to_i
26+ }
27+ $SUT.execute_shell_command 'gsettings set com.canonical.Unity2d.Launcher hide-mode 0'
28+ verify_not(0, 'Launcher x should be 0 after setting the always visible mode') {
29+ verify_true( 1 ) {
30+ @app.Launcher()['x_absolute'].to_i != 0
31+ }
32+ }
33+ end
34 end

Subscribers

People subscribed via source and target branches