@@ -188,82 +188,9 @@ Row {
188188 name: "VisualQueueTest"
189189 when: windowShown
190190
191− function fillMockModel () {
192− var n = {
193− tag: "Snap Decision 1",
194− type: Notification.SnapDecision,
195− hints: {"x-canonical-private-button-tint": "true"},
196− summary: "Incoming call",
197− body: "Frank Zappa\n+44 (0)7736 027340",
198− icon: "../graphics/avatars/funky.png",
199− secondaryIcon: "../graphics/applicationIcons/phone-app.png",
200− actions: [{ id: "pickup_id", label: "Pick up"},
201− { id: "decline_1_id", label: "Decline"},
202− { id: "decline_2_id", label: "Can't talk now, what's up?"},
203− { id: "decline_3_id", label: "I call you back."},
204− { id: "decline_4_id", label: "Send custom message..."}]
205− }
206− mockModel.append(n)
207−
208− n = {
209− tag: "Snap Decision 2",
210− type: Notification.SnapDecision,
211− hints: {"x-canonical-private-button-tint": "true",
212− "x-canonical-non-shaped-icon": "true"},
213− summary: "Incoming file",
214− body: "Frank would like to send you the file: essay.pdf.",
215− icon: "image://theme/search",
216− secondaryIcon: "",
217− actions: [{ id: "accept_id", label: "Accept"},
218− { id: "reject_id", label: "Reject"}]
219− }
220− mockModel.append(n)
221−
222− n = {
223− tag: "Snap Decision 3",
224− type: Notification.SnapDecision,
225− hints: {"x-canonical-private-button-tint": "true",
226− "x-canonical-non-shaped-icon": "true"},
227− summary: "Authentication error",
228− body: "Please authorise Ubuntu to access your Google account.",
229− icon: "image://theme/search",
230− secondaryIcon: "",
231− actions: [{ id: "settings_id", label: "Settings..."},
232− { id: "cancel_id", label: "Cancel"}]
233− }
234− mockModel.append(n)
235−
236− n = {
237− tag: "Snap Decision 4",
238− type: Notification.SnapDecision,
239− hints: {"x-canonical-private-button-tint": "true",
240− "x-canonical-non-shaped-icon": "true"},
241− summary: "Morning alarm",
242− body: "It's 6:30... time to get up!",
243− icon: "image://theme/search",
244− secondaryIcon: "",
245− actions: [{ id: "ok_reply", label: "Ok"},
246− { id: "snooze_id", label: "Snooze"}]
247− }
248− mockModel.append(n)
249−
250− n = {
251− tag: "Snap Decision 5",
252− type: Notification.SnapDecision,
253− hints: {"x-canonical-private-button-tint": "true"},
254− summary: "Jenny Sample",
255− body: "Hey there! Have you been watching the latest episode of that TV-show I told you about last week?",
256− icon: "../graphics/avatars/amanda.png",
257− secondaryIcon: "../graphics/applicationIcons/messages-app.png",
258− actions: [{ id: "reply_id", label: "Reply"},
259− { id: "ignore_id", label: "Ignore"}]
260− }
261− mockModel.append(n)
262− }
263−
264191 function test_VisualSnapDecisionsQueue() {
265192 // populate model with some mock notifications
266− fillMockModel();
193+ addSomeSnapDecisionNotifications();
267194
268195 // make sure the view is properly updated before going on
269196 waitForRendering(notifications);