Merge lp:~canonical-platform-qa/camera-app/fix-ap-tests into lp:camera-app

Proposed by Chris Gagnon
Status: Merged
Approved by: Florian Boucault
Approved revision: 425
Merged at revision: 426
Proposed branch: lp:~canonical-platform-qa/camera-app/fix-ap-tests
Merge into: lp:camera-app
Diff against target: 42 lines (+10/-2)
1 file modified
tests/autopilot/camera_app/tests/__init__.py (+10/-2)
To merge this branch: bzr merge lp:~canonical-platform-qa/camera-app/fix-ap-tests
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Florian Boucault (community) Approve
Omer Akram (community) Approve
Canonical Platform QA Team Pending
Review via email: mp+241965@code.launchpad.net

Commit message

wait at beginning of autopilot tests to work around bug #1373039

To post a comment you must log in.
424. By Chris Gagnon

add date and more reasons for sleep

Revision history for this message
Omer Akram (om26er) wrote :

Thanks for fixing the comment based on IRC conversation. One last change, see in-line comment.

review: Needs Fixing
Revision history for this message
Omer Akram (om26er) :
425. By Chris Gagnon

use ap wait_for instead of testtools

Revision history for this message
Omer Akram (om26er) wrote :

Thanks, all tests pass on my desktop and code looks good too.

review: Approve
Revision history for this message
Florian Boucault (fboucault) wrote :

Looks good to me!

review: Approve
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: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/camera_app/tests/__init__.py'
2--- tests/autopilot/camera_app/tests/__init__.py 2014-10-13 15:49:33 +0000
3+++ tests/autopilot/camera_app/tests/__init__.py 2014-11-17 14:28:07 +0000
4@@ -8,6 +8,7 @@
5 """Camera-app autopilot tests."""
6
7 import os
8+import time
9
10 from autopilot.input import Mouse, Touch, Pointer
11 from autopilot.platform import model
12@@ -15,7 +16,7 @@
13
14 from camera_app.emulators.main_window import MainWindow
15 from camera_app.emulators.baseemulator import CameraCustomProxyObjectBase
16-from camera_app.emulators.panel import Panel
17+
18
19 class CameraAppTestCase(AutopilotTestCase):
20
21@@ -41,6 +42,12 @@
22 else:
23 self.launch_click_installed()
24
25+ # wait and sleep as workaround for bug #1373039. To
26+ # make sure large components get loaded asynchronously on start-up
27+ # -- Chris Gagnon 11-17-2014
28+ self.main_window.get_qml_view().visible.wait_for(True)
29+ time.sleep(5)
30+
31 def launch_test_local(self):
32 self.app = self.launch_test_application(
33 self.local_location,
34@@ -55,7 +62,8 @@
35 self.app = self.launch_test_application(
36 "camera-app",
37 "--fullscreen",
38- "--desktop_file_hint=/usr/share/applications/camera-app.desktop",
39+ "--desktop_file_hint="
40+ "/usr/share/applications/camera-app.desktop",
41 app_type='qt',
42 emulator_base=CameraCustomProxyObjectBase)
43

Subscribers

People subscribed via source and target branches