~ubuntu-branches/ubuntu/trusty/unity8/trusty-proposed

« back to all changes in this revision

Viewing changes to tests/qmltests/Notifications/tst_Notifications.qml

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2014-02-03 16:56:47 UTC
  • mfrom: (1.1.64)
  • Revision ID: package-import@ubuntu.com-20140203165647-ik9w833cac4zu9da
Tags: 7.84+14.04.20140130.is.7.84+14.04.20131220-0ubuntu1
Reverting to last known good version, as after installing a click
application, it redirects you to the first click application everytime.
(LP: #1275832)

Show diffs side-by-side

added added

removed removed

Lines of Context:
141
141
            id: notifications
142
142
 
143
143
            margin: units.gu(1)
 
144
            fullHeight: parent.height
144
145
 
145
146
            anchors.fill: parent
146
147
            model: mockModel
225
226
                          { id: "nada_id", label: "Nada"}],
226
227
                summaryVisible: true,
227
228
                bodyVisible: true,
 
229
                interactiveAreaEnabled: false,
228
230
                iconVisible: true,
229
231
                shapedIcon: true,
230
232
                nonShapedIcon: false,
243
245
                actions: [],
244
246
                summaryVisible: true,
245
247
                bodyVisible: false,
 
248
                interactiveAreaEnabled: false,
246
249
                iconVisible: false,
247
250
                shapedIcon: false,
248
251
                nonShapedIcon: false,
280
283
                actions: [{ id: "reply_id", label: "Dummy"}],
281
284
                summaryVisible: true,
282
285
                bodyVisible: true,
 
286
                interactiveAreaEnabled: true,
283
287
                iconVisible: true,
284
288
                shapedIcon: true,
285
289
                nonShapedIcon: false,
299
303
                          { id: "reject_id", label: "Reject"}],
300
304
                summaryVisible: true,
301
305
                bodyVisible: true,
 
306
                interactiveAreaEnabled: false,
302
307
                iconVisible: true,
303
308
                shapedIcon: true,
304
309
                nonShapedIcon: false,
317
322
                actions: [],
318
323
                summaryVisible: true,
319
324
                bodyVisible: true,
 
325
                interactiveAreaEnabled: false,
320
326
                iconVisible: true,
321
327
                shapedIcon: true,
322
328
                nonShapedIcon: false,
336
342
                actions: [],
337
343
                summaryVisible: true,
338
344
                bodyVisible: true,
 
345
                interactiveAreaEnabled: false,
339
346
                iconVisible: true,
340
347
                shapedIcon: false,
341
348
                nonShapedIcon: true,
389
396
            compare(icon.visible, data.iconVisible, "avatar-icon visibility is incorrect")
390
397
            compare(shapedIcon.visible, data.shapedIcon, "shaped-icon visibility is incorrect")
391
398
            compare(nonShapedIcon.visible, data.nonShapedIcon, "non-shaped-icon visibility is incorrect")
 
399
            compare(interactiveArea.enabled, data.interactiveAreaEnabled, "check for interactive area")
392
400
 
393
 
            // test input does not fall through
394
 
            mouseClick(notification, notification.width / 2, notification.height / 2)
395
 
            if(data.type == Notification.Interactive) {
 
401
            if(data.interactiveAreaEnabled) {
 
402
                mouseClick(notification, notification.width / 2, notification.height / 2)
396
403
                actionSpy.wait()
397
404
                compare(actionSpy.signalArguments[0][0], data.actions[0]["id"], "got wrong id for interactive action")
 
405
                compare(clickThroughSpy.count, 0, "click on interactive notification fell through")
398
406
            }
399
 
            compare(clickThroughSpy.count, 0, "click on notification fell through")
400
407
 
401
408
            compare(secondaryIcon.visible, data.secondaryIconVisible, "secondary-icon visibility is incorrect")
402
409
            compare(summaryLabel.visible, data.summaryVisible, "summary-text visibility is incorrect")