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 "importimapsettingprogresspagetest.h" 0008 #include "../importimapsettingprogresspage.h" 0009 #include <QStandardPaths> 0010 #include <QTest> 0011 #include <QTextEdit> 0012 #include <QVBoxLayout> 0013 0014 ImportImapSettingProgressPageTest::ImportImapSettingProgressPageTest(QObject *parent) 0015 : QObject(parent) 0016 { 0017 QStandardPaths::setTestModeEnabled(true); 0018 } 0019 0020 ImportImapSettingProgressPageTest::~ImportImapSettingProgressPageTest() = default; 0021 0022 void ImportImapSettingProgressPageTest::shouldHaveDefaultValue() 0023 { 0024 ImportImapSettingProgressPage w; 0025 0026 auto mProgressTextEdit = w.findChild<QTextEdit *>(QStringLiteral("textedit")); 0027 QVERIFY(mProgressTextEdit); 0028 QVERIFY(mProgressTextEdit->isReadOnly()); 0029 QVERIFY(mProgressTextEdit->document()->isEmpty()); 0030 0031 auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainlayout")); 0032 QVERIFY(mainLayout); 0033 } 0034 0035 QTEST_MAIN(ImportImapSettingProgressPageTest) 0036 0037 #include "moc_importimapsettingprogresspagetest.cpp"