summaryrefslogtreecommitdiffstats
path: root/tests/tst_qPrefCloudStorage.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_qPrefCloudStorage.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_qPrefCloudStorage.qml')
-rw-r--r--tests/tst_qPrefCloudStorage.qml53
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/tst_qPrefCloudStorage.qml b/tests/tst_qPrefCloudStorage.qml
index 8d58c7277..f2341218d 100644
--- a/tests/tst_qPrefCloudStorage.qml
+++ b/tests/tst_qPrefCloudStorage.qml
@@ -51,4 +51,57 @@ TestCase {
PrefCloudStorage.userid = "my user"
compare(PrefCloudStorage.userid, "my user")
}
+
+ Item {
+ id: spyCatcher
+
+ property bool spy1 : false
+ property bool spy3 : false
+ property bool spy4 : false
+ property bool spy5 : false
+ property bool spy6 : false
+ property bool spy7 : false
+ property bool spy8 : false
+ property bool spy9 : false
+ property bool spy10 : false
+ property bool spy11 : false
+
+ Connections {
+ target: PrefCloudStorage
+ onCloud_base_urlChanged: {spyCatcher.spy1 = true }
+ onCloud_storage_emailChanged: {spyCatcher.spy3 = true }
+ onCloud_storage_email_encodedChanged: {spyCatcher.spy4 = true }
+ onCloud_storage_passwordChanged: {spyCatcher.spy5 = true }
+ onCloud_storage_pinChanged: {spyCatcher.spy6 = true }
+ onCloud_timeoutChanged: {spyCatcher.spy7 = true }
+ onCloud_verification_statusChanged: {spyCatcher.spy8 = true }
+ onSave_password_localChanged: {spyCatcher.spy9 = true }
+ onSave_userid_localChanged: {spyCatcher.spy10 = true }
+ onUseridChanged: {spyCatcher.spy11 = true }
+ }
+ }
+
+ function test_signals() {
+ PrefCloudStorage.cloud_base_url = "qml"
+ PrefCloudStorage.cloud_storage_email = "qml"
+ PrefCloudStorage.cloud_storage_email_encoded = "qml"
+ PrefCloudStorage.cloud_storage_password = "qml"
+ PrefCloudStorage.cloud_storage_pin = "qml"
+ PrefCloudStorage.cloud_timeout = 18
+ PrefCloudStorage.cloud_verification_status = 2
+ PrefCloudStorage.save_password_local = ! PrefCloudStorage.save_password_local
+ PrefCloudStorage.save_userid_local = ! PrefCloudStorage.save_userid_local
+ PrefCloudStorage.userid = "qml"
+
+ compare(spyCatcher.spy1, true)
+ compare(spyCatcher.spy3, true)
+ compare(spyCatcher.spy4, true)
+ compare(spyCatcher.spy5, true)
+ compare(spyCatcher.spy6, true)
+ compare(spyCatcher.spy7, true)
+ compare(spyCatcher.spy8, true)
+ compare(spyCatcher.spy9, true)
+ compare(spyCatcher.spy10, true)
+ compare(spyCatcher.spy11, true)
+ }
}