@@ -71,8 +71,8 @@ Row {
71 actions: [{ id: "ok_id", label: "Ok"},
71 actions: [{ id: "ok_id", label: "Ok"},
72 { id: "cancel_id", label: "Cancel"},
72 { id: "cancel_id", label: "Cancel"},
73 { id: "notreally_id", label: "Not really"},
73 { id: "notreally_id", label: "Not really"},
74− { id: "noway_id", label: "No way"},
74+ { id: "noway_id", label: "messages:No way"},
75− { id: "nada_id", label: "Nada"}]
75+ { id: "nada_id", label: "messages:Nada"}]
78 mockModel.append(n)
78 mockModel.append(n)
@@ -236,8 +236,8 @@ Row {
236 actions: [{ id: "ok_id", label: "Ok"},
236 actions: [{ id: "ok_id", label: "Ok"},
237 { id: "cancel_id", label: "Cancel"},
237 { id: "cancel_id", label: "Cancel"},
238 { id: "notreally_id", label: "Not really"},
238 { id: "notreally_id", label: "Not really"},
239− { id: "noway_id", label: "No way"},
239+ { id: "noway_id", label: "messages:No way"},
240− { id: "nada_id", label: "Nada"}],
240+ { id: "nada_id", label: "messages:Nada"}],
241 summaryVisible: true,
241 summaryVisible: true,
242 bodyVisible: true,
242 bodyVisible: true,
243 iconVisible: true,
243 iconVisible: true,
@@ -439,32 +439,27 @@ Row {
439 actionSpy.clear()
439 actionSpy.clear()
440 waitForRendering(notification)
440 waitForRendering(notification)
442− // check if there's more than one negative choice
442+ // check if there's a ComboButton created due to more actions being passed
443 if (data.actions.length > 2) {
443 if (data.actions.length > 2) {
444− var initialHeight = notification.implicitHeight
444+ var comboButton = findChild(notification, "button2")
445+ tryCompareFunction(function() { return comboButton.expanded == false; }, true);
446 // click to expand
447 // click to expand
447− mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
448+ tryCompareFunction(function() { mouseClick(comboButton, comboButton.width - comboButton.__styleInstance.dropDownWidth / 2, comboButton.height / 2); return comboButton.expanded == true; }, true);
450+ // try clicking on choices in expanded comboList
448− var contentColumn = findChild(notification, "contentColumn")
451+ var choiceButton1 = findChild(notification, "button3")
449− var collapsedContentColumnHeight = contentColumn.height;
452+ tryCompareFunction(function() { mouseClick(choiceButton1, choiceButton1.width / 2, choiceButton1.height / 2); return actionSpy.signalArguments.length > 0; }, true);
450− // Waiting for the inner column to change height because buttons appear
453+ compare(actionSpy.signalArguments[0][0], data.actions[3]["id"], "got wrong id choice action 1")
451− tryCompareFunction(function() { return collapsedContentColumnHeight != contentColumn.height; }, true);
452− // Waiting for notification to reach its target size
453− tryCompare(notification, "height", contentColumn.height + contentColumn.spacing * 2)
454 actionSpy.clear()
454 actionSpy.clear()
456− // test the additional buttons
456+ var choiceButton2 = findChild(notification, "button4")
457− for (var i = 2; i < data.actions.length; i++) {
457+ tryCompareFunction(function() { mouseClick(choiceButton2, choiceButton2.width / 2, choiceButton2.height / 2); return actionSpy.signalArguments.length > 0; }, true);
458− var buttonColumn = findChild(notification, "buttonColumn")
459− var button = findChild(buttonColumn, "button" + i)
460− mouseClick(button, button.width / 2, button.height / 2)
461− compare(actionSpy.signalArguments[0][0], data.actions[i]["id"], "got wrong id for additional negative action")
458+ compare(actionSpy.signalArguments[0][0], data.actions[4]["id"], "got wrong id choice action 2")
462− actionSpy.clear()
459+ actionSpy.clear()
465 // click to collapse
461 // click to collapse
466− mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
462+ //tryCompareFunction(function() { mouseClick(comboButton, comboButton.width - comboButton.__styleInstance.dropDownWidth / 2, comboButton.height / 2); return comboButton.expanded == false; }, true);
467− tryCompare(notification, "height", initialHeight)
469 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
464 mouseClick(buttonCancel, buttonCancel.width / 2, buttonCancel.height / 2)
470 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")
465 compare(actionSpy.signalArguments[0][0], data.actions[1]["id"], "got wrong id for negative action")