~mterry/unity8/split

« back to all changes in this revision

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

  • Committer: Michael Terry
  • Date: 2013-10-15 17:48:24 UTC
  • mfrom: (138.2.326 trunk)
  • Revision ID: michael.terry@canonical.com-20131015174824-x1n7rx100b0ph8v4
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import QtTest 1.0
19
19
import ".."
20
20
import "../../../Greeter"
 
21
import AccountsService 0.1
 
22
import LightDM 0.1 as LightDM
21
23
import Ubuntu.Components 0.1
22
24
import Unity.Test 0.1 as UT
23
25
 
50
52
        name: "Greeter"
51
53
        when: windowShown
52
54
 
 
55
        function cleanup() {
 
56
            AccountsService.statsWelcomeScreen = true
 
57
        }
 
58
 
53
59
        function test_properties() {
54
60
            compare(greeter.multiUser, false)
55
61
            compare(greeter.narrowMode, true)
101
107
            // Wait until we're back to 0
102
108
            tryCompareFunction(function() { return greeter.x;},  0);
103
109
        }
 
110
 
 
111
        function test_statsWelcomeScreen() {
 
112
            // Test logic in greeter that turns statsWelcomeScreen setting into infographic changes
 
113
            compare(AccountsService.statsWelcomeScreen, true)
 
114
            tryCompare(LightDM.Infographic, "username", "single")
 
115
            AccountsService.statsWelcomeScreen = false
 
116
            tryCompare(LightDM.Infographic, "username", "")
 
117
            AccountsService.statsWelcomeScreen = true
 
118
            tryCompare(LightDM.Infographic, "username", "single")
 
119
        }
104
120
    }
105
121
}