on xenial help sign in
Include fixes from test-greeter-dbus-fixes
0a1da02Michael Terry
tests/plugins/IntegratedLightDM/dbus.cpp+3−5
@@ -139,7 +139,7 @@ private Q_SLOTS:
139 greeter->authenticate("has-password");
139 greeter->authenticate("has-password");
140 spy.wait();
140 spy.wait();
141
141
142− QCOMPARE(spy.count(), 1);
142+ QVERIFY(spy.count() > 0);
143 QList<QVariant> arguments = spy.takeFirst();
143 QList<QVariant> arguments = spy.takeFirst();
144 QVERIFY(arguments.at(0).toString() == "com.canonical.UnityGreeter.List");
144 QVERIFY(arguments.at(0).toString() == "com.canonical.UnityGreeter.List");
145 QVERIFY(arguments.at(1).toMap().contains("ActiveEntry"));
145 QVERIFY(arguments.at(1).toMap().contains("ActiveEntry"));
@@ -151,12 +151,10 @@ private Q_SLOTS:
151 QVERIFY(dbusList->property("EntryIsLocked").toBool());
151 QVERIFY(dbusList->property("EntryIsLocked").toBool());
152
152
153 greeter->authenticate("no-password");
153 greeter->authenticate("no-password");
154− QCoreApplication::processEvents(); // wait for auth to finish
155− QVERIFY(!dbusList->property("EntryIsLocked").toBool());
154+ QTRY_VERIFY(!dbusList->property("EntryIsLocked").toBool());
156
155
157 greeter->authenticate("has-password");
156 greeter->authenticate("has-password");
158− QCoreApplication::processEvents(); // wait for auth to finish
159− QVERIFY(dbusList->property("EntryIsLocked").toBool());
157+ QTRY_VERIFY(dbusList->property("EntryIsLocked").toBool());
160 }
158 }
161
159
162 void testEntryIsLockedChanged()
160 void testEntryIsLockedChanged()