~timo-jyrinki/dialer-app/stop_depending_on_transitional_packages

« back to all changes in this revision

Viewing changes to tests/qml/tst_DialerPage.qml

In order to make it clear that emergency calls are possible in a sim locked situation,
show "Emergency Calls" in the header together with a sim locked icon. Fixes: #1572880
Approved by: Tiago Salem Herrmann

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright 2014 Canonical Ltd.
 
2
 * Copyright 2014-2016 Canonical Ltd.
3
3
 *
4
4
 * This file is part of dialer-app.
5
5
 *
114
114
 
115
115
            mainViewLoader.item.applicationActive = false
116
116
            tryCompare(mainViewLoader.item.currentStack.currentPage, 'title', ' ')
 
117
            mainViewLoader.item.applicationActive = true
 
118
        }
 
119
 
 
120
        function test_dialerPageWhenSimLocked() {
 
121
            mainViewLoader.item.switchToKeypadView()
 
122
            tryCompare(mainViewLoader.item, 'applicationActive', true)
 
123
            tryCompare(mainViewLoader.item.currentStack, 'depth', 1)
 
124
 
 
125
            mainViewLoader.item.telepathyReady = true
 
126
            greeter.greeterActive = false
 
127
            testAccount.simLocked = true
 
128
 
 
129
            var dialerPage = mainViewLoader.item.currentStack.currentPage
 
130
            tryCompare(dialerPage, 'title', i18n.tr('Emergency Calls'))
 
131
            tryCompare(dialerPage.head.backAction, 'objectName', 'simLockedAction')
 
132
 
 
133
            // click the action to see if the dialog is shown
 
134
            dialerPage.head.backAction.trigger()
 
135
            var simLockedDialog = findChild(root, 'simLockedDialog')
 
136
            tryCompare(simLockedDialog, 'visible', true)
 
137
            var okButton = findChild(simLockedDialog, 'okSimLockedDialog')
 
138
            mouseClick(okButton)
117
139
        }
118
140
 
119
141
        /*