Merge lp:~om26er/unity/update_click_outside_hud_dismiss into lp:unity

Proposed by Omer Akram
Status: Superseded
Proposed branch: lp:~om26er/unity/update_click_outside_hud_dismiss
Merge into: lp:unity
Diff against target: 44 lines (+7/-16)
2 files modified
manual-tests/Hud.txt (+0/-16)
tests/autopilot/unity/tests/test_hud.py (+7/-0)
To merge this branch: bzr merge lp:~om26er/unity/update_click_outside_hud_dismiss
Reviewer Review Type Date Requested Status
Thomi Richards (community) quality Needs Fixing
Review via email: mp+120256@code.launchpad.net

This proposal has been superseded by a proposal from 2012-08-21.

Commit message

Added the manual testcase bits into an already existing AP test. "Hud should close when mouse clicked outside of it"

Description of the change

Added the manual testcase bits into an already existing AP test. "Hud should close when mouse clicked outside of it"

This manual test case it seems is almost automated already, just added the part of typing text in the search bar and removing that with Escape.

If you want me to write a new test case instead of using an already written, I'll happily do that.

To post a comment you must log in.
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

Hi Omer,

Please make this a new autopilot test. Tests should be as small as possible. In fact, if you see any large autopilot tests that can be split up, that's always a good thing to do (in a separate branch, of course).

Cheers,

review: Needs Fixing (quality)

Unmerged revisions

2575. By Omer Akram

update a AP and removed a manual case

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'manual-tests/Hud.txt'
2--- manual-tests/Hud.txt 2012-07-12 12:03:05 +0000
3+++ manual-tests/Hud.txt 2012-08-18 12:21:23 +0000
4@@ -35,22 +35,6 @@
5 If the buttons under the search box do not highlight, this test failed.
6
7
8-Hud Dismiss
9-----------
10-This test ensures that the hud is dismissable
11-
12-Setup:
13-
14-Actions:
15-#. Tap Alt
16-#. Type "test"
17-#. Press escape
18-#. Click anywhere on the screen that is not the hud interface
19-
20-Expected Result:
21- After pressing escape in step three, the text "test" should be removed from the hud search
22- After step four, the hud should dismiss itself and not be present.
23-
24 Alt+Arrow keys not passed to application
25 ----------------------------------------
26 Tests that Alt+ArrowKey events are correctly passed to the active window
27
28=== modified file 'tests/autopilot/unity/tests/test_hud.py'
29--- tests/autopilot/unity/tests/test_hud.py 2012-07-12 02:57:47 +0000
30+++ tests/autopilot/unity/tests/test_hud.py 2012-08-18 12:21:23 +0000
31@@ -230,6 +230,13 @@
32 """
33
34 self.hud.ensure_visible()
35+
36+ self.keyboard.type("Test")
37+ self.assertThat(self.hud.search_string, Eventually(Equals("Test")))
38+
39+ self.keyboard.press_and_release("Escape")
40+ self.assertThat(self.hud.search_string, Eventually(Equals("")))
41+
42 (x,y,w,h) = self.hud.view.geometry
43 self.mouse.move(w/2, h-50)
44 self.mouse.click()