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

Add more autotests

parent 3c537d1a
......@@ -43,3 +43,42 @@ void IncorrectIdentityFolderWarningTest::shouldHaveDefaultValues()
QCOMPARE(w.messageType(), KMessageWidget::Warning);
QVERIFY(w.wordWrap());
}
void IncorrectIdentityFolderWarningTest::shouldShowWarningInvalidIdentity()
{
QWidget *wid = new QWidget;
QHBoxLayout *layout = new QHBoxLayout(wid);
IncorrectIdentityFolderWarning w;
layout->addWidget(&w);
wid->show();
QVERIFY(!w.isVisible());
w.identityInvalid();
QVERIFY(w.isVisible());
QVERIFY(!w.text().isEmpty());
}
void IncorrectIdentityFolderWarningTest::shouldShowWarningInvalidMailTransport()
{
QWidget *wid = new QWidget;
QHBoxLayout *layout = new QHBoxLayout(wid);
IncorrectIdentityFolderWarning w;
layout->addWidget(&w);
wid->show();
QVERIFY(!w.isVisible());
w.mailTransportIsInvalid();
QVERIFY(w.isVisible());
QVERIFY(!w.text().isEmpty());
}
void IncorrectIdentityFolderWarningTest::shouldShowWarningInvalidFcc()
{
QWidget *wid = new QWidget;
QHBoxLayout *layout = new QHBoxLayout(wid);
IncorrectIdentityFolderWarning w;
layout->addWidget(&w);
wid->show();
QVERIFY(!w.isVisible());
w.fccIsInvalid();
QVERIFY(w.isVisible());
QVERIFY(!w.text().isEmpty());
}
......@@ -30,6 +30,9 @@ public:
~IncorrectIdentityFolderWarningTest() = default;
private Q_SLOTS:
void shouldHaveDefaultValues();
void shouldShowWarningInvalidIdentity();
void shouldShowWarningInvalidMailTransport();
void shouldShowWarningInvalidFcc();
};
#endif // INCORRECTIDENTITYFOLDERWARNINGTEST_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