on xenial help sign in
Add CardTool to determine category-wide card properties based on the category template.

Clean up test configurations, too.

commit76db39d11561e46d788a8243b17ee522a7890f7b authorMichał Sawicz <michal.sawicz@canonical.com> dateFri 7 Feb 2014, 10:43 (13 years ago) parent265cbea0da5e40
2 files changed+8−3
qml/Dash/CardTool.qml+1−2 tests/qmltests/Dash/tst_CardTool.qml+7−1
qml/Dash/CardTool.qml+1−2
@@ -100,10 +100,9 @@ Item {
100100 }
101101 }
102102
103− readonly property QtObject priv: card
104−
105103 Card {
106104 id: card
105+ objectName: "card"
107106 template: cardTool.template
108107 components: cardTool.components
109108
tests/qmltests/Dash/tst_CardTool.qml+7−1
@@ -209,7 +209,7 @@ Rectangle {
209209 id: dataArea
210210 anchors { left: parent.left; right: parent.right }
211211 height: units.gu(25)
212− text: JSON.stringify(cardTool.priv.cardData, undefined, 2)
212+ text: JSON.stringify(testCase.internalCard.cardData, undefined, 2)
213213 }
214214
215215 Label {
@@ -239,8 +239,14 @@ Rectangle {
239239 id: testCase
240240 name: "Card"
241241
242+ property Card internalCard: findChild(cardTool, "card")
243+
242244 when: windowShown
243245
246+ function init() {
247+ verify(typeof testCase.internalCard === "object", "Couldn't find internal card object.");
248+ }
249+
244250 function cleanup() {
245251 selector.selectedIndex = -1;
246252 layoutSelector.selectedIndex = -1;