summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-02 05:59:01 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-02 05:59:01 (GMT)
commit2b875f42d23da4fbe90d4200ecc1b635eb35b6ea (patch)
tree0c63799f0b554b3bd579e786aa74c6caf59dccb4
parent6af7ca72887b45cb20bda8d469a0203cdc2be90c (diff)
Improve autotests
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfiguredialogtest.cpp8
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.cpp1
2 files changed, 8 insertions, 1 deletions
diff --git a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfiguredialogtest.cpp b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfiguredialogtest.cpp
index d928efb..d93d176 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfiguredialogtest.cpp
+++ b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternalconfiguredialogtest.cpp
@@ -19,6 +19,8 @@
#include "viewerpluginexternalconfiguredialogtest.h"
#include "../configuredialog/viewerpluginexternalconfiguredialog.h"
+#include <QDialogButtonBox>
+#include <QPushButton>
#include <QTest>
ViewerPluginExternalConfigureDialogTest::ViewerPluginExternalConfigureDialogTest(QObject *parent)
@@ -34,7 +36,11 @@ ViewerPluginExternalConfigureDialogTest::~ViewerPluginExternalConfigureDialogTes
void ViewerPluginExternalConfigureDialogTest::shouldHaveDefaultValue()
{
-
+ ViewerPluginExternalConfigureDialog dlg;
+ QVERIFY(!dlg.windowTitle().isEmpty());
+ QDialogButtonBox *buttonBox = dlg.findChild<QDialogButtonBox *>(QStringLiteral("buttonBox"));
+ QVERIFY(buttonBox);
+ QVERIFY(buttonBox->button(QDialogButtonBox::RestoreDefaults)->isHidden());
}
QTEST_MAIN(ViewerPluginExternalConfigureDialogTest)
diff --git a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.cpp b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.cpp
index 53ff4bc..cdd47de 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.cpp
+++ b/plugins/messageviewerplugins/externalscriptplugin/autotests/viewerpluginexternaleditdialogtest.cpp
@@ -23,6 +23,7 @@
#include "../configuredialog/viewerpluginexternaleditwidget.h"
#include <QDialogButtonBox>
+#include <QPushButton>
#include <QTest>
ViewerPluginExternalEditDialogTest::ViewerPluginExternalEditDialogTest(QObject *parent)