summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-08 11:55:54 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-08 11:55:54 (GMT)
commitf26ec1a4ba96b08eae9b925f661be49fe0c282e8 (patch)
tree971bfef8a4d6c086852db127698136449a0535fe
parentb880936539f80a24fb6687b854b3e3109cad67fa (diff)
Add autotests
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/configureplugins/autotests/CMakeLists.txt12
-rw-r--r--src/configureplugins/autotests/configurepluginslistwidgettest.cpp2
-rw-r--r--src/configureplugins/autotests/configurepluginswidgettest.cpp6
4 files changed, 11 insertions, 10 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 75ce87b..f31d14b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -322,6 +322,7 @@ if (BUILD_TESTING)
add_subdirectory(customtools/autotests)
add_subdirectory(autotests)
add_subdirectory(genericplugins/autotests)
+ add_subdirectory(configureplugins/autotests)
endif()
if( LibKGAPI2_FOUND )
diff --git a/src/configureplugins/autotests/CMakeLists.txt b/src/configureplugins/autotests/CMakeLists.txt
index b8bd1da..5435b52 100644
--- a/src/configureplugins/autotests/CMakeLists.txt
+++ b/src/configureplugins/autotests/CMakeLists.txt
@@ -1,14 +1,14 @@
-set( kmail_configureplugins_source_SRCS configurepluginswidgettest.cpp ../configurepluginswidget.cpp ../configurepluginslistwidget.cpp )
-add_executable( configurepluginswidgettest ${kmail_configureplugins_source_SRCS} )
+set( pimcommon_configureplugins_source_SRCS configurepluginswidgettest.cpp ../configurepluginswidget.cpp ../configurepluginslistwidget.cpp )
+add_executable( configurepluginswidgettest ${pimcommon_configureplugins_source_SRCS} )
add_test( configurepluginswidgettest configurepluginswidgettest )
ecm_mark_as_test(kmail-configurepluginswidgettest)
target_link_libraries( configurepluginswidgettest Qt5::Test KF5::I18n Qt5::Widgets
- KF5::ConfigCore KF5::TextWidgets KF5::WidgetsAddons KF5::PimCommon KF5::MessageViewer KF5::MessageComposer)
+ KF5::ConfigCore KF5::TextWidgets KF5::WidgetsAddons KF5::PimCommon)
-set( kmail_configurepluginslist_source_SRCS configurepluginslistwidgettest.cpp ../configurepluginslistwidget.cpp )
-add_executable( configurepluginslistwidgettest ${kmail_configurepluginslist_source_SRCS} )
+set( pimcommon_configurepluginslist_source_SRCS configurepluginslistwidgettest.cpp ../configurepluginslistwidget.cpp )
+add_executable( configurepluginslistwidgettest ${pimcommon_configurepluginslist_source_SRCS} )
add_test( configurepluginslistwidgettest configurepluginslistwidgettest )
ecm_mark_as_test(kmail-configurepluginslistwidgettest)
target_link_libraries( configurepluginslistwidgettest Qt5::Test KF5::I18n Qt5::Widgets
- KF5::ConfigCore KF5::TextWidgets KF5::WidgetsAddons KF5::PimCommon KF5::MessageViewer KF5::MessageComposer)
+ KF5::ConfigCore KF5::TextWidgets KF5::WidgetsAddons KF5::PimCommon)
diff --git a/src/configureplugins/autotests/configurepluginslistwidgettest.cpp b/src/configureplugins/autotests/configurepluginslistwidgettest.cpp
index d1d65f2..e4b268c 100644
--- a/src/configureplugins/autotests/configurepluginslistwidgettest.cpp
+++ b/src/configureplugins/autotests/configurepluginslistwidgettest.cpp
@@ -34,7 +34,7 @@ ConfigurePluginsListWidgetTest::~ConfigurePluginsListWidgetTest()
void ConfigurePluginsListWidgetTest::shouldHaveDefaultValue()
{
- ConfigurePluginsListWidget w;
+ PimCommon::ConfigurePluginsListWidget w;
QVBoxLayout *mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainlayout"));
QVERIFY(mainLayout);
diff --git a/src/configureplugins/autotests/configurepluginswidgettest.cpp b/src/configureplugins/autotests/configurepluginswidgettest.cpp
index 122882a..114af38 100644
--- a/src/configureplugins/autotests/configurepluginswidgettest.cpp
+++ b/src/configureplugins/autotests/configurepluginswidgettest.cpp
@@ -37,7 +37,7 @@ ConfigurePluginsWidgetTest::~ConfigurePluginsWidgetTest()
void ConfigurePluginsWidgetTest::shouldHaveDefaultValue()
{
- ConfigurePluginsWidget w;
+ PimCommon::ConfigurePluginsWidget w;
KMessageWidget *messageWidget = w.findChild<KMessageWidget *>(QStringLiteral("messagewidget"));
QVERIFY(messageWidget);
@@ -48,10 +48,10 @@ void ConfigurePluginsWidgetTest::shouldHaveDefaultValue()
QVERIFY(mSplitter);
QCOMPARE(mSplitter->count(), 2);
- ConfigurePluginsListWidget *mConfigureListWidget = mSplitter->findChild<ConfigurePluginsListWidget *>(QStringLiteral("configureListWidget"));
+ PimCommon::ConfigurePluginsListWidget *mConfigureListWidget = mSplitter->findChild<PimCommon::ConfigurePluginsListWidget *>(QStringLiteral("configureListWidget"));
QVERIFY(mConfigureListWidget);
- KTextEdit *mDescription = mSplitter->findChild<KTextEdit *>(QStringLiteral("description"));
+ QTextEdit *mDescription = mSplitter->findChild<QTextEdit *>(QStringLiteral("description"));
QVERIFY(mDescription);
QVERIFY(mDescription->isReadOnly());
QVERIFY(mDescription->document()->isEmpty());