File indexing completed on 2024-11-24 04:43:06
0001 /* 0002 SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "confirmbeforedeletingdialogtest.h" 0008 #include "confirmbeforedeletingdialog.h" 0009 #include "confirmbeforedeletingwidget.h" 0010 #include <QDialogButtonBox> 0011 #include <QStandardPaths> 0012 #include <QTest> 0013 #include <QVBoxLayout> 0014 QTEST_MAIN(ConfirmBeforeDeletingDialogTest) 0015 ConfirmBeforeDeletingDialogTest::ConfirmBeforeDeletingDialogTest(QObject *parent) 0016 : QObject(parent) 0017 { 0018 QStandardPaths::setTestModeEnabled(true); 0019 } 0020 0021 void ConfirmBeforeDeletingDialogTest::shouldHaveDefaultValues() 0022 { 0023 ConfirmBeforeDeletingDialog d; 0024 QVERIFY(!d.windowTitle().isEmpty()); 0025 auto mainLayout = d.findChild<QVBoxLayout *>(QStringLiteral("mainlayout")); 0026 QVERIFY(mainLayout); 0027 0028 auto mConfirmBeforeDeletingWidget = d.findChild<ConfirmBeforeDeletingWidget *>(QStringLiteral("mConfirmBeforeDeletingWidget")); 0029 QVERIFY(mConfirmBeforeDeletingWidget); 0030 0031 auto buttonBox = d.findChild<QDialogButtonBox *>(QStringLiteral("buttonBox")); 0032 QVERIFY(buttonBox); 0033 } 0034 0035 #include "moc_confirmbeforedeletingdialogtest.cpp"