on xenial help sign in
Fixed launcher-model unit-test.
53b19b9Mirco Müller
tests/plugins/Unity/Launcher/launchermodeltest.cpp+6−9
@@ -375,6 +375,11 @@ private Q_SLOTS:
375 QDBusReply<QVariantMap> reply = interface.call("GetAll");
375 QDBusReply<QVariantMap> reply = interface.call("GetAll");
376 QVariantMap map = reply.value();
376 QVariantMap map = reply.value();
377
377
378+ // Check that the alerting-status is still false, and the item on the upper side of the API
379+ int index = launcherModel->findApplication("abs-icon");
380+ QCOMPARE(index >= 0, true);
381+ QVERIFY(launcherModel->get(index)->alerting() == false);
382+
378 // Make sure GetAll returns a map with count and countVisible props
383 // Make sure GetAll returns a map with count and countVisible props
379 QCOMPARE(map.contains("count"), true);
384 QCOMPARE(map.contains("count"), true);
380 QCOMPARE(map.contains("countVisible"), true);
385 QCOMPARE(map.contains("countVisible"), true);
@@ -395,16 +400,8 @@ private Q_SLOTS:
395 QCOMPARE(map.value("count").toInt(), 55);
400 QCOMPARE(map.value("count").toInt(), 55);
396 QCOMPARE(map.value("countVisible").toBool(), true);
401 QCOMPARE(map.value("countVisible").toBool(), true);
397
402
398− // Now the item on the upper side of the API
403+ // Finally check, that the change to "count" implicitly also set the alerting-state to true
399− int index = launcherModel->findApplication("abs-icon");
400− QCOMPARE(index >= 0, true);
401−
402− // And make sure values have changed there as well
403− spy.clear();
404− QCOMPARE(launcherModel->get(index)->countVisible(), true);
405− QCOMPARE(launcherModel->get(index)->count(), 55);
406 QVERIFY(launcherModel->get(index)->alerting() == true);
404 QVERIFY(launcherModel->get(index)->alerting() == true);
407− QCOMPARE(spy.at(0).at(2).value<QVector<int>>().first(), (int)LauncherModelInterface::RoleAlerting);
408 }
405 }
409
406
410 void testCountEmblemAddsRemovesItem_data() {
407 void testCountEmblemAddsRemovesItem_data() {