on xenial help sign in
Add more test configurations.
commit5916fe60e11a4613f488f22ffc3a7591d9e499b4 authorMichał Sawicz <michal.sawicz@canonical.com> dateFri 31 Jan 2014, 14:43 (13 years ago) parent7290e03
1 file changed+33−8
tests/qmltests/Dash/tst_CardTool.qml+33−8
tests/qmltests/Dash/tst_CardTool.qml+33−8
@@ -32,6 +32,30 @@ Rectangle {
3232 "name": "Art, header, summary",
3333 "layout": { "components": JSON.parse(Helpers.fullMapping) }
3434 },
35+ {
36+ "name": "Header, summary",
37+ "layout": { "components": Helpers.update(JSON.parse(Helpers.fullMapping), { "art": undefined }) }
38+ },
39+ {
40+ "name": "Art, header",
41+ "layout": { "components": Helpers.update(JSON.parse(Helpers.fullMapping), { "summary": undefined }) }
42+ },
43+ {
44+ "name": "Header only",
45+ "layout": { "components": Helpers.update(JSON.parse(Helpers.fullMapping), { "art": undefined, "summary": undefined }) }
46+ },
47+ {
48+ "name": "Header title only",
49+ "layout": { "components": { "title": "title" } }
50+ },
51+ {
52+ "name": "Header title and subtitle",
53+ "layout": { "components": { "title": "title", "subtitle": "subtitle" } }
54+ },
55+ {
56+ "name": "Header title and mascot",
57+ "layout": { "components": { "title": "title", "mascot": "mascot" } }
58+ },
3559 {
3660 "name": "Art, header, summary - small",
3761 "layout": { "template": { "card-size": "small" }, "components": JSON.parse(Helpers.fullMapping) }
@@ -43,11 +67,7 @@ Rectangle {
4367 {
4468 "name": "Art, header, summary - horizontal",
4569 "layout": { "template": { "card-layout": "horizontal" }, "components": JSON.parse(Helpers.fullMapping) }
46− },
47− {
48− "name": "Header title only",
49− "layout": { "components": { "title": "title" } }
50− },
70+ }
5171 ]
5272
5373 CardTool {
@@ -206,9 +226,14 @@ Rectangle {
206226 function test_card_size_data() {
207227 return [
208228 { tag: "Medium", width: units.gu(18.5), height: function() { return card.height }, index: 0 },
209− { tag: "Small", width: units.gu(12), height: function() { return card.height }, index: 1 },
210− { tag: "Large", width: units.gu(38), height: function() { return card.height }, index: 2 },
211− { tag: "Horizontal", width: units.gu(38), height: function() { return card.height }, index: 3 },
229+ { tag: "No art", width: units.gu(18.5), height: function() { return card.height }, index: 1 },
230+ { tag: "No summary", width: units.gu(18.5), height: function() { return card.height }, index: 2 },
231+ { tag: "Just header", width: units.gu(18.5), height: function() { return card.height }, index: 3 },
232+ { tag: "Just title", width: units.gu(18.5), height: function() { return card.height }, index: 4 },
233+ { tag: "Title and subtitle", width: units.gu(18.5), height: function() { return card.height }, index: 5 },
234+ { tag: "Title and mascot", width: units.gu(18.5), height: function() { return card.height }, index: 6 },
235+ { tag: "Small", width: units.gu(12), height: function() { return card.height }, index: 7 },
236+ { tag: "Large", width: units.gu(38), height: function() { return card.height }, index: 8 },
212237 { tag: "OrganicGrid", width: undefined, height: undefined, index: 0, layout_index: 1},
213238 { tag: "Journal", width: undefined, height: units.gu(20), size: 20, index: 0, layout_index: 2 },
214239 { tag: "OversizedJournal", width: undefined, height: units.gu(18.5), size: 40, index: 0, layout_index: 2 },