|
|
|
|
@ -19,7 +19,12 @@ |
|
|
|
|
|
|
|
|
|
#include "filteractionmissingidentitydialogtest.h" |
|
|
|
|
#include "../filter/dialog/filteractionmissingidentitydialog.h" |
|
|
|
|
#include "../../autotests/dummykernel.h" |
|
|
|
|
#include "../../kernel/mailkernel.h" |
|
|
|
|
#include <QDialogButtonBox> |
|
|
|
|
#include <QLabel> |
|
|
|
|
#include <QTest> |
|
|
|
|
#include <KIdentityManagement/IdentityCombo> |
|
|
|
|
|
|
|
|
|
FilterActionMissingIdentityDialogTest::FilterActionMissingIdentityDialogTest(QObject *parent) |
|
|
|
|
: QObject(parent) |
|
|
|
|
@ -32,9 +37,28 @@ FilterActionMissingIdentityDialogTest::~FilterActionMissingIdentityDialogTest() |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void FilterActionMissingIdentityDialogTest::initTestCase() |
|
|
|
|
{ |
|
|
|
|
DummyKernel *kernel = new DummyKernel(0); |
|
|
|
|
CommonKernel->registerKernelIf(kernel); //register KernelIf early, it is used by the Filter classes
|
|
|
|
|
CommonKernel->registerSettingsIf(kernel); //SettingsIf is used in FolderTreeWidget
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void FilterActionMissingIdentityDialogTest::shouldHaveDefaultValue() |
|
|
|
|
{ |
|
|
|
|
MailCommon::FilterActionMissingIdentityDialog dlg(QStringLiteral("filename")); |
|
|
|
|
QVERIFY(dlg.isModal()); |
|
|
|
|
QVERIFY(!dlg.windowTitle().isEmpty()); |
|
|
|
|
|
|
|
|
|
QLabel *label = dlg.findChild<QLabel *>(QStringLiteral("label")); |
|
|
|
|
QVERIFY(label); |
|
|
|
|
QVERIFY(!label->text().isEmpty()); |
|
|
|
|
|
|
|
|
|
KIdentityManagement::IdentityCombo *mComboBoxIdentity = dlg.findChild<KIdentityManagement::IdentityCombo *>(QStringLiteral("comboboxidentity")); |
|
|
|
|
QVERIFY(mComboBoxIdentity); |
|
|
|
|
|
|
|
|
|
QDialogButtonBox *buttonBox = dlg.findChild<QDialogButtonBox *>(QStringLiteral("buttonbox")); |
|
|
|
|
QVERIFY(buttonBox); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QTEST_MAIN(FilterActionMissingIdentityDialogTest) |
|
|
|
|
|