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

Add autotest

parent e5207f2a
......@@ -19,17 +19,31 @@
#include "dkimauthenticationverifiedserverdialogtest.h"
#include "dkimauthenticationverifiedserverdialog.h"
#include "dkimauthenticationverifiedserverwidget.h"
#include <QTest>
#include <QStandardPaths>
#include <QVBoxLayout>
#include <QDialogButtonBox>
QTEST_MAIN(DKIMAuthenticationVerifiedServerDialogTest)
DKIMAuthenticationVerifiedServerDialogTest::DKIMAuthenticationVerifiedServerDialogTest(QObject *parent)
: QObject(parent)
{
QStandardPaths::setTestModeEnabled(true);
}
void DKIMAuthenticationVerifiedServerDialogTest::shouldHaveDefaultValues()
{
DKIMAuthenticationVerifiedServerDialog w;
//TODO
DKIMAuthenticationVerifiedServerDialog dlg;
QVERIFY(!dlg.windowTitle().isEmpty());
QVBoxLayout *mainLayout = dlg.findChild<QVBoxLayout *>(QStringLiteral("mainlayout"));
QVERIFY(mainLayout);
DKIMAuthenticationVerifiedServerWidget *mConfigureWidget = dlg.findChild<DKIMAuthenticationVerifiedServerWidget *>(QStringLiteral("mAuthenticationVerifiedWidget"));
QVERIFY(mConfigureWidget);
QDialogButtonBox *buttonBox = dlg.findChild<QDialogButtonBox *>(QStringLiteral("buttonBox"));
QVERIFY(buttonBox);
QCOMPARE(buttonBox->standardButtons(), {QDialogButtonBox::Ok | QDialogButtonBox::Cancel});
}
......@@ -33,12 +33,12 @@ static const char myConfigGroupName[] = "DKIMAuthenticationVerifiedServerDialog"
DKIMAuthenticationVerifiedServerDialog::DKIMAuthenticationVerifiedServerDialog(QWidget *parent)
: QDialog(parent)
{
setWindowTitle(i18n("Configure DKIM"));
setWindowTitle(i18n("Configure Authentication Verified Server"));
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setObjectName(QStringLiteral("mainlayout"));
mAuthenticationVerifiedWidget = new DKIMAuthenticationVerifiedServerWidget(this);
mAuthenticationVerifiedWidget->setObjectName(QStringLiteral("mConfigureWidget"));
mAuthenticationVerifiedWidget->setObjectName(QStringLiteral("mAuthenticationVerifiedWidget"));
mainLayout->addWidget(mAuthenticationVerifiedWidget);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
......
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