~unity-2d-team/unity-2d/fix-failing-ctests

« back to all changes in this revision

Viewing changes to tests/launcher/autohide_show_tests_common.rb

Test for bug regarding Auto Hide and moving the mouse to the launcher after it has been shown because of focus. Fixes: . Approved by .

Show diffs side-by-side

added added

removed removed

Lines of Context:
555
555
  }
556
556
  xid.close!
557
557
end
 
558
 
 
559
# Test case objectives:
 
560
# * Auto Hide: Launcher does not hide on Esc after Alt+F1 with mouse on the bfb
 
561
# Pre-conditions
 
562
# * Desktop with no running applications
 
563
# Test steps
 
564
# * Set hide-mode to 1
 
565
# * Move mouse outside the launcher
 
566
# * Verify Launcher hiding
 
567
# * Press Alt+F1
 
568
# * Verify Launcher showing
 
569
# * Move mouse to the bfb
 
570
# * Press Esc
 
571
# * Verify Launcher does not hide
 
572
# Post-conditions
 
573
# * None
 
574
# References
 
575
# * None
 
576
def test_auto_hide_launcher_does_not_hide_on_esc_after_alt_f1_mouse_on_bfb
 
577
  $SUT.execute_shell_command 'gsettings set com.canonical.Unity2d.Launcher hide-mode 1'
 
578
  XDo::Mouse.move(300, 300, 0, true)
 
579
  verify_launcher_hidden(TIMEOUT, 'Launcher visible, should be hidden')
 
580
  XDo::Keyboard.alt_F1 #Must use uppercase F to indicate function keys
 
581
  verify_launcher_visible(TIMEOUT, 'Launcher hidden, should be visible')
 
582
  bfb = @app.LauncherList( :name => 'main' ).LauncherList( :isBfb => true );
 
583
  bfb.move_mouse()
 
584
  XDo::Keyboard.escape
 
585
  verify_not(0, 'Launcher hiding after on Esc after Alt+F1 with mouse over bfb') {
 
586
    verify_launcher_hidden(2)
 
587
  }
 
588
end