76
76
spy.signalName = "";
79
function scrollToCategory(category) {
80
var categoryListView = findChild(genericScopeView, "categoryListView");
81
tryCompareFunction(function() {
82
if (findChild(genericScopeView, category)) return true;
83
mouseFlick(genericScopeView, genericScopeView.width/2, genericScopeView.height,
84
genericScopeView.width/2, genericScopeView.y)
85
tryCompare(categoryListView, "moving", false);
86
return findChild(genericScopeView, category) !== null;
89
tryCompareFunction(function() { return findChild(genericScopeView, "delegate0") !== null; }, true);
90
return findChild(genericScopeView, category);
79
93
function test_isActive() {
80
94
tryCompare(genericScopeView.scope, "isActive", false)
81
95
genericScopeView.isCurrent = true
224
238
function test_forced_category_expansion() {
225
tryCompareFunction(function() {
226
mouseFlick(genericScopeView, genericScopeView.width/2, genericScopeView.height,
227
genericScopeView.width/2, genericScopeView.y)
228
return findChild(genericScopeView, "dashCategory19") !== null;
230
var category = findChild(genericScopeView, "dashCategory19")
239
var category = scrollToCategory("dashCategory19");
231
240
compare(category.expandable, false, "Category with collapsed-rows: 0 should not be expandable");
233
242
var grid = findChild(category, "19");
287
296
function test_showPreviewCarousel() {
288
tryCompareFunction(function() {
289
var dashCategory1 = findChild(genericScopeView, "dashCategory1");
290
if (dashCategory1 != null) {
291
var tile = findChild(dashCategory1, "carouselDelegate1");
297
var category = scrollToCategory("dashCategory1");
298
299
tryCompare(testCase.previewListView, "open", false);
300
var dashCategory1 = findChild(genericScopeView, "dashCategory1");
301
var tile = findChild(dashCategory1, "carouselDelegate1");
301
var tile = findChild(category, "carouselDelegate1");
302
verify(tile, "Could not find delegate");
302
304
mouseClick(tile, tile.width / 2, tile.height / 2);
303
305
tryCompare(tile, "explicitlyScaled", true);
304
306
mouseClick(tile, tile.width / 2, tile.height / 2);
306
308
tryCompare(testCase.previewListView, "x", 0);
312
mousePress(tile, tile.width / 2, tile.height / 2);
313
tryCompare(testCase.previewListView, "open", true);
314
tryCompare(testCase.previewListView, "x", 0);
315
mouseRelease(tile, tile.width / 2, tile.height / 2);
320
function test_showPreviewHorizontalList() {
321
var category = scrollToCategory("dashCategory18");
323
tryCompare(testCase.previewListView, "open", false);
325
var tile = findChild(category, "delegate1");
326
verify(tile, "Could not find delegate");
328
mouseClick(tile, tile.width / 2, tile.height / 2);
329
tryCompare(testCase.previewListView, "open", true);
330
tryCompare(testCase.previewListView, "x", 0);
334
mousePress(tile, tile.width / 2, tile.height / 2);
335
tryCompare(testCase.previewListView, "open", true);
336
tryCompare(testCase.previewListView, "x", 0);
337
mouseRelease(tile, tile.width / 2, tile.height / 2);
311
342
function test_previewCycle() {
334
365
function test_header_style_data() {
336
{ tag: "Default", index: 0, foreground: "grey", background: "", logo: "" },
367
{ tag: "Default", index: 0, foreground: Theme.palette.normal.baseText, background: "", logo: "" },
337
368
{ tag: "Foreground", index: 1, foreground: "yellow", background: "", logo: "" },
338
{ tag: "Logo+Background", index: 2, foreground: "grey", background: "gradient:///lightgrey/grey",
339
logo: Qt.resolvedUrl("../Components/tst_PageHeader/logo-ubuntu-orange.svg") },
369
{ tag: "Logo+Background", index: 2, foreground: Theme.palette.normal.baseText, background: "gradient:///lightgrey/grey",
370
logo: Qt.resolvedUrl("../Dash/tst_PageHeader/logo-ubuntu-orange.svg") },