]> cloud.milkyroute.net Git - dolphin.git/commitdiff
[DolphinMainWindowTest] Attempt to fix testOpenInNewTabTile() on the CI
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Sun, 7 Oct 2018 19:37:35 +0000 (21:37 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Sun, 7 Oct 2018 19:37:35 +0000 (21:37 +0200)
Both icon `name()`s are empty on the CI, which probably doesn't have
icons or something. This should hopefully fix it.

src/tests/dolphinmainwindowtest.cpp

index 3fdabe7b885c2358eec3132ca48ce4c8a7d5be6a..673bccd4409c9b6bfe84a03c84bd61b4e2fa0c20 100644 (file)
@@ -188,9 +188,10 @@ void DolphinMainWindowTest::testOpenInNewTabTitle()
 
     tabWidget->openNewTab(QUrl::fromLocalFile(QDir::tempPath()));
     QCOMPARE(tabWidget->count(), 2);
-    qDebug() << "First tab:" << tabWidget->tabIcon(0).name() << "second tab:" << tabWidget->tabIcon(1).name();
-    QVERIFY(tabWidget->tabIcon(0).name() != tabWidget->tabIcon(1).name());
     QVERIFY(tabWidget->tabText(0) != tabWidget->tabText(1));
+    if (!tabWidget->tabIcon(0).isNull() && !tabWidget->tabIcon(1).isNull()) {
+        QVERIFY(tabWidget->tabIcon(0).name() != tabWidget->tabIcon(1).name());
+    }
 }
 
 void DolphinMainWindowTest::testNewFileMenuEnabled_data()