File indexing completed on 2024-11-10 04:50:01
0001 /* 0002 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-only 0005 */ 0006 0007 #include "invalidfilterdialogtest.h" 0008 #include "../filter/invalidfilters/invalidfilterdialog.h" 0009 #include "../filter/invalidfilters/invalidfilterinfowidget.h" 0010 #include "../filter/invalidfilters/invalidfilterwidget.h" 0011 #include <QStandardPaths> 0012 #include <QTest> 0013 0014 InvalidFilterDialogTest::InvalidFilterDialogTest(QObject *parent) 0015 : QObject(parent) 0016 { 0017 QStandardPaths::setTestModeEnabled(true); 0018 } 0019 0020 InvalidFilterDialogTest::~InvalidFilterDialogTest() = default; 0021 0022 void InvalidFilterDialogTest::shouldHaveDefaultValue() 0023 { 0024 MailCommon::InvalidFilterDialog dlg; 0025 auto widget = dlg.findChild<MailCommon::InvalidFilterWidget *>(QStringLiteral("invalid_filter_widget")); 0026 QVERIFY(widget); 0027 0028 auto infoWidget = dlg.findChild<MailCommon::InvalidFilterInfoWidget *>(QStringLiteral("invalid_filter_infowidget")); 0029 QVERIFY(infoWidget); 0030 QVERIFY(!infoWidget->isVisible()); 0031 QVERIFY(!dlg.windowTitle().isEmpty()); 0032 } 0033 0034 QTEST_MAIN(InvalidFilterDialogTest) 0035 0036 #include "moc_invalidfilterdialogtest.cpp"