File indexing completed on 2025-01-05 04:49:30

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 "automaticaddcontactsconfigurewidgettest.h"
0008 #include "../automaticaddcontactsconfiguretab.h"
0009 #include "../automaticaddcontactsconfigurewidget.h"
0010 
0011 #include <QStandardPaths>
0012 #include <QTest>
0013 #include <QVBoxLayout>
0014 
0015 AutomaticAddContactsConfigureWidgetTest::AutomaticAddContactsConfigureWidgetTest(QObject *parent)
0016     : QObject(parent)
0017 {
0018     QStandardPaths::setTestModeEnabled(true);
0019 }
0020 
0021 AutomaticAddContactsConfigureWidgetTest::~AutomaticAddContactsConfigureWidgetTest() = default;
0022 
0023 void AutomaticAddContactsConfigureWidgetTest::shouldHaveDefaultValue()
0024 {
0025     AutomaticAddContactsConfigureWidget w(nullptr);
0026 
0027     auto mainLayout = w.findChild<QVBoxLayout *>(QStringLiteral("mainlayout"));
0028     QVERIFY(mainLayout);
0029 
0030     auto mConfigureTab = w.findChild<AutomaticAddContactsConfigureTab *>(QStringLiteral("configuretab"));
0031     QVERIFY(mConfigureTab);
0032 }
0033 
0034 QTEST_MAIN(AutomaticAddContactsConfigureWidgetTest)
0035 
0036 #include "moc_automaticaddcontactsconfigurewidgettest.cpp"