File indexing completed on 2024-12-22 04:45:35
0001 /* 0002 SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "moderationmessageinfodialogtest.h" 0008 #include "administratordialog/moderationconsole/moderationmessageinfodialog.h" 0009 #include "administratordialog/moderationconsole/moderationmessageinfowidget.h" 0010 #include <QDialogButtonBox> 0011 #include <QStandardPaths> 0012 #include <QTest> 0013 #include <QVBoxLayout> 0014 QTEST_MAIN(ModerationMessageInfoDialogTest) 0015 ModerationMessageInfoDialogTest::ModerationMessageInfoDialogTest(QObject *parent) 0016 : QObject{parent} 0017 { 0018 QStandardPaths::setTestModeEnabled(true); 0019 } 0020 0021 void ModerationMessageInfoDialogTest::shouldHaveDefaultValues() 0022 { 0023 ModerationMessageInfoDialog d(nullptr); 0024 QVERIFY(!d.windowTitle().isEmpty()); 0025 0026 auto mainLayout = d.findChild<QVBoxLayout *>(QStringLiteral("mainLayout")); 0027 QVERIFY(mainLayout); 0028 0029 auto mModerationMessageInfoWidget = d.findChild<ModerationMessageInfoWidget *>(QStringLiteral("mModerationMessageInfoWidget")); 0030 QVERIFY(mModerationMessageInfoWidget); 0031 0032 auto button = d.findChild<QDialogButtonBox *>(QStringLiteral("button")); 0033 QVERIFY(button); 0034 } 0035 0036 #include "moc_moderationmessageinfodialogtest.cpp"