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

Subscribers

People subscribed via source and target branches

to all changes: