on xenial help sign in
update tests
31ab388Michael Zanetti
Dash/Generic/GenericPreview.qml+2−1
@@ -62,12 +62,13 @@ DashPreview {
62
62
63 Column {
63 Column {
64 id: buttonList
64 id: buttonList
65− objectName: "buttonList"
66 spacing: units.gu(1)
65 spacing: units.gu(1)
67 Repeater {
66 Repeater {
67+ objectName: "buttonList"
68 model: previewData.actions
68 model: previewData.actions
69
69
70 delegate: Button {
70 delegate: Button {
71+ objectName: "button" + index
71 width: parent.width
72 width: parent.width
72 height: buttonList.buttonHeight
73 height: buttonList.buttonHeight
73 color: Theme.palette.selected.foreground
74 color: Theme.palette.selected.foreground
tests/qmltests/Dash/Apps/tst_AppPreview.qml+3−3
@@ -127,12 +127,12 @@ Item {
127 }
127 }
128
128
129 function test_actions() {
129 function test_actions() {
130− var buttons = findChild(appPreview, "gridButtons");
130+ var buttons = findChild(appPreview, "buttonList");
131 compare(buttons.count, 3, "Not the proper amount of actions detected.");
131 compare(buttons.count, 3, "Not the proper amount of actions detected.");
132
132
133 for(var i = 0; i < buttons.count; i++) {
133 for(var i = 0; i < buttons.count; i++) {
134− buttons.currentIndex = i;
134+ var button = findChild(appPreview, "button" + i);
135− buttons.currentItem.clicked();
135+ mouseClick(button, 1, 1);
136 }
136 }
137
137
138 var actions = data.actions;
138 var actions = data.actions;