mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
tests: add signal test to call tst_qPref*qml
Add signal testing of all variables Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
c01d9f60c1
commit
848d277951
14 changed files with 682 additions and 3 deletions
|
@ -30,4 +30,41 @@ TestCase {
|
|||
PrefProxy.proxy_user = "my user"
|
||||
compare(PrefProxy.proxy_user, "my user")
|
||||
}
|
||||
|
||||
Item {
|
||||
id: spyCatcher
|
||||
|
||||
property bool spy1 : false
|
||||
property bool spy2 : false
|
||||
property bool spy3 : false
|
||||
property bool spy4 : false
|
||||
property bool spy5 : false
|
||||
property bool spy6 : false
|
||||
|
||||
Connections {
|
||||
target: PrefProxy
|
||||
onProxy_authChanged: {spyCatcher.spy1 = true }
|
||||
onProxy_hostChanged: {spyCatcher.spy2 = true }
|
||||
onProxy_passChanged: {spyCatcher.spy3 = true }
|
||||
onProxy_portChanged: {spyCatcher.spy4 = true }
|
||||
onProxy_typeChanged: {spyCatcher.spy5 = true }
|
||||
onProxy_userChanged: {spyCatcher.spy6 = true }
|
||||
}
|
||||
}
|
||||
|
||||
function test_signals() {
|
||||
PrefProxy.proxy_auth = ! PrefProxy.proxy_auth
|
||||
PrefProxy.proxy_host = "qml"
|
||||
PrefProxy.proxy_pass = "qml"
|
||||
PrefProxy.proxy_port = -544
|
||||
PrefProxy.proxy_type = -3
|
||||
PrefProxy.proxy_user = "qml"
|
||||
|
||||
compare(spyCatcher.spy1, true)
|
||||
compare(spyCatcher.spy2, true)
|
||||
compare(spyCatcher.spy3, true)
|
||||
compare(spyCatcher.spy4, true)
|
||||
compare(spyCatcher.spy5, true)
|
||||
compare(spyCatcher.spy6, true)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue