on xenial help sign in
Fixed failure of notification qml-tests by updating the used object-names. Fixed some QML-warnings.
commite77ad4d3d929e2ec5fb428636bc77e1b0ef60138 authorMirco Müller <mirco.mueller@ubuntu.com> dateTue 19 Aug 2014, 15:44 (12 years ago) parent6487085
3 files changed+7−7
qml/Notifications/Notification.qml+1−1 qml/Notifications/Notifications.qml+1−1 tests/qmltests/Notifications/tst_Notifications.qml+5−5
qml/Notifications/Notification.qml+1−1
@@ -460,7 +460,7 @@ Item {
460460 id: comboRepeater
461461
462462 onVisibleChanged: {
463− comboButton.text = comboRepeater.itemAt(2).actionLabel
463+ comboButton.text = comboRepeater.count >= 3 ? comboRepeater.itemAt(2).actionLabel : ""
464464 }
465465
466466 model: notification.actions
qml/Notifications/Notifications.qml+1−1
@@ -33,7 +33,7 @@ ListView {
3333 id: snapDecisionProxyModel
3434
3535 model: notificationList.model
36− filterRole: UnityNotifications.ModelInterface.RoleType
36+ filterRole: UnityNotifications.ModelInterface != undefined ? UnityNotifications.ModelInterface.RoleType : 0
3737 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
3838 }
3939
tests/qmltests/Notifications/tst_Notifications.qml+5−5
@@ -479,8 +479,8 @@ Row {
479479 tryCompare(audioItem, "playbackState", data.hasSound ? Audio.PlayingState : Audio.StoppedState)
480480
481481 if(data.buttonRowVisible) {
482− var buttonCancel = findChild(buttonRow, "button1")
483− var buttonAccept = findChild(buttonRow, "button0")
482+ var buttonCancel = findChild(buttonRow, "notify_button1")
483+ var buttonAccept = findChild(buttonRow, "notify_button0")
484484
485485 // only test the left/cancel-button if two actions have been passed in
486486 if (data.actions.length == 2) {
@@ -500,19 +500,19 @@ Row {
500500
501501 // check if there's a ComboButton created due to more actions being passed
502502 if (data.actions.length > 2) {
503− var comboButton = findChild(notification, "button2")
503+ var comboButton = findChild(notification, "notify_button2")
504504 tryCompareFunction(function() { return comboButton.expanded == false; }, true);
505505
506506 // click to expand
507507 tryCompareFunction(function() { mouseClick(comboButton, comboButton.width - comboButton.__styleInstance.dropDownWidth / 2, comboButton.height / 2); return comboButton.expanded == true; }, true);
508508
509509 // try clicking on choices in expanded comboList
510− var choiceButton1 = findChild(notification, "button3")
510+ var choiceButton1 = findChild(notification, "notify_button3")
511511 tryCompareFunction(function() { mouseClick(choiceButton1, choiceButton1.width / 2, choiceButton1.height / 2); return actionSpy.signalArguments.length > 0; }, true);
512512 compare(actionSpy.signalArguments[0][0], data.actions[3]["id"], "got wrong id choice action 1")
513513 actionSpy.clear()
514514
515− var choiceButton2 = findChild(notification, "button4")
515+ var choiceButton2 = findChild(notification, "notify_button4")
516516 tryCompareFunction(function() { mouseClick(choiceButton2, choiceButton2.width / 2, choiceButton2.height / 2); return actionSpy.signalArguments.length > 0; }, true);
517517 compare(actionSpy.signalArguments[0][0], data.actions[4]["id"], "got wrong id choice action 2")
518518 actionSpy.clear()