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 "automaticaddcontactsconfiguretabtest.h" 0008 #include "../automaticaddcontactsconfiguretab.h" 0009 #include <QHBoxLayout> 0010 #include <QStandardPaths> 0011 #include <QTabWidget> 0012 #include <QTest> 0013 0014 AutomaticAddContactsConfigureTabTest::AutomaticAddContactsConfigureTabTest(QObject *parent) 0015 : QObject(parent) 0016 { 0017 QStandardPaths::setTestModeEnabled(true); 0018 } 0019 0020 AutomaticAddContactsConfigureTabTest::~AutomaticAddContactsConfigureTabTest() = default; 0021 0022 void AutomaticAddContactsConfigureTabTest::shouldHaveDefaultValue() 0023 { 0024 AutomaticAddContactsConfigureTab w(nullptr); 0025 auto vboxlayout = w.findChild<QHBoxLayout *>(QStringLiteral("mainlayout")); 0026 QVERIFY(vboxlayout); 0027 QCOMPARE(vboxlayout->contentsMargins(), QMargins()); 0028 auto mTabWidget = w.findChild<QTabWidget *>(QStringLiteral("tabwidget")); 0029 QVERIFY(mTabWidget); 0030 } 0031 0032 QTEST_MAIN(AutomaticAddContactsConfigureTabTest) 0033 0034 #include "moc_automaticaddcontactsconfiguretabtest.cpp"