Merge lp:~canonical-platform-qa/autopilot/tests_for_known_apps into lp:autopilot

Proposed by Leo Arias on 2015-01-15
Status: Merged
Merged at revision: 521
Proposed branch: lp:~canonical-platform-qa/autopilot/tests_for_known_apps
Merge into: lp:autopilot
Diff against target: 38 lines (+20/-1)
1 file modified
autopilot/tests/functional/test_process_emulator.py (+20/-1)
To merge this branch: bzr merge lp:~canonical-platform-qa/autopilot/tests_for_known_apps
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing on 2015-01-19
Thomi Richards (community) 2015-01-15 Approve on 2015-01-19
Nicholas Skaggs (community) Approve on 2015-01-16
Richard Huddie (community) Approve on 2015-01-16
Review via email: mp+246531@code.launchpad.net

Commit Message

Added tests to open all the known apps.

To post a comment you must log in.
Richard Huddie (rhuddie) wrote :

I've tried to run the new test, using updated ProcessManager.KNOWN_APPS from lp:~canonical-platform-qa/autopilot/fix1411096-update_desktop. But I get failures for Calculator and System Settings, as seen in Jenkins: https://jenkins.qa.ubuntu.com/job/generic-mediumtests-vivid-autopilot/15/artifact/results/autopilot/results/test_python3_autopilot.xml

Richard Huddie (rhuddie) wrote :

My environment was getting KNOWN_APPS from installed /usr/lib/python so was failing due to using the old values for desktop file. The test passes now it is using the updated version. So setting to approved.

review: Approve
Nicholas Skaggs (nskaggs) wrote :

Approved, with comment. I don't think it makes sense to invest time to improve this. Perhaps even if could be argued to drop it at some point.

review: Approve
Thomi Richards (thomir) wrote :

+1 from me, if CI passes.

review: Approve
522. By Leo Arias on 2015-01-19

Used start app window instead.

523. By Leo Arias on 2015-01-19

Only check that the app is not none.

524. By Leo Arias on 2015-01-19

Also check the desktop file.

525. By Leo Arias on 2015-01-19

Reverted the last commit.

Leo Arias (elopio) wrote :

thomi, CI will pass this on utopic, not on vivid.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'autopilot/tests/functional/test_process_emulator.py'
2--- autopilot/tests/functional/test_process_emulator.py 2014-10-22 17:23:02 +0000
3+++ autopilot/tests/functional/test_process_emulator.py 2015-01-19 17:24:04 +0000
4@@ -1,7 +1,7 @@
5 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
6 #
7 # Autopilot Functional Test Tool
8-# Copyright (C) 2012-2014 Canonical
9+# Copyright (C) 2012, 2013, 2014, 2015 Canonical
10 #
11 # This program is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13@@ -119,6 +119,25 @@
14 self.assertThat(list(window.geometry), Equals(proxy_window.geometry))
15
16
17+@skipIf(model() != "Desktop", "Not suitable for device (ProcManager)")
18+class StartKnowAppsTests(AutopilotTestCase):
19+
20+ scenarios = [
21+ (app_name, {
22+ 'app_name': app_name,
23+ 'desktop_file': (
24+ ProcessManager.KNOWN_APPS[app_name]['desktop-file'])
25+ })
26+ for app_name in ProcessManager.KNOWN_APPS
27+ ]
28+
29+ def test_start_app_window(self):
30+ """Ensure we can start all the known applications."""
31+ app = self.process_manager.start_app_window(self.app_name, locale='C')
32+
33+ self.assertThat(app, NotEquals(None))
34+
35+
36 class ProcessManagerApplicationNoCleanupTests(AutopilotTestCase):
37 """Testing the process manager without the automated cleanup that running
38 within as an AutopilotTestCase provides.

Subscribers

People subscribed via source and target branches