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

Proposed by Andrea Cimitan
Status: Merged
Approved by: Andrea Cimitan
Approved revision: no longer in the source branch.
Merged at revision: 628
Proposed branch: lp:~unity-team/unity/phablet.test_LensView_new
Merge into: lp:unity/phablet
Prerequisite: lp:~unity-team/unity/phablet.fake-unity-plugin_categories
Diff against target: 80 lines (+53/-1)
3 files modified
tests/qmltests/CMakeLists.txt (+1/-0)
tests/qmltests/Dash/tst_LensView.qml (+52/-0)
tests/qmltests/plugins/Unity/fake_lenses.h (+0/-1)
To merge this branch: bzr merge lp:~unity-team/unity/phablet.test_LensView_new
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Albert Astals Cid (community) Approve
Review via email: mp+160108@code.launchpad.net

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

Commit message

Adds test for LensView

Description of the change

Adds test for LensView

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
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

Text conflict in tests/qmltests/plugins/CMakeLists.txt

review: Needs Fixing
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

As discussed on irc

so if you change lens
the new lens has empty searchQuery
then adding the tryCompare to the second one will exercise the timer probbly
because I previously set searchQuery for another lens
I should ideally go back to the initial lens where I set searchQuery and wait for the timer

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

Looks like it needs the categories...

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 :

Not much testing going on, but sure looks good.

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
MichaƂ Sawicz (saviq) wrote :

Please remerge.

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 'tests/qmltests/CMakeLists.txt'
2--- tests/qmltests/CMakeLists.txt 2013-04-23 14:30:35 +0000
3+++ tests/qmltests/CMakeLists.txt 2013-04-24 14:24:27 +0000
4@@ -42,6 +42,7 @@
5 add_qml_test(Components Tile)
6 add_qml_test(Components PageHeader)
7 add_qml_test(Dash DashPreview)
8+add_qml_test(Dash LensView IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${CMAKE_CURRENT_BINARY_DIR}/plugins)
9 add_qml_test(Dash PeoplePreview)
10 add_qml_test(Dash FilterGrids IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/plugins ${CMAKE_CURRENT_SOURCE_DIR}/plugins)
11 add_qml_test(Dash/Apps RunningApplicationsGrid IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
12
13=== added file 'tests/qmltests/Dash/tst_LensView.qml'
14--- tests/qmltests/Dash/tst_LensView.qml 1970-01-01 00:00:00 +0000
15+++ tests/qmltests/Dash/tst_LensView.qml 2013-04-24 14:24:27 +0000
16@@ -0,0 +1,52 @@
17+/*
18+ * Copyright 2013 Canonical Ltd.
19+ *
20+ * This program is free software; you can redistribute it and/or modify
21+ * it under the terms of the GNU General Public License as published by
22+ * the Free Software Foundation; version 3.
23+ *
24+ * This program is distributed in the hope that it will be useful,
25+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
26+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27+ * GNU General Public License for more details.
28+ *
29+ * You should have received a copy of the GNU General Public License
30+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
31+ */
32+
33+import QtQuick 2.0
34+import QtTest 1.0
35+import Unity 0.1
36+import ".."
37+import "../../../Dash"
38+import Ubuntu.Components 0.1
39+
40+Item {
41+ width: units.gu(120)
42+ height: units.gu(80)
43+
44+ Lenses {
45+ id: lenses
46+ }
47+
48+ LensView {
49+ id: lensView
50+ anchors.fill: parent
51+
52+ TestCase {
53+ name: "LensView"
54+ when: lenses.loaded
55+
56+ function init() {
57+ lensView.lens = lenses.get(0)
58+ }
59+
60+ function test_changeLens() {
61+ lensView.lens.searchQuery = "test"
62+ lensView.lens = lenses.get(1)
63+ lensView.lens = lenses.get(0)
64+ tryCompare(lensView.lens, "searchQuery", "")
65+ }
66+ }
67+ }
68+}
69
70=== modified file 'tests/qmltests/plugins/Unity/fake_lenses.h'
71--- tests/qmltests/plugins/Unity/fake_lenses.h 2013-04-18 12:46:46 +0000
72+++ tests/qmltests/plugins/Unity/fake_lenses.h 2013-04-24 14:24:27 +0000
73@@ -54,7 +54,6 @@
74 Q_INVOKABLE void clear();
75 Q_INVOKABLE void load();
76
77-
78 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
79 QHash<int, QByteArray> roleNames() const;
80 QModelIndex parent ( const QModelIndex & index ) const;

Subscribers

People subscribed via source and target branches

to all changes: