Merge lp:~unity-team/unity8/unity8.preview_image into lp:unity8

Proposed by Andrea Cimitan
Status: Superseded
Proposed branch: lp:~unity-team/unity8/unity8.preview_image
Merge into: lp:unity8
Prerequisite: lp:~aacid/unity8/image_gallery_preview_widget
Diff against target: 286 lines (+204/-6)
8 files modified
qml/Dash/Previews/PreviewHeader.qml (+38/-0)
qml/Dash/Previews/PreviewWidgetFactory.qml (+4/-2)
qml/Dash/Previews/PreviewZoomableImage.qml (+41/-0)
tests/qmltests/CMakeLists.txt (+2/-0)
tests/qmltests/Dash/Previews/tst_PreviewHeader.qml (+56/-0)
tests/qmltests/Dash/Previews/tst_PreviewImageGallery.qml (+2/-2)
tests/qmltests/Dash/Previews/tst_PreviewWidgetFactory.qml (+4/-2)
tests/qmltests/Dash/Previews/tst_PreviewZoomableImage.qml (+57/-0)
To merge this branch: bzr merge lp:~unity-team/unity8/unity8.preview_image
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Michal Hruby (community) Needs Fixing
Review via email: mp+205757@code.launchpad.net

This proposal has been superseded by a proposal from 2014-02-12.

Commit message

Add PreviewImage

Description of the change

Add PreviewImage, since I was there I changed name of PreviewImageGallery test

 * Are there any related MPs required for this MP to build/function as expected? Please list.
no
 * Did you perform an exploratory manual test run of your code change and any related functionality?
obviously
 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?
 * If you changed the UI, has there been a design review?
not on production yet

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:683
http://jenkins.qa.ubuntu.com/job/unity8-ci/2291/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3112
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2808
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1161
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/812
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/815
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/815/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/812
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2735
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3114
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3114/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2810
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2810/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5222
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/3831

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2291/rebuild

review: Needs Fixing (continuous-integration)
684. By Andrea Cimitan

Renamed preview image

685. By Andrea Cimitan

changed anchors

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:684
http://jenkins.qa.ubuntu.com/job/unity8-ci/2292/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3115
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2810
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1162/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/813
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/816
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/816/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/813
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2737
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3117
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3117/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2812
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2812/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5223
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/3832

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2292/rebuild

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

PASSED: Continuous integration, rev:685
http://jenkins.qa.ubuntu.com/job/unity8-ci/2293/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3120
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2813
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1163
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/814
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/817
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/817/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/814
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2741
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3122
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3122/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2815
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2815/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5225
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/3834

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2293/rebuild

review: Approve (continuous-integration)
Revision history for this message
Michal Hruby (mhr3) wrote :

Please add the missing switch case to PreviewWidgetFactory.qml

review: Needs Fixing
686. By Andrea Cimitan

Merged trunk and added remaining switch case to preview widget factory

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:686
http://jenkins.qa.ubuntu.com/job/unity8-ci/2299/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3151
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2836
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1169
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/820
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/824
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/824/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/820
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2769
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3153
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3153/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2838
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2838/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5246
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/3861

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2299/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :
687. By Andrea Cimitan

Merged and fixed

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:687
http://jenkins.qa.ubuntu.com/job/unity8-ci/2302/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty/3157
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-trusty-touch/2842
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-trusty/1172
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-amd64-ci/823
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/827
        deb: http://jenkins.qa.ubuntu.com/job/unity8-trusty-armhf-ci/827/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-trusty-i386-ci/823
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-trusty/2775
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3159
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-amd64/3159/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2844
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-trusty-armhf/2844/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/5252
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/3867

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/2302/rebuild

review: Needs Fixing (continuous-integration)

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'qml/Dash/Previews/PreviewHeader.qml'
2--- qml/Dash/Previews/PreviewHeader.qml 1970-01-01 00:00:00 +0000
3+++ qml/Dash/Previews/PreviewHeader.qml 2014-02-12 11:11:51 +0000
4@@ -0,0 +1,38 @@
5+/*
6+ * Copyright (C) 2014 Canonical, Ltd.
7+ *
8+ * This program is free software; you can redistribute it and/or modify
9+ * it under the terms of the GNU General Public License as published by
10+ * the Free Software Foundation; version 3.
11+ *
12+ * This program is distributed in the hope that it will be useful,
13+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+ * GNU General Public License for more details.
16+ *
17+ * You should have received a copy of the GNU General Public License
18+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
19+ */
20+
21+import QtQuick 2.0
22+import "../"
23+
24+/*! This preview widget shows a header that is the same as the card header
25+ * The title comes in widgetData["title"]
26+ * The mascot comes in widgetData["mascot"]
27+ * The subtitle comes in widgetData["subtitle"]
28+ */
29+
30+PreviewWidget {
31+ id: root
32+
33+ height: childrenRect.height
34+
35+ CardHeader {
36+ objectName: "cardHeader"
37+ mascot: root.widgetData["mascot"] || ""
38+ title: root.widgetData["title"] || ""
39+ subtitle: root.widgetData["subtitle"] || ""
40+ width: parent.width
41+ }
42+}
43\ No newline at end of file
44
45=== modified file 'qml/Dash/Previews/PreviewWidgetFactory.qml'
46--- qml/Dash/Previews/PreviewWidgetFactory.qml 2014-02-07 09:58:04 +0000
47+++ qml/Dash/Previews/PreviewWidgetFactory.qml 2014-02-12 11:11:51 +0000
48@@ -42,10 +42,12 @@
49 //! \cond private
50 property url widgetSource: {
51 switch (widgetType) {
52+ case "actions": return "PreviewActions.qml";
53 case "audio": return "PreviewAudioPlayback.qml";
54+ case "gallery": return "PreviewImageGallery.qml";
55+ case "header": return "PreviewHeader.qml";
56+ case "image": return "PreviewZoomableImage.qml"
57 case "text": return "PreviewTextSummary.qml";
58- case "gallery": return "PreviewImageGallery.qml";
59- case "actions": return "PreviewActions.qml";
60 default: return "";
61 }
62 }
63
64=== added file 'qml/Dash/Previews/PreviewZoomableImage.qml'
65--- qml/Dash/Previews/PreviewZoomableImage.qml 1970-01-01 00:00:00 +0000
66+++ qml/Dash/Previews/PreviewZoomableImage.qml 2014-02-12 11:11:51 +0000
67@@ -0,0 +1,41 @@
68+/*
69+ * Copyright (C) 2014 Canonical, Ltd.
70+ *
71+ * This program is free software; you can redistribute it and/or modify
72+ * it under the terms of the GNU General Public License as published by
73+ * the Free Software Foundation; version 3.
74+ *
75+ * This program is distributed in the hope that it will be useful,
76+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
77+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
78+ * GNU General Public License for more details.
79+ *
80+ * You should have received a copy of the GNU General Public License
81+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
82+ */
83+
84+import QtQuick 2.0
85+import Ubuntu.Components 0.1
86+import "../../Components"
87+
88+/*! \brief Preview widget for image.
89+
90+ This widget shows image contained in widgetData["source"],
91+ can be zoomable accordingly with widgetData["zoomable"].
92+ */
93+
94+PreviewWidget {
95+ id: root
96+ implicitHeight: units.gu(22)
97+
98+ LazyImage {
99+ objectName: "image"
100+ anchors {
101+ top: parent.top
102+ bottom: parent.bottom
103+ }
104+ scaleTo: "height"
105+ source: widgetData["source"]
106+ initialWidth: units.gu(13)
107+ }
108+}
109
110=== modified file 'tests/qmltests/CMakeLists.txt'
111--- tests/qmltests/CMakeLists.txt 2014-02-07 10:46:06 +0000
112+++ tests/qmltests/CMakeLists.txt 2014-02-12 11:11:51 +0000
113@@ -60,7 +60,9 @@
114 add_qml_test(Dash/Previews PreviewActions IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
115 add_qml_test(Dash/Previews PreviewAudioPlayback IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
116 add_qml_test(Dash/Previews PreviewImageGallery IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
117+add_qml_test(Dash/Previews PreviewHeader IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
118 add_qml_test(Dash/Previews PreviewTextSummary IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
119+add_qml_test(Dash/Previews PreviewZoomableImage IMPORT_PATHS ${qmltest_DEFAULT_IMPORT_PATHS} ${CMAKE_BINARY_DIR}/tests/mocks)
120 add_qml_test(Greeter Lockscreen IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
121 PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/tests/mocks/libusermetrics:${CMAKE_BINARY_DIR}/tests/mocks/LightDM/full")
122 add_qml_test(Greeter Tablet IMPORT_PATHS ${CMAKE_BINARY_DIR}/plugins ${qmltest_DEFAULT_IMPORT_PATHS}
123
124=== added file 'tests/qmltests/Dash/Previews/tst_PreviewHeader.qml'
125--- tests/qmltests/Dash/Previews/tst_PreviewHeader.qml 1970-01-01 00:00:00 +0000
126+++ tests/qmltests/Dash/Previews/tst_PreviewHeader.qml 2014-02-12 11:11:51 +0000
127@@ -0,0 +1,56 @@
128+/*
129+ * Copyright 2014 Canonical Ltd.
130+ *
131+ * This program is free software; you can redistribute it and/or modify
132+ * it under the terms of the GNU General Public License as published by
133+ * the Free Software Foundation; version 3.
134+ *
135+ * This program is distributed in the hope that it will be useful,
136+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
137+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
138+ * GNU General Public License for more details.
139+ *
140+ * You should have received a copy of the GNU General Public License
141+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
142+ */
143+
144+import QtQuick 2.0
145+import QtTest 1.0
146+import "../../../../qml/Dash/Previews"
147+import Unity.Test 0.1 as UT
148+
149+Rectangle {
150+ id: root
151+ width: units.gu(60)
152+ height: units.gu(80)
153+
154+ property var headerjson: {
155+ "title": "THE TITLE",
156+ "subtitle": "Something catchy",
157+ "mascot": "../graphics/play_button.png"
158+ }
159+
160+ PreviewHeader {
161+ id: previewHeader
162+ widgetData: headerjson
163+ width: units.gu(30)
164+
165+ Rectangle {
166+ anchors.fill: parent
167+ color: "red"
168+ opacity: 0.1
169+ }
170+ }
171+
172+ UT.UnityTestCase {
173+ name: "PreviewHeaderTest"
174+ when: windowShown
175+
176+ function test_json() {
177+ var cardHeader = findChild(previewHeader, "cardHeader");
178+ compare(cardHeader.title, "THE TITLE");
179+ compare(cardHeader.subtitle, "Something catchy");
180+ compare(cardHeader.mascot.toString().slice(-24), "graphics/play_button.png");
181+ }
182+ }
183+}
184
185=== modified file 'tests/qmltests/Dash/Previews/tst_PreviewImageGallery.qml'
186--- tests/qmltests/Dash/Previews/tst_PreviewImageGallery.qml 2014-02-05 08:48:43 +0000
187+++ tests/qmltests/Dash/Previews/tst_PreviewImageGallery.qml 2014-02-12 11:11:51 +0000
188@@ -23,7 +23,7 @@
189 id: root
190 width: units.gu(60)
191 height: units.gu(80)
192- color: "grey"
193+ color: "lightgrey"
194
195 property var sourcesModel0: {
196 "sources": []
197@@ -44,7 +44,7 @@
198 }
199
200 UT.UnityTestCase {
201- name: "ImageGalleryTest"
202+ name: "PreviewImageGalleryTest"
203 when: windowShown
204
205 function test_changeEmptyModel() {
206
207=== modified file 'tests/qmltests/Dash/Previews/tst_PreviewWidgetFactory.qml'
208--- tests/qmltests/Dash/Previews/tst_PreviewWidgetFactory.qml 2014-02-07 09:58:04 +0000
209+++ tests/qmltests/Dash/Previews/tst_PreviewWidgetFactory.qml 2014-02-12 11:11:51 +0000
210@@ -75,10 +75,12 @@
211
212 function test_mapping_data() {
213 return [
214+ { tag: "Actions", type: "actions", source: "PreviewActions.qml" },
215 { tag: "Audio", type: "audio", source: "PreviewAudioPlayback.qml" },
216+ { tag: "Gallery", type: "gallery", source: "PreviewImageGallery.qml" },
217+ { tag: "Header", type: "header", source: "PreviewHeader.qml" },
218+ { tag: "Image", type: "image", source: "PreviewZoomableImage.qml" },
219 { tag: "Text", type: "text", source: "PreviewTextSummary.qml" },
220- { tag: "Gallery", type: "gallery", source: "PreviewImageGallery.qml" },
221- { tag: "Actions", type: "actions", source: "PreviewActions.qml" },
222 ];
223 }
224
225
226=== added file 'tests/qmltests/Dash/Previews/tst_PreviewZoomableImage.qml'
227--- tests/qmltests/Dash/Previews/tst_PreviewZoomableImage.qml 1970-01-01 00:00:00 +0000
228+++ tests/qmltests/Dash/Previews/tst_PreviewZoomableImage.qml 2014-02-12 11:11:51 +0000
229@@ -0,0 +1,57 @@
230+/*
231+ * Copyright 2014 Canonical Ltd.
232+ *
233+ * This program is free software; you can redistribute it and/or modify
234+ * it under the terms of the GNU General Public License as published by
235+ * the Free Software Foundation; version 3.
236+ *
237+ * This program is distributed in the hope that it will be useful,
238+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
239+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
240+ * GNU General Public License for more details.
241+ *
242+ * You should have received a copy of the GNU General Public License
243+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
244+ */
245+
246+import QtQuick 2.0
247+import QtTest 1.0
248+import "../../../../qml/Dash/Previews"
249+import Unity.Test 0.1 as UT
250+
251+Rectangle {
252+ id: root
253+ width: units.gu(40)
254+ height: units.gu(80)
255+ color: "lightgrey"
256+
257+ property var widgetData0: {
258+ "source": ""
259+ }
260+
261+ property var widgetData1: {
262+ "source": "../../graphics/phone_background.jpg",
263+ "zoomable": false
264+ }
265+
266+ PreviewZoomableImage {
267+ id: zoomableImage
268+ width: parent.width
269+ widgetData: widgetData1
270+ }
271+
272+ UT.UnityTestCase {
273+ name: "PreviewZoomableImageTest"
274+ when: windowShown
275+
276+ function test_loadImage() {
277+ var image = findChild(zoomableImage, "image");
278+
279+ zoomableImage.widgetData = widgetData0;
280+ tryCompare(image.state, "default");
281+
282+ zoomableImage.widgetData = widgetData1;
283+ tryCompare(image.state, "ready");
284+ }
285+ }
286+}

Subscribers

People subscribed via source and target branches