File indexing completed on 2025-02-16 04:49:29

0001 /*
0002    SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "checkbeforesendupdatesmtpdialogtest.h"
0008 #include "checkbeforesendupdatesmtpdialog.h"
0009 #include <QCheckBox>
0010 #include <QDialogButtonBox>
0011 #include <QLabel>
0012 #include <QTest>
0013 #include <QVBoxLayout>
0014 QTEST_MAIN(CheckBeforeSendUpdateSmtpDialogTest)
0015 
0016 CheckBeforeSendUpdateSmtpDialogTest::CheckBeforeSendUpdateSmtpDialogTest(QObject *parent)
0017     : QObject(parent)
0018 {
0019 }
0020 
0021 void CheckBeforeSendUpdateSmtpDialogTest::shouldHaveDefaultValue()
0022 {
0023     CheckBeforeSendUpdateSmtpDialog w;
0024     auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainlayout"));
0025     QVERIFY(mainLayout);
0026 
0027     auto lab = w.findChild<QLabel *>(QStringLiteral("label"));
0028     QVERIFY(lab);
0029     QVERIFY(!lab->text().isEmpty());
0030 
0031     auto mChangeSmtp = w.findChild<QCheckBox *>(QStringLiteral("changesmtp"));
0032     QVERIFY(mChangeSmtp);
0033     QVERIFY(!mChangeSmtp->isChecked());
0034 
0035     auto buttonBox = w.findChild<QDialogButtonBox *>(QStringLiteral("buttonbox"));
0036     QVERIFY(buttonBox);
0037 
0038     QVERIFY(!w.windowTitle().isEmpty());
0039 }
0040 
0041 #include "moc_checkbeforesendupdatesmtpdialogtest.cpp"