File indexing completed on 2025-01-19 04:46:51
0001 /* 0002 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "dkimgeneralwidgettest.h" 0008 #include "dkimgeneralwidget.h" 0009 #include <QCheckBox> 0010 #include <QComboBox> 0011 #include <QTest> 0012 #include <QVBoxLayout> 0013 QTEST_MAIN(DKIMGeneralWidgetTest) 0014 DKIMGeneralWidgetTest::DKIMGeneralWidgetTest(QObject *parent) 0015 : QObject(parent) 0016 { 0017 } 0018 0019 void DKIMGeneralWidgetTest::shouldHaveDefaultValues() 0020 { 0021 DKIMGeneralWidget w; 0022 auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainLayout")); 0023 QVERIFY(mainLayout); 0024 0025 auto mEnableDkimSupport = w.findChild<QCheckBox *>(QStringLiteral("kcfg_EnabledDkim")); 0026 QVERIFY(mEnableDkimSupport); 0027 QVERIFY(!mEnableDkimSupport->text().isEmpty()); 0028 QVERIFY(!mEnableDkimSupport->isChecked()); 0029 0030 auto mSaveResult = w.findChild<QCheckBox *>(QStringLiteral("kcfg_SaveDkimResult")); 0031 QVERIFY(mSaveResult); 0032 QVERIFY(!mSaveResult->text().isEmpty()); 0033 QVERIFY(!mSaveResult->isChecked()); 0034 0035 auto mSaveKey = w.findChild<QComboBox *>(QStringLiteral("kcfg_SaveKey")); 0036 QVERIFY(mSaveKey); 0037 0038 auto mUseOnlyAuthenticationResult = w.findChild<QCheckBox *>(QStringLiteral("kcfg_UseOnlyAuthenticationResults")); 0039 QVERIFY(mUseOnlyAuthenticationResult); 0040 QVERIFY(!mUseOnlyAuthenticationResult->text().isEmpty()); 0041 QVERIFY(!mUseOnlyAuthenticationResult->isChecked()); 0042 } 0043 0044 #include "moc_dkimgeneralwidgettest.cpp"