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

Add autotest

parent 1bb7a805
...@@ -69,4 +69,9 @@ void DKIMPolicyWidgetTest::shouldHaveDefaultValues() ...@@ -69,4 +69,9 @@ void DKIMPolicyWidgetTest::shouldHaveDefaultValues()
QVERIFY(mReadAuthResultHeader); QVERIFY(mReadAuthResultHeader);
QVERIFY(!mReadAuthResultHeader->text().isEmpty()); QVERIFY(!mReadAuthResultHeader->text().isEmpty());
QVERIFY(!mReadAuthResultHeader->isEnabled()); QVERIFY(!mReadAuthResultHeader->isEnabled());
QCheckBox *mAutoGenerateOnlyIfSenderInSDID = w.findChild<QCheckBox *>(QStringLiteral("mAutoGenerateOnlyIfSenderInSDID"));
QVERIFY(mAutoGenerateOnlyIfSenderInSDID);
QVERIFY(!mAutoGenerateOnlyIfSenderInSDID->text().isEmpty());
QVERIFY(!mAutoGenerateOnlyIfSenderInSDID->isEnabled());
} }
...@@ -43,6 +43,7 @@ DKIMPolicyWidget::DKIMPolicyWidget(QWidget *parent) ...@@ -43,6 +43,7 @@ DKIMPolicyWidget::DKIMPolicyWidget(QWidget *parent)
mUseDMARC->setEnabled(state); mUseDMARC->setEnabled(state);
mUseDefaultRules->setEnabled(state); mUseDefaultRules->setEnabled(state);
mRulesButton->setEnabled(state); mRulesButton->setEnabled(state);
mAutoGenerateOnlyIfSenderInSDID->setEnabled(state);
mAutoGenerateRule->setEnabled(state); mAutoGenerateRule->setEnabled(state);
mReadAuthResultHeader->setEnabled(state); mReadAuthResultHeader->setEnabled(state);
}); });
...@@ -67,7 +68,8 @@ DKIMPolicyWidget::DKIMPolicyWidget(QWidget *parent) ...@@ -67,7 +68,8 @@ DKIMPolicyWidget::DKIMPolicyWidget(QWidget *parent)
mAutoGenerateRule->setEnabled(false); mAutoGenerateRule->setEnabled(false);
mainLayout->addWidget(mAutoGenerateRule); mainLayout->addWidget(mAutoGenerateRule);
mAutoGenerateOnlyIfSenderInSDID = new QCheckBox(i18n("Autogenerate when Sender in SDID"), this); //TODO Add spacer
mAutoGenerateOnlyIfSenderInSDID = new QCheckBox(QStringLiteral(" ") + i18n("Autogenerate when Sender in SDID"), this);
mAutoGenerateOnlyIfSenderInSDID->setObjectName(QStringLiteral("mAutoGenerateOnlyIfSenderInSDID")); mAutoGenerateOnlyIfSenderInSDID->setObjectName(QStringLiteral("mAutoGenerateOnlyIfSenderInSDID"));
mAutoGenerateOnlyIfSenderInSDID->setEnabled(false); mAutoGenerateOnlyIfSenderInSDID->setEnabled(false);
mainLayout->addWidget(mAutoGenerateOnlyIfSenderInSDID); mainLayout->addWidget(mAutoGenerateOnlyIfSenderInSDID);
......
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