summaryrefslogtreecommitdiffstats
path: root/tests/tst_qPrefProxy.qml
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-28 12:33:47 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-11 17:25:00 -0700
commit848d2779519b365ba3cfd17838680f5b0cf6eb32 (patch)
tree6a6de26e370994fd018b37591a223b36dfd2f122 /tests/tst_qPrefProxy.qml
parentc01d9f60c14ec9ee58892504e9f5c346dbb24e7e (diff)
downloadsubsurface-848d2779519b365ba3cfd17838680f5b0cf6eb32.tar.gz
tests: add signal test to call tst_qPref*qml
Add signal testing of all variables Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests/tst_qPrefProxy.qml')
-rw-r--r--tests/tst_qPrefProxy.qml37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/tst_qPrefProxy.qml b/tests/tst_qPrefProxy.qml
index a51a03881..55d814a15 100644
--- a/tests/tst_qPrefProxy.qml
+++ b/tests/tst_qPrefProxy.qml
@@ -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)
+ }
}