Merge lp:~ken-vandine/dropping-letters/more_than_0_tests into lp:dropping-letters

Proposed by Ken VanDine
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 36
Merged at revision: 36
Proposed branch: lp:~ken-vandine/dropping-letters/more_than_0_tests
Merge into: lp:dropping-letters
Prerequisite: lp:~elopio/dropping-letters/fix1205219-pyflakes
Diff against target: 52 lines (+15/-2)
3 files modified
dropping-letters.qml (+2/-0)
tests/autopilot/dropping_letters_app/emulators/main_window.py (+9/-2)
tests/autopilot/dropping_letters_app/tests/test_dropping_letters.py (+4/-0)
To merge this branch: bzr merge lp:~ken-vandine/dropping-letters/more_than_0_tests
Reviewer Review Type Date Requested Status
Nicholas Skaggs (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+177920@code.launchpad.net

Commit message

Add a test for visibility of the MainView, so we have more than 0 tests

Description of the change

Add a test for visibility of the MainView, so we have more than 0 tests

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

This test is fine as a placeholder :-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dropping-letters.qml'
2--- dropping-letters.qml 2013-07-11 20:38:08 +0000
3+++ dropping-letters.qml 2013-07-31 18:36:30 +0000
4@@ -9,6 +9,8 @@
5
6 MainView {
7 id: mainView
8+ // objectName for functional testing purposes (autopilot-qt5)
9+ objectName: "mainView"
10 applicationName: "dropping-letters"
11 width: units.gu(45) // 48 * 7 + 2 * 7 + 2
12 height: units.gu(65) // 48 * 10 + 2 * 10 + 50
13
14=== modified file 'tests/autopilot/dropping_letters_app/emulators/main_window.py'
15--- tests/autopilot/dropping_letters_app/emulators/main_window.py 2013-07-26 07:33:26 +0000
16+++ tests/autopilot/dropping_letters_app/emulators/main_window.py 2013-07-31 18:36:30 +0000
17@@ -15,8 +15,7 @@
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #
20
21-"""Calendar app autopilot emulators."""
22-
23+"""Dropping Letters app autopilot emulators."""
24
25 class MainWindow(object):
26 """An emulator class that makes it easy to interact with the Dropping
27@@ -24,3 +23,11 @@
28
29 def __init__(self, app):
30 self.app = app
31+
32+ def get_main_view(self):
33+ """Get the main QML view"""
34+ return self.app.select_single("MainView", objectName="mainView")
35+
36+ def get_qml_view(self):
37+ """Get the main QML view"""
38+ return self.app.select_single("QQuickView")
39
40=== modified file 'tests/autopilot/dropping_letters_app/tests/test_dropping_letters.py'
41--- tests/autopilot/dropping_letters_app/tests/test_dropping_letters.py 2013-07-26 07:33:26 +0000
42+++ tests/autopilot/dropping_letters_app/tests/test_dropping_letters.py 2013-07-31 18:36:30 +0000
43@@ -22,5 +22,9 @@
44 self.assertThat(
45 self.main_window.get_qml_view().visible, Eventually(Equals(True)))
46
47+ def test_mainView_visible(self):
48+ self.assertThat(
49+ self.main_window.get_qml_view().visible, Eventually(Equals(True)))
50+
51 def tearDown(self):
52 super(TestMainWindow, self).tearDown()

Subscribers

People subscribed via source and target branches