File indexing completed on 2024-12-22 04:45:35
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 "viewlogwidgettest.h" 0008 #include "administratordialog/logs/viewlogplaintextedit.h" 0009 #include "administratordialog/logs/viewlogwidget.h" 0010 #include <QTest> 0011 #include <QVBoxLayout> 0012 0013 QTEST_MAIN(ViewLogWidgetTest) 0014 0015 ViewLogWidgetTest::ViewLogWidgetTest(QObject *parent) 0016 : QObject(parent) 0017 { 0018 } 0019 0020 void ViewLogWidgetTest::shouldHaveDefaultValues() 0021 { 0022 ViewLogWidget w(nullptr); 0023 auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainLayout")); 0024 QVERIFY(mainLayout); 0025 0026 auto mPlainTextEdit = w.findChild<ViewLogPlainTextEdit *>(QStringLiteral("mPlainTextEdit")); 0027 QVERIFY(mPlainTextEdit); 0028 QVERIFY(mPlainTextEdit->isReadOnly()); 0029 } 0030 0031 #include "moc_viewlogwidgettest.cpp"