File indexing completed on 2024-11-24 04:39:30
0001 /* 0002 This file is part of Contact Editor. 0003 0004 SPDX-FileCopyrightText: 2016 eyeOS S.L.U., a Telefonica company, sales@eyeos.com 0005 SPDX-FileCopyrightText: 2016-2020 Laurent Montel <montel.org> 0006 0007 SPDX-License-Identifier: LGPL-2.0-or-later 0008 */ 0009 0010 #include "mailwidgettest.h" 0011 #include "../mail/mailwidget.h" 0012 #include <QComboBox> 0013 #include <QLineEdit> 0014 #include <QTest> 0015 #include <QToolButton> 0016 0017 MailWidgetTest::MailWidgetTest(QObject *parent) 0018 : QObject(parent) 0019 { 0020 } 0021 0022 MailWidgetTest::~MailWidgetTest() = default; 0023 0024 void MailWidgetTest::shouldHaveDefaultValue() 0025 { 0026 Akonadi::MailWidget w; 0027 auto line = w.findChild<QLineEdit *>(QStringLiteral("mailedit")); 0028 QVERIFY(line); 0029 QVERIFY(line->text().isEmpty()); 0030 auto addButton = w.findChild<QToolButton *>(QStringLiteral("addbutton")); 0031 QVERIFY(addButton); 0032 0033 auto removeButton = w.findChild<QToolButton *>(QStringLiteral("removebutton")); 0034 QVERIFY(removeButton); 0035 0036 auto mailtype = w.findChild<QComboBox *>(QStringLiteral("mailtype")); 0037 QVERIFY(mailtype); 0038 } 0039 0040 QTEST_MAIN(MailWidgetTest) 0041 0042 #include "moc_mailwidgettest.cpp"