File indexing completed on 2024-11-24 04:39:30
0001 /* 0002 This file is part of Contact Editor. 0003 0004 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #include "messagingwidgettest.h" 0010 #include "../messaging/messagingwidget.h" 0011 #include <KLineEdit> 0012 #include <QComboBox> 0013 #include <QTest> 0014 #include <QToolButton> 0015 0016 MessagingWidgetTest::MessagingWidgetTest(QObject *parent) 0017 : QObject(parent) 0018 { 0019 } 0020 0021 MessagingWidgetTest::~MessagingWidgetTest() = default; 0022 0023 void MessagingWidgetTest::shouldHaveDefaultValues() 0024 { 0025 Akonadi::MessagingWidget w; 0026 auto line = w.findChild<KLineEdit *>(QStringLiteral("messaginglineedit")); 0027 QVERIFY(line); 0028 0029 auto protocolCombo = w.findChild<QComboBox *>(QStringLiteral("protocol")); 0030 QVERIFY(protocolCombo); 0031 QVERIFY(protocolCombo->count() > 0); 0032 0033 auto add = w.findChild<QToolButton *>(QStringLiteral("addbutton")); 0034 QVERIFY(add); 0035 auto remove = w.findChild<QToolButton *>(QStringLiteral("removebutton")); 0036 QVERIFY(remove); 0037 } 0038 0039 QTEST_MAIN(MessagingWidgetTest) 0040 0041 #include "moc_messagingwidgettest.cpp"