Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9f3744e6 authored by Laurent Montel's avatar Laurent Montel 😁

Add more autotest

parent 1d1e727f
......@@ -20,6 +20,7 @@
#include "vacationmailactionwidgettest.h"
#include "../vacationmailactionwidget.h"
#include <QHBoxLayout>
#include <QLineEdit>
#include <QStackedWidget>
#include <QTest>
......@@ -41,4 +42,12 @@ void VacationMailActionWidgetTest::shouldHaveDefaultValue()
QStackedWidget *mStackedWidget = w.findChild<QStackedWidget *>(QStringLiteral("stackedWidget"));
QVERIFY(mStackedWidget);
QWidget *mMailActionRecipient = mStackedWidget->widget(0);
QVERIFY(mMailActionRecipient);
QLineEdit *lineEdit = dynamic_cast<QLineEdit *>(mMailActionRecipient);
QVERIFY(lineEdit);
QCOMPARE(lineEdit->objectName(), QStringLiteral("mailActionRecipient"));
QVERIFY(!lineEdit->isEnabled());
QVERIFY(lineEdit->isClearButtonEnabled());
}
......@@ -41,6 +41,9 @@ VacationMailActionWidget::VacationMailActionWidget(QWidget *parent)
mMailActionRecipient = new QLineEdit(this);
mMailActionRecipient->setObjectName(QStringLiteral("mailActionRecipient"));
mMailActionRecipient->setClearButtonEnabled(true);
mMailActionRecipient->setEnabled(false);
mStackedWidget->addWidget(mMailActionRecipient);
KPluginLoader loader(QStringLiteral("libksieve/imapfoldercompletionplugin"));
......
Markdown is supported
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