Commit f26ec1a4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add autotests

parent b8809365
......@@ -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 )
......
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)
......@@ -34,7 +34,7 @@ ConfigurePluginsListWidgetTest::~ConfigurePluginsListWidgetTest()
void ConfigurePluginsListWidgetTest::shouldHaveDefaultValue()
{
ConfigurePluginsListWidget w;
PimCommon::ConfigurePluginsListWidget w;
QVBoxLayout *mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainlayout"));
QVERIFY(mainLayout);
......
......@@ -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());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment