~mzanetti/unity8/fix-left-edge-on-spread

« back to all changes in this revision

Viewing changes to tests/qmltests/Greeter/tst_MultiGreeter.qml

  • Committer: Michael Zanetti
  • Date: 2015-01-12 11:21:17 UTC
  • mfrom: (1459.1.85 unity8)
  • Revision ID: michael.zanetti@canonical.com-20150112112117-0x9srs9dx0ndp60g
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
    }
57
57
 
58
58
    SignalSpy {
59
 
        id: teaseSpy
 
59
        id: tappedSpy
60
60
        target: greeter
61
 
        signalName: "tease"
 
61
        signalName: "tapped"
62
62
    }
63
63
 
64
64
    UT.UnityTestCase {
323
323
            compare(greeter.model.data(index, LightDM.UserRoles.BackgroundPathRole), "")
324
324
        }
325
325
 
326
 
        function test_teasingArea_data() {
 
326
        function test_tappedSignal_data() {
327
327
            return [
328
 
                {tag: "left", posX: units.gu(2), leftPressed: true, rightPressed: false},
329
 
                {tag: "right", posX: greeter.width - units.gu(2), leftPressed: false, rightPressed: true}
 
328
                {tag: "left", posX: units.gu(2)},
 
329
                {tag: "right", posX: greeter.width - units.gu(2)}
330
330
            ]
331
331
        }
332
332
 
333
 
        function test_teasingArea(data) {
334
 
            teaseSpy.clear()
335
 
            mouseClick(greeter, data.posX, greeter.height - units.gu(1))
336
 
            teaseSpy.wait()
337
 
            tryCompare(teaseSpy, "count", 1)
 
333
        function test_tappedSignal(data) {
 
334
            select_user("no-password");
 
335
            tappedSpy.clear();
 
336
            tap(greeter, data.posX, greeter.height - units.gu(1))
 
337
            tryCompare(tappedSpy, "count", 1)
338
338
        }
339
339
 
340
340
        function test_teaseLockedUnlocked_data() {
345
345
        }
346
346
 
347
347
        function test_teaseLockedUnlocked(data) {
348
 
            teaseSpy.clear()
 
348
            tappedSpy.clear()
349
349
            greeter.locked = data.locked;
350
350
 
351
 
            mouseClick(greeter, greeter.width - units.gu(5), greeter.height - units.gu(1));
 
351
            tap(greeter, greeter.width - units.gu(5), greeter.height - units.gu(1));
352
352
 
353
353
            if (!data.locked || data.narrow) {
354
 
                teaseSpy.wait()
355
 
                tryCompare(teaseSpy, "count", 1);
 
354
                tappedSpy.wait()
 
355
                tryCompare(tappedSpy, "count", 1);
356
356
            } else {
357
357
                // waiting 100ms to make sure nothing happens
358
358
                wait(100);
359
 
                compare(teaseSpy.count, 0, "Greeter teasing not disabled even though it's locked.");
 
359
                compare(tappedSpy.count, 0, "Greeter teasing not disabled even though it's locked.");
360
360
            }
361
361
 
362
362
            // Reset value