File indexing completed on 2024-12-22 04:45:57
0001 /* 0002 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "exportmessageswidgettest.h" 0008 #include "exportmessages/exportmessageswidget.h" 0009 #include <QComboBox> 0010 #include <QDateEdit> 0011 #include <QFormLayout> 0012 #include <QTest> 0013 QTEST_MAIN(ExportMessagesWidgetTest) 0014 ExportMessagesWidgetTest::ExportMessagesWidgetTest(QObject *parent) 0015 : QObject(parent) 0016 { 0017 } 0018 0019 void ExportMessagesWidgetTest::shouldHaveDefaultValues() 0020 { 0021 ExportMessagesWidget w; 0022 auto mainLayout = w.findChild<QFormLayout *>(QStringLiteral("mainLayout")); 0023 QVERIFY(mainLayout); 0024 0025 auto mFromDate = w.findChild<QDateEdit *>(QStringLiteral("mFromDate")); 0026 QVERIFY(mFromDate); 0027 0028 auto mToDate = w.findChild<QDateEdit *>(QStringLiteral("mToDate")); 0029 QVERIFY(mToDate); 0030 0031 auto mFormat = w.findChild<QComboBox *>(QStringLiteral("mFormat")); 0032 QVERIFY(mFormat); 0033 0034 QVERIFY(!w.roomExportInfo().isValid()); 0035 } 0036 0037 #include "moc_exportmessageswidgettest.cpp"