Commit fc2b1f83 authored by Laurent Montel's avatar Laurent Montel 😁

Add more autotests

parent d65cebd2
......@@ -21,6 +21,10 @@
#include "messageformattingwidgettest.h"
#include "../messageformattingwidget.h"
#include <QCheckBox>
#include <QComboBox>
#include <QLabel>
#include <QTest>
MessageFormattingWidgetTest::MessageFormattingWidgetTest(QObject *parent)
......@@ -29,4 +33,22 @@ MessageFormattingWidgetTest::MessageFormattingWidgetTest(QObject *parent)
}
void MessageFormattingWidgetTest::shouldHaveDefaultValue()
{
MessageFormattingWidget w;
QLabel *label = w.findChild<QLabel *>(QStringLiteral("label"));
QVERIFY(label);
QVERIFY(!label->text().isEmpty());
QComboBox *mMailPreferFormatting = w.findChild<QComboBox *>(QStringLiteral("mMailPreferFormatting"));
QVERIFY(mMailPreferFormatting);
QVERIFY(mMailPreferFormatting->count() > 0);
QCheckBox *mAllowRemoteContent = w.findChild<QCheckBox *>(QStringLiteral("mAllowRemoteContent"));
QVERIFY(mAllowRemoteContent);
QVERIFY(!mAllowRemoteContent->text().isEmpty());
QVERIFY(!mAllowRemoteContent->isChecked());
}
QTEST_MAIN(MessageFormattingWidgetTest)
......@@ -30,6 +30,8 @@ class MessageFormattingWidgetTest : public QObject
public:
explicit MessageFormattingWidgetTest(QObject *parent = nullptr);
~MessageFormattingWidgetTest() = default;
private Q_SLOTS:
void shouldHaveDefaultValue();
};
#endif // MESSAGEFORMATTINGWIDGETTEST_H
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