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

Proposed by Albert Astals Cid
Status: Merged
Approved by: Gerry Boland
Approved revision: 880
Merged at revision: 884
Proposed branch: lp:~aacid/unity-2d/unity-2d_test_use_bfb_instead_of_dash_home_text
Merge into: lp:unity-2d
Diff against target: 41 lines (+3/-10)
2 files modified
tests/launcher/autohide_show_tests.rb (+2/-6)
tests/launcher/visual_verification.rb (+1/-4)
To merge this branch: bzr merge lp:~aacid/unity-2d/unity-2d_test_use_bfb_instead_of_dash_home_text
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Review via email: mp+90888@code.launchpad.net

Description of the change

[tests] Use a way to get the bfb that works on other locales

To post a comment you must log in.
Revision history for this message
Lohith D Shivamurthy (dyams) wrote :

They look good to me. But when i ran the tests i had
12 tests, 3 assertions, 1 failures, 4 errors

1) Error:
test_Move_window_positioning_to_check_launcher_action(Launcher_Autohide_and_Show_Tests):
MobyBase::BehaviourError: Run failed. Failed to launch application. Exception: The application with Id 8296 is no longer available.

2) Error: same error
test_Reveal_hidden_Launcher_with_mouse(Launcher_Autohide_and_Show_Tests):

3) Error:
test_Hold_Super_key_down_to_reveal_launcher_and_shortcut_keys(Launcher_Autohide_and_Show_Tests):

4) Error: same error
test_Press_Alt_F1_to_focus_Launcher(Launcher_Autohide_and_Show_Tests):

5) Failure :
test_Launcher_hide_delay_on_tile_removal(Launcher_Autohide_and_Show_Tests)
Details:
#<MobyBase::TestObjectNotFoundError: Cannot find object with rule:
{:running=>"false", :desktopFile=>/^.*.desktop$/}>

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

You probably get the same errors without my changes? My changes are not even in the tests that failed for you

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

Yep, those errors are unrelated.

We could do with a localisation-free way of identifying tiles in general. Either setting an objectName with the unlocalised application name, or derive it from the .desktop file name.

But this is a good fix for the BFB. Thanks!

review: Approve

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-01-26 12:54:51 +0000
3+++ tests/launcher/autohide_show_tests.rb 2012-01-31 15:43:25 +0000
4@@ -291,9 +291,7 @@
5 @app.Unity2dPanel()['x_absolute'].to_i
6 }
7 verify_equal( 'true', TIMEOUT, 'Dash icon not highlighted after Alt+F1 pressed' ){
8- @app.LauncherList( :name => 'main' ) \
9- .QDeclarativeItem( :name => 'Dash home' ) \
10- .QDeclarativeImage( :name => 'selectionOutline' )['visible']
11+ @app.LauncherList( :name => 'main' ).LauncherList( :isBfb => true ).QDeclarativeImage( :name => 'selectionOutline' )['visible']
12 }
13
14 XDo::Keyboard.escape
15@@ -336,9 +334,7 @@
16 @app.Unity2dPanel()['x_absolute'].to_i
17 }
18 verify_equal( 'true', TIMEOUT, 'Dash icon not highlighted after Alt+F1 pressed' ) {
19- @app.LauncherList( :name => 'main' ) \
20- .QDeclarativeItem( :name => 'Dash home' ) \
21- .QDeclarativeImage( :name => 'selectionOutline' )['visible']
22+ @app.LauncherList( :name => 'main' ).LauncherList( :isBfb => true ).QDeclarativeImage( :name => 'selectionOutline' )['visible']
23 }
24 assert_not_equal( xid.id, XDo::XWindow.active_window, \
25 'terminal has focus when it should be in the launcher' )
26
27=== modified file 'tests/launcher/visual_verification.rb'
28--- tests/launcher/visual_verification.rb 2012-01-23 16:38:29 +0000
29+++ tests/launcher/visual_verification.rb 2012-01-31 15:43:25 +0000
30@@ -59,10 +59,7 @@
31 test "Visually compare Dash tile with reference" do
32 expected_image = pwd + 'verification/dash-tile.png'
33
34- dash_tile = @app.Unity2dPanel() \
35- .LauncherList( :name => 'main' ) \
36- .QDeclarativeItem( :name => 'Dash home' ) \
37- .QDeclarativeItem()
38+ dash_tile = @app.LauncherList( :name => 'main' ).LauncherList( :isBfb => true ).QDeclarativeItem()
39
40 #Check tile visual matches reference image, with some tolerance.
41 assert( dash_tile.find_on_screen(expected_image, 4), \

Subscribers

People subscribed via source and target branches