Merge lp:~osomon/notes-app/fix-ap-tests-parts into lp:notes-app

Proposed by Olivier Tilloy
Status: Merged
Approved by: Bill Filler
Approved revision: 244
Merged at revision: 242
Proposed branch: lp:~osomon/notes-app/fix-ap-tests-parts
Merge into: lp:notes-app
Diff against target: 39 lines (+6/-6)
1 file modified
tests/autopilot/notes_app/tests/test_parts.py (+6/-6)
To merge this branch: bzr merge lp:~osomon/notes-app/fix-ap-tests-parts
Reviewer Review Type Date Requested Status
Bill Filler (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+201156@code.launchpad.net

Commit message

Ensure the OSK is fully up before interacting with another part of the note,
and use a more reliable way of checking that a note part has been destroyed.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

tested, works

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/notes_app/tests/test_parts.py'
2--- tests/autopilot/notes_app/tests/test_parts.py 2013-12-20 10:30:19 +0000
3+++ tests/autopilot/notes_app/tests/test_parts.py 2014-01-10 10:54:29 +0000
4@@ -104,14 +104,14 @@
5 self.assertThat(
6 lambda: len(self.main_window.get_note_parts(note)),
7 Eventually(Equals(3)))
8+ self.assert_osk_eventually_shown()
9
10 # Now verify that clicking on the upper part of the image will cause
11 # the new text to be deleted because it was empty
12+ empty_part = self.main_window.get_note_parts(note)[-1]
13 self.pointing_device.move(part_x + part_w / 2, part_y + 1)
14 self.pointing_device.click()
15- self.assertThat(
16- lambda: len(self.main_window.get_note_parts(note)),
17- Eventually(Equals(2)))
18+ empty_part.wait_until_destroyed()
19
20 def test_parts_delete_empty_header(self):
21 header = self.main_window.get_header()
22@@ -130,14 +130,14 @@
23 self.assertThat(
24 lambda: len(self.main_window.get_note_parts(note)),
25 Eventually(Equals(3)))
26+ self.assert_osk_eventually_shown()
27
28 # Now verify that clicking on the header (thus collapsing the
29 # expanded note) will still cause the new part to disappear
30+ empty_part = self.main_window.get_note_parts(note)[-1]
31 self.pointing_device.click_object(header)
32 self.assert_note_eventually_collapsed(note)
33- self.assertThat(
34- lambda: len(self.main_window.get_note_parts(note)),
35- Eventually(Equals(2)))
36+ empty_part.wait_until_destroyed()
37
38 def test_parts_no_delete_with_text(self):
39 header = self.main_window.get_header()

Subscribers

People subscribed via source and target branches