diff options
Diffstat (limited to 'tests/auto/contacts/qmlcontacts/testcases/ContactsSavingTestCase.qml')
-rw-r--r-- | tests/auto/contacts/qmlcontacts/testcases/ContactsSavingTestCase.qml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/contacts/qmlcontacts/testcases/ContactsSavingTestCase.qml b/tests/auto/contacts/qmlcontacts/testcases/ContactsSavingTestCase.qml index bc2911178..b5e2ded90 100644 --- a/tests/auto/contacts/qmlcontacts/testcases/ContactsSavingTestCase.qml +++ b/tests/auto/contacts/qmlcontacts/testcases/ContactsSavingTestCase.qml @@ -48,6 +48,7 @@ TestCase { id: contactsSavingTestCase property SignalSpy spy + property SignalSpy collectionSpy property bool debug: false ContactsTestConfiguration { @@ -69,6 +70,15 @@ TestCase { contactsSavingTestCase); spy.target = model; spy.signalName = "contactsChanged"; + + collectionSpy = Qt.createQmlObject( + "import QtTest 1.0;" + + "SignalSpy {" + + "}", + contactsSavingTestCase); + collectionSpy.target = model + collectionSpy.signalName = "collectionsChanged" + return spy; } @@ -83,6 +93,13 @@ TestCase { spy.wait(); } + // Verify that the collectionsChanged signal is emitted + function waitForCollectionsChanged() { + logDebug("waitForCollectionsChanged"); + collectionSpy.wait(); + } + + // Wait until duration has elapsed, or the contactsChanged signal is emitted function waitUntilContactsChanged(duration) { logDebug("waitUntilContactsChanged"); |