File indexing completed on 2025-03-09 04:54:37
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 "remotecontentwidgettest.h" 0008 #include "remote-content/remotecontentstatustypecombobox.h" 0009 #include "remote-content/remotecontentwidget.h" 0010 #include <QHBoxLayout> 0011 #include <QLineEdit> 0012 #include <QTest> 0013 QTEST_MAIN(RemoteContentWidgetTest) 0014 RemoteContentWidgetTest::RemoteContentWidgetTest(QObject *parent) 0015 : QObject(parent) 0016 { 0017 } 0018 0019 void RemoteContentWidgetTest::shouldHaveDefaultValues() 0020 { 0021 MessageViewer::RemoteContentWidget w; 0022 auto mainLayout = w.findChild<QHBoxLayout *>(QStringLiteral("mainLayout")); 0023 QVERIFY(mainLayout); 0024 QCOMPARE(mainLayout->contentsMargins(), QMargins{}); 0025 0026 auto mLineEdit = w.findChild<QLineEdit *>(QStringLiteral("mLineEdit")); 0027 QVERIFY(mLineEdit); 0028 QVERIFY(mLineEdit->text().isEmpty()); 0029 0030 auto mStatusComboBox = w.findChild<MessageViewer::RemoteContentStatusTypeComboBox *>(QStringLiteral("mStatusComboBox")); 0031 QVERIFY(mStatusComboBox); 0032 } 0033 0034 #include "moc_remotecontentwidgettest.cpp"