File indexing completed on 2024-12-15 04:55:35

0001 /*
0002    SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "importimapsettingfinishpagetest.h"
0008 #include "../importimapsettingfinishpage.h"
0009 #include <QLabel>
0010 #include <QTest>
0011 #include <QTextEdit>
0012 #include <QVBoxLayout>
0013 
0014 ImportImapSettingFinishPageTest::ImportImapSettingFinishPageTest(QObject *parent)
0015     : QObject(parent)
0016 {
0017 }
0018 
0019 ImportImapSettingFinishPageTest::~ImportImapSettingFinishPageTest() = default;
0020 
0021 void ImportImapSettingFinishPageTest::shouldHaveDefaultValue()
0022 {
0023     ImportImapSettingFinishPage w;
0024     auto label = w.findChild<QLabel *>(QStringLiteral("label"));
0025     QVERIFY(label);
0026     QVERIFY(!label->text().isEmpty());
0027 
0028     auto mTextEdit = w.findChild<QTextEdit *>(QStringLiteral("textedit"));
0029     QVERIFY(mTextEdit);
0030     QVERIFY(mTextEdit->isReadOnly());
0031     QVERIFY(mTextEdit->document()->isEmpty());
0032 
0033     auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainlayout"));
0034     QVERIFY(mainLayout);
0035 }
0036 
0037 QTEST_MAIN(ImportImapSettingFinishPageTest)
0038 
0039 #include "moc_importimapsettingfinishpagetest.cpp"