File indexing completed on 2024-11-10 04:50:00
0001 /* 0002 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "filteractionmissingtemplatedialogtest.h" 0008 #include "../filter/dialog/filteractionmissingtemplatedialog.h" 0009 #include <QComboBox> 0010 #include <QDialogButtonBox> 0011 #include <QLabel> 0012 #include <QStandardPaths> 0013 #include <QTest> 0014 0015 FilterActionMissingTemplateDialogTest::FilterActionMissingTemplateDialogTest(QObject *parent) 0016 : QObject(parent) 0017 { 0018 QStandardPaths::setTestModeEnabled(true); 0019 } 0020 0021 FilterActionMissingTemplateDialogTest::~FilterActionMissingTemplateDialogTest() = default; 0022 0023 void FilterActionMissingTemplateDialogTest::shouldHaveDefaultValue() 0024 { 0025 MailCommon::FilterActionMissingTemplateDialog dlg(QStringList(), QStringLiteral("filename")); 0026 QVERIFY(!dlg.windowTitle().isEmpty()); 0027 0028 auto buttonBox = dlg.findChild<QDialogButtonBox *>(QStringLiteral("buttonbox")); 0029 QVERIFY(buttonBox); 0030 0031 auto label = dlg.findChild<QLabel *>(QStringLiteral("label")); 0032 QVERIFY(label); 0033 QVERIFY(!label->text().isEmpty()); 0034 0035 auto mComboBoxTemplate = dlg.findChild<QComboBox *>(QStringLiteral("comboboxtemplate")); 0036 QVERIFY(mComboBoxTemplate); 0037 } 0038 0039 QTEST_MAIN(FilterActionMissingTemplateDialogTest) 0040 0041 #include "moc_filteractionmissingtemplatedialogtest.cpp"