Merge lp:~unity-team/unity/phablet.test_GenericLensView into lp:unity/phablet

Proposed by Andrea Cimitan
Status: Merged
Approved by: Albert Astals Cid
Approved revision: no longer in the source branch.
Merged at revision: 636
Proposed branch: lp:~unity-team/unity/phablet.test_GenericLensView
Merge into: lp:unity/phablet
Prerequisite: lp:~unity-team/unity/phablet.fake-unity-plugin_categories
Diff against target: 82 lines (+56/-0)
3 files modified
Dash/GenericLensView.qml (+1/-0)
tests/qmltests/CMakeLists.txt (+1/-0)
tests/qmltests/Dash/tst_GenericLensView.qml (+54/-0)
To merge this branch: bzr merge lp:~unity-team/unity/phablet.test_GenericLensView
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Albert Astals Cid (community) Approve
Review via email: mp+160335@code.launchpad.net

This proposal supersedes a proposal from 2013-04-22.

Commit message

Add tests for the GenericLensView

Description of the change

Add tests for the GenericLensView

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote : Posted in a previous version of this proposal

You need to remerge this with trunk UnityTestCase is "gone"

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
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)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Do you think that you could add a test that checks that onMovementStarted the header is shown?

review: Needs Information
Revision history for this message
Andrea Cimitan (cimi) wrote :

> Do you think that you could add a test that checks that onMovementStarted the
> header is shown?

I thought about it, however I'm not sure how I could do that... because it's inside the implementation of LVWPH

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Ok, let's go with this, seems you need to remerge though

Revision history for this message
Andrea Cimitan (cimi) wrote :

ok

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) :
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)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Dash/GenericLensView.qml'
2--- Dash/GenericLensView.qml 2013-02-15 09:49:36 +0000
3+++ Dash/GenericLensView.qml 2013-04-26 10:04:39 +0000
4@@ -86,6 +86,7 @@
5 }
6 pageHeader: PageHeader {
7 id: pageHeader
8+ objectName: "pageHeader"
9 width: categoryView.width
10 text: lensView.lens.name
11 searchEntryEnabled: true
12
13=== modified file 'tests/qmltests/CMakeLists.txt'
14--- tests/qmltests/CMakeLists.txt 2013-04-24 14:21:44 +0000
15+++ tests/qmltests/CMakeLists.txt 2013-04-26 10:04:39 +0000
16@@ -42,6 +42,7 @@
17 add_qml_test(Components Tile)
18 add_qml_test(Components PageHeader)
19 add_qml_test(Dash DashPreview)
20+add_qml_test(Dash GenericLensView IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS})
21 add_qml_test(Dash LensView IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${CMAKE_CURRENT_BINARY_DIR}/plugins)
22 add_qml_test(Dash PeoplePreview)
23 add_qml_test(Dash FilterGrids IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins ${CMAKE_CURRENT_SOURCE_DIR}/plugins)
24
25=== added file 'tests/qmltests/Dash/tst_GenericLensView.qml'
26--- tests/qmltests/Dash/tst_GenericLensView.qml 1970-01-01 00:00:00 +0000
27+++ tests/qmltests/Dash/tst_GenericLensView.qml 2013-04-26 10:04:39 +0000
28@@ -0,0 +1,54 @@
29+/*
30+ * Copyright 2013 Canonical Ltd.
31+ *
32+ * This program is free software; you can redistribute it and/or modify
33+ * it under the terms of the GNU General Public License as published by
34+ * the Free Software Foundation; version 3.
35+ *
36+ * This program is distributed in the hope that it will be useful,
37+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
38+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39+ * GNU General Public License for more details.
40+ *
41+ * You should have received a copy of the GNU General Public License
42+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
43+ */
44+
45+import QtQuick 2.0
46+import QtTest 1.0
47+import Unity 0.1
48+import ".."
49+import "../../../Dash"
50+import Ubuntu.Components 0.1
51+import Unity.Test 0.1 as UT
52+
53+Item {
54+ width: units.gu(120)
55+ height: units.gu(80)
56+
57+ Lenses {
58+ id: lenses
59+ }
60+
61+ GenericLensView {
62+ id: genericLensView
63+ anchors.fill: parent
64+
65+ UT.UnityTestCase {
66+ name: "GenericLensView"
67+ when: lenses.loaded
68+
69+ function init() {
70+ genericLensView.lens = lenses.get(0)
71+ }
72+
73+ function test_isCurrent() {
74+ var pageHeader = findChild(genericLensView, "pageHeader");
75+ genericLensView.isCurrent = true
76+ pageHeader.searchQuery = "test"
77+ genericLensView.isCurrent = false
78+ tryCompare(pageHeader, "searchQuery", "")
79+ }
80+ }
81+ }
82+}

Subscribers

People subscribed via source and target branches

to all changes: