on xenial help sign in
Do not expose "priv" in CardTool.qml.
0da5e40Michał Sawicz
qml/Dash/CardTool.qml+1−2
@@ -100,10 +100,9 @@ Item {
100 }
100 }
101 }
101 }
102
102
103− readonly property QtObject priv: card
104−
105 Card {
103 Card {
106 id: card
104 id: card
105+ objectName: "card"
107 template: cardTool.template
106 template: cardTool.template
108 components: cardTool.components
107 components: cardTool.components
109
108
tests/qmltests/Dash/tst_CardTool.qml+7−1
@@ -209,7 +209,7 @@ Rectangle {
209 id: dataArea
209 id: dataArea
210 anchors { left: parent.left; right: parent.right }
210 anchors { left: parent.left; right: parent.right }
211 height: units.gu(25)
211 height: units.gu(25)
212− text: JSON.stringify(cardTool.priv.cardData, undefined, 2)
212+ text: JSON.stringify(testCase.internalCard.cardData, undefined, 2)
213 }
213 }
214
214
215 Label {
215 Label {
@@ -239,8 +239,14 @@ Rectangle {
239 id: testCase
239 id: testCase
240 name: "Card"
240 name: "Card"
241
241
242+ property Card internalCard: findChild(cardTool, "card")
243+
242 when: windowShown
244 when: windowShown
243
245
246+ function init() {
247+ verify(typeof testCase.internalCard === "object", "Couldn't find internal card object.");
248+ }
249+
244 function cleanup() {
250 function cleanup() {
245 selector.selectedIndex = -1;
251 selector.selectedIndex = -1;
246 layoutSelector.selectedIndex = -1;
252 layoutSelector.selectedIndex = -1;